My Snowboarder game with online leaderboard

Make loops and try breaking the online highscore in my Snowboarder game:
https://sharemygame.com/@AXP/snowboarderxl

1 Like

Congratulations on your game :partying_face:

Really good use of interface and Buttons, it is really good to save the score online, is that also aprt of some course or you dounf it by yourself?
It was very fun to play your game and to figure out the best way to score most loops :slight_smile:

Thank you, I am glad that you enjoyed playing my game. The most challenging part was to implement the loop counting. Implementing the online leaderboard was not part of the GameDevTV lessons. A samyam youtube-tutorial has inspired me for adding this feature to the game.
PS: congrats to your score :muscle:

How did you add the loop counter ?

There might be a couple of different algorithms for that, I implemented it in the following way:
I have divided the full loop (full circle) into 6 segments of 60 degrees (taking the terrain slope of the starting position into account) and in each frame I check the previous and the current rotation of the player. If the rotation gets into a new segment (at forward rotation), then a rotation-step-counter is incremented (at backward rotation the counter is decremented). Finally the value of the counter is checked. If it reaches 5 or -5 (yes it is not checked against 6 due to a bit of tolerance), then the player has managed to take a full loop, so his score points will be incremented and the rotation-step-counter will be set back to zero.

Privacy & Terms