Character control programming ?

This topic is 5144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello. "gameplay" programming tutorials/articles/... are a bit hard to find, so I'm posting here so maybe you guys can help me. Do you guys have any links to pages where it is thoroughly explained ? With "gameplay" I mean, analyzing user input, moving a 3D model or sprite with a specific speed, special input detection like a hadoken combination (down, down-forward, forward + Punch), anything that has to do with input and the way your character moves.I know if I write them myself without reading something about it I'll make something complex and slow, wich I absolutly don't want to.Someone else will see my code and will start laughing out load because there are much easier and less complex algorithms available or because there's some "standard" and widespread way of doing such things. I mean just like if you saw someone else writing weird and complex collision detection routines because they don't know much or didn't read some paper about it.I hope you guys understood what I meant. Thank you in advance !

Share on other sites
Quote:
 Original post by Haido...special input detection like a hadoken combination (down, down-forward, forward + Punch)...
Recognition of Handwritten Gestures. If you store the extent of deflection as a vectors, you can provide far more robust and accessible combination detection than with a digital "down", "down-right", "right" -type scheme. If you want the latter, however, you merely need pattern recongition on data in the input buffer with fixed interval sampling.

Share on other sites
Quote:
 Original post by OluseyiIf you want the latter, however, you merely need pattern recongition on data in the input buffer with fixed interval sampling.

I wouldn't even go this far and simply use a tree/trie structure:

down +-> down-fwd. -> fwd.-punch => hadoken     |       +-> up-fwd. -> fwd.-kick => lightning kick    ...     |     V    duck (...and process the rest of the input chain)

Are you aiming at a 3d fighting game like the Tekken-series?
Maybe this thread will provide some help.

Pat.

Share on other sites
I had a input function which recieved keyboard intput and a player class, and I used it this way:

1) Tanslate all keyboard input into character commands (duck, jump, punch, move etc).
2) Send the new command to the player instance
3) The player class saves the command into a list holding the last few commands (however many you need, 5 should be enough).
4) In the player update() function check the current list for special moves, if one is found then set the player to do that, if you don't find any just execute the current base move as normal.

This allows you to bind any keys to execute the commands because inside your player thinking function you just look at commands - and your AI can just pass in commands to the player its controling and you don't need any special code to deal with it. It works for all sorts of games and is quick and simple.

Share on other sites
I agree with darookie you should use a tree structure. Then have some kind of timeout for combos so if they dont hit the next button in the combo in that time limit (half a second or so) then it should execute what you have done up to that point and return to the beginning of the tree. You could even have different time limits depending on the combo.

And don't forget that you will want to start animating some combos before you are done entering series of moves. Like finishing moves to a series of hits.

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 14
• 9
• 10
• 12
• 17
• Forum Statistics

• Total Topics
632910
• Total Posts
3009174
• Who's Online (See full list)

There are no registered users currently online

×