Back to building my snowball game


  • Jammer

    Due to hiatus with job changes, and trying to ramp up web dev skills to land said job, I put my snowball project on hold for a while. Back to it though, I managed to get segment recycling, and random generation working. Basically it’s an infinite runner now with the NES 2d racer type feel: http://projects.agmprojects.com/snowballeffect/

    Now I just need to start re-integration stuff to collide into, make it a game to lose, and give the player elements to work towards :)


  • Tiger Hat

    Looks pretty cool! What’s segment recycling?


  • Jammer

    The ground is made up up little chunks in order to have it curve, and alternate in height as the game goes on. Originally I built out the level immediately on load, and you would pass through the array of segments. So position was dependent on array index, and likewise was the drawing of the ground and so forth. Segment recycling refers to removing the elements off the screen from the array, there for changing how position works. I then also implemented object pooling with the segments, so I could save some GC calls. Then there’s the simple ability of adding on new segments at the end of the array as the game progresses.


  • Tiger Hat

    Ah, I see - makes sense!


  • Tiger Hat

    From memory when there was a bend to the left or right, the main road moved in the other direction - it feels a little like you’re piloting blind when there is a sharp bend.

    I think I found a bug (although I haven’t managed to replicate) moving to a different tab the snow-ball continues to grow.


  • Jammer

    @salmonmoose yeah i probably need to do some more clever decisions in the randomness of the path for sure. Build up to a bend more with a less severe curve. I also plan to add a fog of some kind so things look a bit more natural. In terms of the ball growing, it should continue to do that until a certain size. I still need to mess with it a little bit, and figure out how fast i want it to grow and that, but that’s what it should do. Switching tabs should trigger a pause, as melonjs has that baked in. Though it’s possible i might need to fix the growing tween/timer with it.


  • Tiger Hat

    I’m not sure the bend was too severe, but starting the road in the centre of the screen and bending (for instance) right, means you’re missing a lot of lead, if you pushed the road left, there’d be much more visibility.


  • Jammer

    Ah i see what you mean. Given it takes up the whole width of the screen though, I’m not sure if moving it would be ideal. I could consider adjusting the field of view though. Might be worth while playing with those numbers a bit.


Log in to reply