Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    hughlang
    @hughlang
    Is it possible to get the size of the screen before update and draw are called
    hughlang
    @hughlang
    I guess I should look for a run_with example?
    hughlang
    @hughlang
    I figured it out.
    hughlang
    @hughlang
    New question. Is there a way to use glyph_brush along with quicksilver to push text glyphs at the gpu for better performance? It's an odd use case. I know I can send rendered text.
    Ryan G
    @ryanisaacg
    Quicksilver's Font implementation actually only uses public APIs to render the glyphs, so you could fairly easily copy it and replace rusttype with glyph_brush I think. You'd have to fix the import paths as well, because they are relative to src/graphics/font.rs in Quicksilver rather than using Quicksilver as an external crate.
    hughlang
    @hughlang
    Thanks @ryanisaacg. I am giving it a try. It might get messy.
    hughlang
    @hughlang
    Hi @ryanisaacg. What's the status of the opengl texture implementation? I'm curious why the opengl attributes and vertices don't specify the size or bottom-right vector. It seems this would be important.
    Mind you, most of my opengl knowledge was acquired in the last couple days, so i'm not too experienced in this area.
    Ryan G
    @ryanisaacg
    The vertices specify which texture coordinate the given vertex uses, which allows OpenGL to take the correct texture chunk
    hughlang
    @hughlang
    How does it know the size of the chunk?
    hughlang
    @hughlang
    ah nvm
    Sean Voss
    @seanvoss
    Good Morning! Saw that the example code for Atlases was removed, I wanted to try to add graphics via a spritesheet as I went through the rougelike tutorial, thought that might be a good fit, do you have a code snippet handy?
    Ryan G
    @ryanisaacg
    I don't have a snippet handy, but for a spritesheet you'll probably want to look at Image::subimage to extract each sprite individually.
    roignpar
    @roignpar
    hi! I'm trying to figure out how to adjust an image's alpha or somehow make it transparent. couldn't find a solution in the docs. does quicksilver support this?
    Mikail Khan
    @mkhan45
    what's the best way to interface with quicksilver from javascript? I want to add a GUI with html/js
    Mikail Khan
    @mkhan45
    I think I can use the js! macro and instead of using onclicks/onsubmits etc I can just update every frame maybe
    Ryan G
    @ryanisaacg
    @roignpar if you use Background::Blended and provide a Color with an alpha, the resulting image with have that alpha value
    @mkhan45 The best way to do that would be to use stdweb's API and create the HTML / JS elements from within your application, and hold references to them
    roignpar
    @roignpar
    @ryanisaacg thank you!
    Ryan G
    @ryanisaacg
    no problem, when I have a bit of time I'll update the docs to make that more clear
    Mikail Khan
    @mkhan45
    thanks @ryanisaacg
    hughlang
    @hughlang
    Hi @ryanisaacg. Hope your weekend is swell. I was wondering how to draw a circle outline with a specified color. Anyone have that info? Or is there a workaround to generate a circle image from a mesh?
    hughlang
    @hughlang
    I guess I will try lyon svg
    Ryan G
    @ryanisaacg
    @hughlang Yup, lyon is your best bet there.
    hughlang
    @hughlang
    Thanks @ryanisaacg . I am also messing around with wasm/webgl. I have a weird problem where the lines that I draw on the screen are pixel doubled. 2 pixels instead of 1. Is there a setting that fixes that?
    Sean Voss
    @seanvoss
    Hi, some questions on the Animation System. Since I last wrote I've been able to import Atlas' files use them for the map floors import animations and apply them to the player. I'm looking for a strategy to run the animations once and stop. The animation class itself seems to not expose enough information to know when an animation loop is completed. Am I not understanding your implementation? Enough to accomplish this would be just exposing the number of frames and the current frame, though obviously there could be convenience methods as well.
    Ryan G
    @ryanisaacg

    Sorry I missed both your messages! Gitter never notified me for whatever reason.

    @hughlang I don't know why that would happen, other than artifacts possibly from lines at odd angles being impossible to draw one-pixel-thick

    @seanvoss Feel free to PR getter methods for the number of frames and the current frame! My use case has always been simple loops, so I've never needed it.

    hughlang
    @hughlang
    No worries Ryan. I have a few things I want to talk about though.
    I have been working heavily with Quicksilver over the last month and I figured out a few things.
    I have a few feature requests. One of them is pretty large. The good news is that I wrote the code to solve them. I just need your feedback, since it's not perfect yet.
    hughlang
    @hughlang
    The current opengl/webgl architecture seems to be limited to a single rendering pipeline. Everything accumulates in the global Mesh and is executed by a single set of GL scripts
    So it seems that you cannot have specialized pipelines that execute specialized operations such as:
    Upload and read/write to a texture in the GPU and only accessing specific parts of textures
    Or only reading/writing to specific color channels. Yeah, almost nobody wants to do this kind of thing. But I needed to.
    hughlang
    @hughlang
    And yeah, @ryanisaacg... Gitter seems to be selective about what notifications it sends you. I would appreciate if we could talk more about this. When you have time, can you look at my fork? I created a PR there just so I could review without confusing the main repo. hughlang/quicksilver#1
    There's some unnecessary garbage there that I want to remove and create a new PR for your repo. Feel free to AMA
    Starting with the first 2 files in the PR list... these are just example code for drawing basic shapes in Lyon. It will be a separate PR or tossed out.
    And then most of the remaining code centers around a new rendering pipeline architecture where modular DrawTasks can encapsulate the vertices and GPU triangles associated with corresponding GL programs and textures.
    hughlang
    @hughlang
    Sorry to dump this on you. Quicksilver is amazing and is the only project out there that lets me build for opengl and wasm/webgl in a bare metal way.
    hughlang
    @hughlang
    For context, I am working on a full GUI framework for Rust that works on any OS and webgl. It started as an animation lib and now it's almost complete as a GUI lib. https://github.com/wasm-network/tweek-rust
    francesco-cattoglio
    @francesco-cattoglio
    Hi there, newbie here. I am toying around with quicksilver and it really looks nice! I was thinking about loading multiple images then combining them via drawing on a surface (so that in the end I only have one image and do not need to keep track of everything, but I am a bit lost. I understand that loading something produces a future, and I can do something like
    Assert::new({
    let future_1 = <load something>;
    let future_2 = <load something else>;
     })
    Then, all I have is multiple futures I don't know how to combine. If I join() them I get a tuple, but I honestly have no idea about what can be done with it, all my attempts have failed :sweat_smile:
    francesco-cattoglio
    @francesco-cattoglio
    Since yesterday I made a bit of progress in understanding what can be done, but I am facing a strange behaviour with the screen flickering if I try to create an Asset<Surface>. Also opened a "question" issue ryanisaacg/quicksilver#501
    MushuYoWushu
    @MushuYoWushu
    Hey there, are there completed game projects I can look at? (Like an examples page)
    Ryan G
    @ryanisaacg
    wow, Gitter has very helpfully again failed to notify me about any of these messages. I'm very sorry @hughlang @francesco-cattoglio ! I think I'm going to migrate away from Gitter because of this very problem
    @hughlang Honestly I think what you're going for is great! I don't have the bandwidth to make major changes to Quicksilver as of right now, though, and I have some of my own thoughts about how to add modular pipelines that I'm saving for Quicksilver 0.4
    Ryan G
    @ryanisaacg
    @francesco-cattoglio When you have a tuple of joined futures, you can unpack them when you execute
    @MushuYoWushu Yup, in the readme!
    I would direct people with further questions to open issues or to join the Rust Community Discord and ping me there! https://discord.gg/aVESxV8