April 29, 2024, 10:23:54 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


A Little Help

Started by Zen, November 27, 2006, 03:00:51 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Zen

Hi guys.

Well todays little problem for me is... I am currently working on some daft bits and pieces for a game and I am really puzzled at the moment on how I am going to calculate statistics and battle results. The game won't be a 2D or 3D game actutally, but it will be a sort of automated game where you train your player with various skills then fight other players. I know this is all going to be a lot of maths to work out who should win etc, I can't even get my head to start working it out so I just wondered if anyone has done anything like this before? Where numerous values need to be taken into acount, just to get me on the right tracks.

Lewis

Ionic Wind Support Team

Used to play D&D on paper when I was a lad.  Just roll the dice to generate stats and when a battle happens between two players another roll decides the outcome.
Ionic Wind Support Team

J B Wood (Zumwalt)




struct MonsterID
{
   int HP;
}

// some sub
MonsterID *Monster;
Monster.HP=100;

int i=0;
i=rnd(20);
if(i=0);
i=1;
WeaponDmg=10;
// did I hit?
if(i>10)
   Monster.HP-=WeaponDmg;


That should work, just threw it together in the thread.

Zen

lol Just go with the flow eh Jonathan? Well thats what i decided initialy, and that part is fairly simple. However i will be taking AT LEAST the following user statistics/skills into acount...

Health Points
Armor
Fitness
Tactical Ability
Weapon Damage

Obviously, if someone has better Armor and a better weapon (causes more damage), if the oponent was hugley better with tactics, he may still win etc. To make it realistic I can't just say whoever is stronger and has the better weapon wins. This is why i can't even decide what to calculate first, so i thought i would seek here incase anyone had any experience in making a game like this before.

Paul, what is D&D? I've not heard of that before, only thing close i've heard of is DoD :P What an awesome game that is.

Lewis

Ionic Wind Support Team

Dungeons and Dragons.  Fantasy role playing without the PC.
Ionic Wind Support Team

Zen

Ohhh yeah I know what you mean. Never played it myself but I've obviously heard of it. Still quite big today i believe

Lewis

Blue Steel

Who Gets their swing off first : inititive = weapon speed + Agility bonuses +racial bonuses +D6

To hit ArmorClass or did it miss = D20 - Ac bonus and also minuses depending on type of weapon against type of armor.. if its a 20 then its a critical hit.. then roll on a table to see what extra damage is done.. if its a 1 then its a fumble .. roll on a table to see what misfortune happened

Damage How much damage weapon does Dx where x is the random number up to what the weapon can do.. eg: dagger 1-3 sword 1-6 and also weapon bonuses on damage 

Its not that hard to simulate the Die rolls but to put it all together takes time ;)

(i did something similar back on the goodf old Commodore C64 and also on the Amiga)
  http://www.codingmonkeys.com
Covers many languages including Aurora , IWBasicEbasic (Ebasic, IBasic) , Creative Basic

John S

Remember Tunnels of Doom on the TI99a?  My brothers used to play D&D, then we played ToD for hours.
The graphics were very simple (limited by technology), but it was great fun.
John Siino, Advanced Engineering Services and Software

Blue Steel

yeah... these days its more about eye candy than game play :(
  http://www.codingmonkeys.com
Covers many languages including Aurora , IWBasicEbasic (Ebasic, IBasic) , Creative Basic

J B Wood (Zumwalt)

I'll be releasing the Flying Invaders code sometime soon, got issues at the moment with the invaders firing back, simple fix, just haven't found the bug.
Once I do, you can take a look at how I handle damage control and hit locations.
There is alot in that code.

Zen

Thanks for the advice guys. I will try and piece some stuff together and ill see how it goes. I just didnt want to jump into the deep end and then realise all my code was a total mess. So thanks a lot.

Lewis

J B Wood (Zumwalt)

Jump in anyway, only way to learn it, you always have the option to rewrite it once you have chicken soup.

MikeHart

Quote from: Paul Turley on November 27, 2006, 04:32:03 AM
Used to play D&D on paper when I was a lad.ÂÃ,  Just roll the dice to generate stats and when a battle happens between two players another roll decides the outcome.
D&D... 1982, man that were times. Sitting together till the morning comes, slashing orcs and ghouls, getting pissed, happy, angry, whatever. Sometimes I miss these days.

Ionic Wind Support Team

Yes it would have been around 1982 for me as well.  Every day after school the gang would get together in the cafateria.  Lots of fun.
Ionic Wind Support Team

Zen

... I wasnt even born then :(

Lewis

Rock Ridge Farm (Larry)

In the early 70's we played rogue - probably one of the first D&D games.
I wrote my first version of Star Trek in 74 I think.
We had fun games like "Hunt the Wumpus" and a couple of others I can not remember.
But then Unix ran in 8K of memory with 16 ports for users, disk drives were as big as washing machines
and we marveled at how small they were. :)

LarryMc

Lewis,
You mean I've got socks older than you!
Thanks a bunch! ;)
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Steven Picard

Quote from: Larry McCaughn on November 27, 2006, 01:54:27 PM
Lewis,
You mean I've got socks older than you!
Thanks a bunch! ;)
Do you think it's about that time to change them.  ;D

LarryMc

Change them?, no!
Turn them inside out? You bet! ;D
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Zen

He he, Yeah I am a bit of a baby in the group. Well second youngest anyway. But I enjoy reading the topics about the things you all did when you were younger, makes me wonder what i will be telling younger kids one day. When all we had was a dual core amd processor and dual screens to work with... ohh yeah and only 1gb of ram :P

Lewis

Bruce Peaslee

Quote from: Larry McCaughn on November 27, 2006, 02:03:53 PM
Change them?, no!
Turn them inside out? You bet! ;D

Better keep your boots on, partner, unless you want to set off the smoke detector.  ;)
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

I did that once trying to dry my socks in a microwave oven ;)
Ionic Wind Support Team

LarryMc

At least you didn't dry the cat! ;D
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Rod


LarryMc

Sometimes I feel like the cave man in the commercials. :D
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library