Lostcast 162: Rain Thief


  • LDG


  • Jammer

    Woo listening now!

    “…or whatnot can you tell me what whatnot is in game mechanics?”

    Ah lostcast, you never disappoint.


  • Tiger Hat

    So @geoffb, I hope your splashes are all being rendered in a single pass - that is; scale canvas, draw all the drops, unscale canvas? That would mean there’s not an increasing performance hit.

    A line algorithm:

    https://en.wikipedia.org/wiki/Bresenham's_line_algorithm

    This is a super useful chunk of code, in any sort of game where you’re working with a grid of some sort - Including a 3D grid - I used this for cube culling when I was playing around with a Minecraft clone, rather than frustum culling, I ran an integer ray-cast, it was a real hassle to implement, but faster than the “correct” way of doing things.


  • LDG

    @salmonmoose said:

    So @geoffb, I hope your splashes are all being rendered in a single pass - that is; scale canvas, draw all the drops, unscale canvas? That would mean there’s not an increasing performance hit.

    <Runs off to change code> …Yeeeeesss.

    I was initially doing that, but then the splashes were rendering only on the top half of the screen. It occurs to me now that I should have just doubled the Y coordinate and offset the arc center instead of translating and scaling each arc call. Good catch!


  • LDG

    Also, I found an article which describes the performance problem I found with batching stroke calls. The author finds that above a certain number of subpaths, the performance degrades. Oddly, his chart shows Chrome have no problem with ~2000 subpaths while Firefox chokes at ~600. This is from 2014 though, so I’ll need to dig into this more.


  • Tiger Hat

    @geoffb said:

    Good catch!

    Yeah, it sounds very much like working with OpenGL where you move the world around rather than objects themselves - a common gotcha is when a whole bunch of objects require the same transforms, and you do them each on their own.

    The line issue also feels like an OpenGL sort of thing, where you get performance out of batching meshes, as there is less CPU->GPU transfer, there is a tipping point where performance hits a wall, and you need to break up the mesh, because the GPU struggles.

    it seems like a similar issue, handling an array of points beyond a certain level hits a different part of the browser (probably to do with resizing arrays).

    Are you building against multiple browsers? I’d have thought you’d just target WebKit/Blink?


  • Patron

    @richtaur

    FUCK YEAH!!


  • Jammer

    I just want to say, man I’m stoked for todays alpha vid. Sounds like so much neat stuff is being added/messed with. I really cannot wait to see what you guys have in store!


  • LDG

    @salmonmoose Yeah, the canvas API works that same way. I think that’s the first point I’d try to hammer home with developers learning canvas: You rotate, scale, and transform the world, not objects. Once you understand that bit, working with the API becomes pretty easy.

    The batching is definitely good practice, but as you mentioned, there are cases where something else becomes the bottleneck. I really don’t know enough about that yet to understand why I’m seeing such a problem with batched stroke.

    As for browsers, we only care about Chromium, since that’s the basis for both NW.js and Electron.

    @Vox Video hype! I’m looking forward to recording today’s video, too. Lots of cool (hopefully?) changes to show off.


  • LDG

    @salmonmoose said:

    A line algorithm:

    https://en.wikipedia.org/wiki/Bresenham's_line_algorithm

    Yeah! That was the one. Those brutal Windows Game Programming books made me code that shit up by hand. Great learning material.


  • Tiger Hat

    @richtaur said:

    Those brutal Windows Game Programming books made me code that shit up by hand. Great learning material.

    Bah! Learning algorithms is fun :) Every so often, you stumble upon a use-case that you just wouldn’t expect, like my implementation of A* in a booking and scheduling application :) Some poor web-dev is going to come across that one day and wonder what the crap is going on - especially as the routine is labeled ‘astar’.


  • Patron

    I’m a bit confused. Which is the new full title for the game?

    • A Wizard’s Lizard 2: Soul Thief
    • Soul Thief: A Wizard’s Lizard 2

  • Patron

    I really support the renaming, It had occurred to me that while this game is technically a sequel it looks so many times better than the first game that relating it too directly to the first game might even hurt it’s perception among those who hear about ST first then look back at the first game. What I mean by that is someone that heads about ST might look at AWL, see it’s a twin stick game and discount ST based on that, when ST looks like it’s going to be so much more.

    It’s my humble opinion that dropping the 2 altogether and going with something along the lines of Soul Thief: A Wizard’s Lizard Story could be stronger in that it would get the attention of people who enjoyed the first game while also not setting expectations of gameplay, which seem very different from the first game.


  • Tiger Hat

    Am I going crazy? I thought Geoff used to be the one that said “Ship it!” after every episode. When did it switch to Matt doing it? Or has it been Matt all along and I just have this crazy implanted memory??


  • Jammer

    Love the talk on the rain solution, i love techy discussions :D. I basically did the same thing for the snowfall in the titlescreen of snowballeffect. Though i’ve been tempted for a while to replace the canvas arc drawing with a proper image, to hopefully make it more performant. Generally that screen runs pretty well on mobile, so it may just be spinning my tires type work.

    It’s interesting with the findings you had on trying to do it with one stroke. I wonder if it’s just how the API works, when trying to draw them across such a large area caused the issue.


  • LDG

    @dannagle said:

    I’m a bit confused. Which is the new full title for the game?

    • A Wizard’s Lizard 2: Soul Thief
    • Soul Thief: A Wizard’s Lizard 2

    We wanted to make sure to get the new name out there and start talking with you guys before we did anything that would be kind of permanent-ish, because we’re trying to feel our way through it. Right now we’re leaning towards Soul Thief: A Wizard’s Lizard 2. One concern we have is that it might be too wordy now. What are your thoughts?


  • LDG

    @islipaway said:

    I really support the renaming, It had occurred to me that while this game is technically a sequel it looks so many times better than the first game that relating it too directly to the first game might even hurt it’s perception among those who hear about ST first then look back at the first game. What I mean by that is someone that heads about ST might look at AWL, see it’s a twin stick game and discount ST based on that, when ST looks like it’s going to be so much more.

    Hey thanks for that! Yeah this echoes what we were thinking, glad to see we’re on the right track :)

    It’s my humble opinion that dropping the 2 altogether and going with something along the lines of Soul Thief: A Wizard’s Lizard Story could be stronger in that it would get the attention of people who enjoyed the first game while also not setting expectations of gameplay, which seem very different from the first game.

    Cool, good points. The longer we’ve been making games, the more it’s driven home that simpler is better. Fewer mechanics, fewer words, more focus, etc.


  • LDG

    @fallse7en said:

    Am I going crazy? I thought Geoff used to be the one that said “Ship it!” after every episode. When did it switch to Matt doing it? Or has it been Matt all along and I just have this crazy implanted memory??

    Patterns are fun to break! Yeah it’s usually Horse Blair. Typically we’d do - outro - playing you out with - shipit -
    but lately IDK what I’m playing you out with, so I just jump to SHIP IT

    Also this way the podcast starts and ends with me and so I get the most airtime HEAR MY VOICE BAHAHAHAHA


  • Patron

    @richtaur

    Why not just drop the 2?
    A Wizard’s Lizard: Soul Thief

    Except Zelda II, I don’t think any Zelda has a numbered release. It is always “The Legend of Zelda: <Subtitle>”. You could do the same.

    • A Wizard’s Lizard
    • A Wizard’s Lizard: Soul Thief
    • A Wizard’s Lizard: Another Subtitle

  • Patron

    @dannagle said:

    Why not just drop the 2?
    A Wizard’s Lizard: Soul Thief

    +1


  • Patron

    Why not just drop the title altogether?

    Hey, wanna play the new release from LDG? It’s called " "


Log in to reply