Sign in to follow this  

Combat Simulation

This topic is 4205 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

Hi there I'm building a browser game, where players have the option of attacking each other with small groups of heroes. The combat is completely simulated, so success depends on preperation and luck. For this I intend to use short dramatized reports so that a battle should look like something like this: Marcus comes eye to eye with Royce Royce pupils shrink and he turns and runs! Marcus sprints after Royce Royce in a clever decoy suddenly stops and places a mean roundhouse in Marcus' face! Marcus, slightly dizzy, grabs Royce and starts choking him! Royce is choking! He tries to hit Marcus, but his arms are too short! Royce is choking! He manages to kick Marcus, but Marcus holds his grip! Royce is getting blue! He tries to kick Marcus, but misses! Royce goes unconscious, Marcus takes a last look and spits Royce in the face. I feel this is more enjoyable (and time intensive to create) than the often seen: Billy approaches Bob Bob runs away! Billy runs after Bob! Bob kicks Billy for 21 HP! *CRITICAL HIT* Billy grabs Bob Billy chokes Bob for 12 HP Bob misses Billy chokes Bob for 12 HP Bob hits for 8 HP Bob does not manage to free himself Billy chokes Bob for 12 HP Bob misses Bob's HP is critically low Billy chokes Bob for 3 HP Billy wins! he gains 10 XP! Billy is now level 13! He steals Bob's shoes! Oh no! DISASTER! They are the wrong size! The thing is, imagining it is all good and well and I've got some ideas on making this work. However, I think you can help me spare me one or two week's worth of hard work if you give me any examples of combat simulations. I'm pretty sure someone has invented this wheel, I just want to improve it. Of course I am more interested in the underlying mechanics than the results I have shown here. Also if you don't know any examples, but have some bright ideas or sudden creativity related to this that is just as welcome. Thank you for your time -Dunam

Share this post


Link to post
Share on other sites
I don't know any examples, but I have some creativity.

You could use checks and conditions to determine what adjectives and descriptive words fit best given the situation.

so you have "Marcus <approaches> Royce"
and you can test such things as whether thay are facing each other, whether they are standing still, etc. to find out what to put for <approaches>

You could come up with a whole tree of things to do, one for each condition you decode to check. It'll still be canned, but it'll sound less canned.

Share this post


Link to post
Share on other sites
Sorry, I should have been more clear.

In my enthusiasm I talked about how I intend to word things.
Yet my real question was not how to make that work, but the underlying conditional system, where we go from hand-to-hand combat to wrestling or running or maybe dangling above a cliff.

The thing is, I haven't seen it before, but I don't dare believe I'm the first to think of creating it.

Share this post


Link to post
Share on other sites
Have you thought about using L Systems (At Wikipedia: http://en.wikipedia.org/wiki/L_Systems ) to generate the output?

They can be used to construct sentances in a similar way that they can be used to generate plant like structures. By useing a set of words that are to be put into the final piece, you could use a random selection to determine the actual words used.

Share this post


Link to post
Share on other sites
sounds like a neat idea.

perhaps have some sort of "assess" or "watch" command where the game gives info
about the enemy. The outcome depends on the skill of the player looking.

low level player sees:
"the big burly warrior clenches his fist and looks at you menacingly."

while a higher level player might see
"The big warrior takes a loose Tiger stance"

a player with high throwing skill would see
"The big warrior crouches low to the ground but his left leg seems
to be stiff from the earlier hits"

a high level beaten up player would see
"the haze of dizzyness lifts just enough to see that the
big goon is can only take 3 more punches before being knocked unconscious."

Basically the idea is the description, effects of the commands are based on
the players own status and skills, not just the target.

hope this helps.

Share this post


Link to post
Share on other sites
I'm not aware of any systems that have done this before, but it's not really my area of expertise. Regardless, the dead-simple way to do this is to have a map of actions (e.g. 'attack', 'run', 'grapple') to phrases (e.g. 'launches a roundhouse kick', 'flees in terror', 'wrestles to the ground'). Results like this will end up looking much the same as the "boring" flavor after the player has seen all of the different phrases, though. Having some sort of short-range "memory" to the actions would improve things. That is, the text for the current action would depend on the text for the previous action or two, with a set of algorithmic modifications. As a simple example, if one character landed a stunning blow on turn 1, then on turn 2, his opponent's action would be prefaced by the phrase ', dazed from the attack, ' (e.g. 'Tom, dazed from the attack, turns to flee'). This allows you to establish a continuity from one sentence to the next, improving the overall flow so it sounds less like a list of events and more like a story.

Share this post


Link to post
Share on other sites
Yes, if this was all I did and I mixed 'em up randomly, it would be a worse system than the simple one. The more detailed the description, the weirder if it reoccurs on a regular basis. So what I'm going for is having maybe 6 phrases for a same action and decide based on some character values (right now I have calm/humorous/dirty/insecure) which is chosen (which still has a small random modifier). In that case, repetition becomes more enjoyable.

Dirty Harry keeps hitting people in the nads, poking eyes out, fishhooking and will generally do anything as dirty as I allow the game to get.

Calm Cephy steps aside lightly, punches to the stomach, sweeps legs, makes armlocks and will generally have a very curt language set.

Insecure Piddleton will run wildly, dodge screamingly, kick uncontrolledly, headbutt accidently and will generally act like a good sidekick.

Humerous Peter will make sarcastic comments while dodging, make sarcastic comments while hitting and generally just make sarcastic comments while making sarcastic comments. Very Verbose.


Yapposai, thanks for the interesting suggestion. It may get too intensive on that level, but if I can include it, I def. will.
I have to admit in my personal fighting experience I've never had the divine sight of seeing somebody would need exactly 3 punches to finish off ;)

Edtharan... I'm unsure how you would implement that... do you mean that the whole battle is simulated by an L system or that the grammar is randomized through such or something completely different?

Derakon, yes that's what intend to incorporate... subtly. If I have a continuity message for all actions and show them 30% of the time or so (the percentage I use such messages in my own writing)

In essence these messages are just a report to show the player where he can improve. But this is the only place where his 'heroes' have autonomy so their personality has to come out in here.

Share this post


Link to post
Share on other sites

This topic is 4205 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this