Small game made for Ludum Dare 45 in 48h.
Roll your way through 7 levels and collect snow to make a happy snowman.
Controls:
- left/right: move
- up: jump
- x/c: reset level
The Ludum Dare page is here if you want to vote: https://ldjam.com/events/ludum-dare/45/snowball
Sweet ! Wish there were more levels. Final score, 815. Definite star for you. Good playing.
I enjoyed this one. The game fits the theme so well, and is so well implemented. Like dw817 I wish there were more levels.
- This is a beautiful game.
Very satisfying (when things go right :).
How did you do the collision detection? Is it based on the sprite tiles? Or is there a separate collision model behind the scenes?
@Mot I'm glad you liked the game!
So the collision detection is a bit of a mess but it works just using the sprite tiles, so it's great to make lots of tiles in a small time.
The main idea is to do "raycast" from 32 points along the ball edge in the direction of the motion. Each raycast go pixel per pixel until it finds a collision. So you find the nearest collision and you know you can move you ball at least that much.
The second part is to find a "normal" to the surface at the point of contact so that the ball can bounce. As the game is using pixel art, it's not that easy. I compute the normal by taking the average direction of every solid pixel in a box of 5x5 around the pixel collision.
Then I had to tweak things because it was not working very well, so I use the normal I found to push the ball outside of the surface. This make the ball shake a lot, so I do all those computations 5 times per frame and use the average as the ball position.
As I said, it's full of hacks and only works because there is only one ball and I can afford extra computation. I would like to revisit this code at some point to make it more robust.
Lovely game! Really fun rolling the snowball around and getting bigger. Such a simple idea and executed extremely well. It goes to show that sometimes a simple concept is all you need.
[Please log in to post a comment]