Text Fighting (Gladitorial) Sim

G

Garret Dupont

I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz
 
G

Garret Dupont

Pier-Luc Caron St-Pierre said:
Take a look at Ryan Bates's Ruby Warrior?

http://github.com/ryanb/ruby-warrior

Yeah ive taken a look at that. Not really what im looking for though,
this is more of a simulation, you tell the computer to use these two
gladiators and then it does the simulation on its own, figuring out the
outcome with some randomness added with the skills of the fighter. Then
prints out a play by play to the screen and file name. The play by play
lines would come from the program or a seperate text file based on how
well the attack or dodge was executed.
 
H

H- 16

Garret said:
I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz

You'll want to use .rand for a certain number and add it as an attack
modifyer... basically adding it in, then subtracting it when you don't
need it. Or just use a variable for base stats.

Printing on screen is easy,though if it's like R-warriorwith it's
showing positions on screen you'll want to use print and \n for a new
line.

Though for a text doc, you might want to use a Yaml doc and just read it
with notepad or WordPad.
 
A

Aldric Giacomoni

Garret said:
I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz

Sounds like you should take a look at the seventh Ruby Programming
Challenge For Newbies:
http://rubylearning.com/blog/2010/02/23/rpcfn-broadsides-7/

The submitted server and winning codes may help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,158
Messages
2,570,882
Members
47,414
Latest member
djangoframe

Latest Threads

Top