Hello all,
My friends have asked that I try to write a turn based game
in CF, focusing around player on player turn based matches in which
each player chooses fighting moves to try and bring the others hit
points down to zero. Very similar to facebook wrestling for those
of you who may know that. I have the whole framework up for
everything besides the actual fighting (choosing moves, fighting
styles, buying items, scheduling fights and so on is done). I'm
having a bit of a hard time thinking of a good way to accomplish a
turn based stat calculate that provides the same results to both
clients when random variables (such as odd's of blocking, dodging
etc) are involved.
I was thinking of having on page where the user chooses what
moves they want to use (moves will be sent in groups of three, such
as kick, kick block, or punch, kick, counter, etc) and those move
choices are then sent to a page that calulates if they succeed or
not, and the results are posted to a database. Once they results
are posted, the opposing player sees the results via an ajax page
that refreshes every few seconds. The problem is, the calculate
page needs to know what both players did before it can calculate
anything, such as say player one chose kick, block punch, and
player two chose block, kick, kick, the calculation page needs to
know that player 2 blocked player 1's kick before it can try to
calculate damage done and such.
I know this sounds like a dumb goofy project, but hey, why
not have some fun. Take a break from thinking business code for a
second and have some fun helping a dude make a game. If you are
interested and want to see what I have so far, please visit
www.digitalswordsmen.com/pit_fighter
Let me know what you think and post any ideas/suggestions you
might have. Thanks!