Jump to content
  • Advertisement
Sign in to follow this  
TiberiusOne

Algorithm for generating a (pro) wrestling match

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've tried my hand at figuring out one myself, but there just so many things that can happen in a match that I just can't keep track of my algorithm. For example, how would an algorithm for generating a normal 1-on-1 match look like? 1. Determine "active" wrestler based on attributes such as speed, energy, etc. 2. Active wrestler determines action to perform (performing a wrestling maneuver, refbumping, getting out of the ring, etc.) 3. If wrestling maneuver: Determine if passive wrestler will a) avoid the move b) reverse the move or c) receive damage from the move ... What do you think? It seems reasonable to me to generate every "match event" by having a loop run as long as there is no winner determined. But what if, for example, the passive wrestler is in a submission hold from a previous match event? What happens to Step 2? What action should the active wrestler then perform? A lot of questions that I need to straighten out... I would appreciate any help I can get! [Edited by - TiberiusOne on April 5, 2006 8:50:51 PM]

Share this post


Link to post
Share on other sites
Advertisement
You could throw in a couple states like FAR_AWAY, IN_HEADLOCK and BEING_PINNED to determine your actions. So, for instance

Round 1:
Determine Initiative
Initiative winner is FAR_AWAY and thus can perform the following actions:
DoRunningClothesLine()
DoRunningJumpKick()
DoTauntOpponent()
etc...

Let's say is chooses DoRunningClothesLine(), now he's running towards the opponent, so the defender is in the DEFENDING_RUNNING_ATTACK state and can choose the following.

DoSideStep()
DoPowerfulKick()
etc...

After that has been resolved, the defender and attack trade roles. You check the new attacker's state and see what actions are available in that state.

To recap: Each wrestler has a state. Each state allows specific actions. Actions can modify the state and specific attributes of either wrestler.




Share this post


Link to post
Share on other sites
Wrestler states seem like a perfect way to determine what actions are available. I am thinking of having a table of moves. Perhaps I could include a field in that table that describes when it can be performed, for example CanBePerformedWhile

Round 1:
Determine initiative
State of initiative winner is FAR_AWAY and thus can perform the following actions:
* Run towards opponent. State is now RUNNING_TOWARDS_OPPONENT
* Climb the turnbuckle. State is now STANDING_ON_TURNBUCKLE
* Get out of the ring. State is now OUTSIDE_RING
...

Let's say initiative winner is RUNNING_TOWARDS_OPPONENT. The application then selects a move from tblMoves that can be performed while wrestler is in a state of RUNNING_TOWARDS_OPPONENT. The application chooses "Clothesline".

The defender is now in a DEFENDING_ATTACK state and can choose from the following actions:
* Avoid attack, state => AVOID_ATTACK
* Reverse attack, state => REVERSING_ATTACK
* Receive attack, state => RECEIVING_ATTACK (or something like that)

Let's say that the defender is in a state of RECEIVING_ATTACK. The application will then calculate damage done, by fetching the base damage from the tblMoves table, then adding upp and subtracting damage depending on how the attackers attributes compare to the defenders.
The application will then select an appropriate commentary line from tblMoves, such as "W1 turns W2 inside out with a vicious clothesline!" and then prints it.

The defender is now in a LYING_DOWN state, which in Round 2 could enable actions like:
* Pin()
* PutInSubmissionHold()
* Moves like "Elbow drop", "Knee drop", "Stomp", etc.

[Edited by - TiberiusOne on April 6, 2006 7:56:29 AM]

Share this post


Link to post
Share on other sites
I'm thinking the Moves table could look something like this:
__________________________________________________________________________
|ID|Name |Dmg| Type | Comm_Received | Comm_Avoided | Comm_Reversed |
|1 |Clothesline|10 |Strike|W1 turns W2 |W2 skillfully |W2 manages to |
|inside out with|avoids W1's |reverse W1's |
|a vicious |clothesline |clothesline! |
|clothesline! | | |

Or perhaps the commentary should be stored in a separate table, tblCommentary
_________________________________________________________________________________
|ID|Event |Text |
|1 |CLOTHESLINE_RECEIVED_1|W2 is turned inside out by W2's vicious clothesline |
|2 |CLOTHESLINE_RECEIVED_2|W1 runs W2 over with a ruthles clothesline |
|3 |CLOTHESLINE_RECEIVED_3|W1 knocks W2 down with a weak looking clothesline |

This way, I could have different commentary depending on the damage that the move does

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!