Trampoline Fury

Hello Everyone.

I have an early build of a game I have been working called Trampoline Fury. The game is really simple: you control a character who can bounce on a trampoline and do tricks. All movement and tricks are performed via mouse gestures. I am curious to gather feedback on the game before I try to finalize it.

Work in progress:
No sounds yet, clean animations, background graphics.

Please give it a shot:
http://www.krackalack.com/highscores/displayscore.php

Thanks and have fun!

190230--6739--$trampfuryscreen1_879.jpg

Hah, cool idea and it’s fun to play. I like how you can use various mouse gestures for spins and the like. :slight_smile:

Kind of impossible on the laptop touchpad, but somehow I stil had fun. Nice!

This is a really cool idea - I love it!

I’d definitely like to see more moves… this could be the Tony Hawk of the trampolining world!! :smile:

Haha, yeah more moves will make it into the final version. Currently, there are more moves than what the tutorial shows. You can do an aerial by drawing a circle starting at the top. You can also do the splits by dragging down and to the left.

very innovative… I like this! :wink:

Wow, that game is really fun! I likee alot!

coolman, can u share the code to us???

I’d be happy to help you out with a specific question. Are you wondering about the mouse gesture code?

Very fun, nice jump mechanic. I second the comment about the Tony Hawk of trampolining :slight_smile:

Works great with a Wacom tablet too :slight_smile:

Very cool. I am very interested in the mouse gestures. I have tried to send you numerous PM’s, but they seem to only reach my outbox. Please send me a PM if you are willing to share some of the code on the gestures.

Weird, I actually got your PMs.

Anyway, since I figured a few people might be interested in how the mouse gestures are done I am going to put the overview here…

I’ve learned during this project that mouse gestures are actually really easy to capture. Mostly, it just takes some tweaking to get it right. Start by determining the slope of each mouse movement the user makes.

m = (y1-y2)/(x1-x2)

Once I have my slope (m) I compare it to a list of predefined slopes that tell me which direction the mouse was moved. For instance, if the slope is greater than 2 I know the user dragged upwards.

I store each of the movements as integer values. I started with 0 moving clockwise around in a circle. I have 8 directions that I handle. Ie, 0 is up, 2 is right, 4 is down, 6 is left, and the odd numbers are all diagonals.

Once the user releases the mouse button, and I know their gesture is complete, I combine all of the directions they moved into a string. For instance, if the user dragged upwards you might have “00010007000001”. Obviously, most users will have slight variations in their gesturing, so my next step is to clean it up for them.

The first step in refinement is to delete the first and last characters of the string. I’ve noticed that a lot of users will drag at unintentional angles when they first click and when they let go. By deleting the first and last chars you remove that issue.

The second step of refinement is to remove random characters. For instance, in my example above I would remove the 1 and 7. I can do this by looking for characters that are not contiguous.

Finally, I condense the string into the smallest form possible by removing contiguous chars. In my example above this would result in the final string: “0”.

In order to see which gesture the user just performed I run their gesture through the levenshtein algorithm against all of the allowed gestures. This gives me a score for each of allowed gesture. Whichever one has the lowest score is the closest match to the user’s gesture.

Using our example from above, the user gestured “0”. In my game I define bounce as “0”, spin left as “6”, spin right as “2”, etc. The lowest levenshtein distance is to the bounce gesture, therefore I know the user just attempted to bounce.

I hope that all makes sense, but if you have some questions let me know.

Also, here is a link to an almost compiling levenshtein distance calculator.

http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_levenshtein/

Enjoy!

That is Creative, that is what missing to most game. You have potential to go on the Wii, I am not kidding.

For some simple experimentation you could try UniWii, so you can use the Wiimote on your Mac OS/Windows ;).