Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ryan G
    @ryanisaacg
    Yup, check out the Atlas struct!
    Jay Pavlina
    @JayPavlina
    I was experimenting with Amethyst but I need my game to run on the web so I’m back. I just noticed there is a tile map. Are there any examples with it? How do I draw it?
    Jay Pavlina
    @JayPavlina
    Also are there any complete games that have source code available? I’m building a 2D platformer (like Super Mario Bros).
    Ryan G
    @ryanisaacg
    @JayPavlina The Tilemap isn't a super great API, and unfortunately you would have to draw it manually at the moment
    I'll be making a list of made-in-Quicksilver projects in the README soon, but there aren't any platformers that I know of
    Gabriel Martinez
    @mystal
    Quick question. I'm working on a quicksilver game on Linux (X11). I was checking for a keyboard press with window.keyboard()[Key::Return] == ButtonState::Pressed, but never get it. I printed it out every frame and see that the state goes from NotPressed to Held and back to NotPressed without ever going to Pressed or Released. This seems like a bug to me. How are you supposed to get just the Press event?
    I tried checking for it through the State::event method, but I get repeat Press events. And see no way to disambiguate the first press from repeat ones.
    Ryan G
    @ryanisaacg
    That sounds like a bug, I'll try looking into it and reproducing when possible
    Sergey
    @DuckerMan
    Hey guys.
    I have a problem. When I start example from readme I get nothing
    image.png
    Archlinux
    Ryan G
    @ryanisaacg
    Hm. any errors printed? I have no idea what could cause that
    Caleb Anderson
    @RobotCaleb
    @ryanisaacg Had you looked into conrod integration? immi seems quite bare.
    Ryan G
    @ryanisaacg
    I hadn't really; the reason I had implemented immi was because it seemed relatively easy. Turns out there's a lot of weirdness that happens with font rendering, which is convenient.
    Caleb Anderson
    @RobotCaleb
    imgui is a good one, but I'm unsure how it plays with wasm. I haven't investigated that interaction
    Sergey
    @DuckerMan
    @ryanisaacg No, I have no errors. May be it happen because of my OpenGL 2.1 ?
    Ryan G
    @ryanisaacg
    @DuckerMan Sorry for the late reply, I missed your message. Yes, Quicksilver only supports OpenGL 3.2 and up I believe.
    hughlang
    @hughlang
    Greetings all.
    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.