Rant

Pages: 1234
What? I need the values for my sim to be accurate.
Yes, but not until your sim is already done.
closed account (3qX21hU5)
Hmm I must be missing something... What is it that he is trying to build? A 3D Graphics Simulation?
No. A sim like in Deadliest Warrior. Ispil I need to know before hand to finish my sim. It's part of it....

What I mean by Xfactor values is how much each one affects the character.
Why don't you go watch an episode if you want values? I'm pretty sure at the end they have a chart with everything.
No I mean how much the values affect the outcome, not the value of the x factor.
...then watch a few episodes and see if they specify?
The do not.
closed account (3qX21hU5)
Then make up your own strengths and weaknesses. Do research on the 2 warriors you want make a list of their strengths and weaknesses and determine how they should effect the outcomes...

That is if I am understanding this right. I have never heard of this show and only skimmed through 1 episode but seems like they just take 2 different "warriors" and choose their strengths and weaknesses, do a few thousand simulations and determine the winner...

As Ispil said you shouldn't have to worry about the values or attributes of each of the "warriors" until you have the sim done. You don't want to hardcode each of the "warriors" values into the program you want to be able to swap in new "warriors" easily.
Last edited on
Oh wow, it doesn't seem to easy now, huh?
closed account (3qX21hU5)
It is actually a very complicated program especially if you want it to be a realistic simulation. You have factor in a crap load of different variables like each warriors strengths, weaknesses, how them strengths will affect the outcomes, how the determined environment will affect the outcomes, how to change that data into something a computer can comprehend, ect.

It will take you way longer then a 1 day just to do the research needed for a single warrior.
The graphical aspect of the program isn't all that important. I don't think the simulation is in 3d. That would complicate things and there would be no way to get an accurate 3d sim. You should still keep in mind the 3d aspects like from what height they will be fighting and from what distance. Have you started yet? We can split the tasks into two and you'll make a weapon class. Do some research on weapons and make enums with the different extensions of a weapon I can make the class that puts it together. We can start thinking about armor later. Make the class as general and easy to change as you can. Do some research on what weapons are weak and strong. This should be obvious but you must include a range variable to store the range of the weapon, it must be separate from the damage of the weapon, so don't give arrows extra damage from range. We'll need another way to handle that. When you are done with the weapon class and functions post it here and we'll work out our next objectives.
Only make a weapon class for now don't make it a whole person class I'll focus on that. You don't actually have to do any calculations except for finding the weapon's pure damage, accuracy, range, weight, and all the variables you are going to use. (I will prefer it if they are private)
Are you up for the challenge Fred?


EDIT:
variables you will probably need:,

All of these variables should be independent of the character who uses the weapon.

Think of 100 damage as a lethal attack. The opponent doesn't matter for 
now, if the opponent is weak we will do that later so don't worry about that
now. The class needs functions that allow us to access the variables. The 
class also needs a reload functions that returns the reload time.

pureDamage // from 0 and up. 100 will be lethal in most cases but because
                    // we want to be able to compare bizzarre warriors we want
                   // to keep it flexible. Also armor can make the hp higher.
bleedingChance // from 0 to 100. (this is a percentage)
bleedDPS // damage per second, from 0 and up (how much damage you do
               // if the opponent does start to bleed)
range // the maximum range of the weapon, in meters.
accuracy // the accuracy could be increased by some add-ons like scope
              // on a sniper and a silencer would give you extra stealth.
stealth   // a rating of the weapons stealth rating (generally how loud it is)
              // from 0 - 100
reloadTime // in seconds, 0 if no reload needed. I think you have to make 
                  // this a double to make it work properly.
name         // make this a string, remember to include string header file.
                 // name isn't necessary but it would be quite boring with no info
                // to show while the simulation is running.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Start out simple. Always keep it generall! This will be part of a bigger
// class called warrior that just puts it all together.

class Weapon
{
private:
      int pureDamage 
      int bleedingChance 
      int bleedDPS 
      int range 
                // should be 0 for swords and close combat stuff. (unless it is an
               // extra long one which could give you one extra attack before
              // they reach you.)
     int accuracy 
     int stealth   
     double reloadTime 
     string name         
}


If I missed something please say it :)
Last edited on
You missed the part that FredBill claimed the simulation program would be easy to build, which implies that he does not need help or hints.
Even if it is easy for him, I want to make sure he makes something that works with my part of the program. I don't think it is all that easy though so I just included it to make sure he doesn't make something like this.

1
2
3
4
5
6
7
8
9
10
11

int main()
{
    int hp = 100;
    int hp2 = 100;
    cout << "Ouch that hurt\n";
    hp -= 13;
    cout << "The ranger shot him with a shot gun";
    hp2 -= 20;
    // you get the idea. This would be really stupid :P
}
closed account (3qX21hU5)
You also have to factor in much more variables then just the basic ones you listed.

For example lets say you are running a simulation with guns (IE One gun vs another). You will have to factor in the weight of the item for fatigue, the rate of fire, mag size, overheating of the barrel, the chance of a cartridge jam, the range of the gun, how accurate the gun is, if its better in squad based combat or single combat, and on and on.

That is only for a single weapon, and that weapon only plays a minor part in the whole simulation. Other parts would be what type of terrain you would be in, what type of combat it is (Two people, or teams of people), supernatural elements (Like tests with vampires, ect), the physical and mental attributes of each warrior, and on and on.

You can't just skim the surface if you are aiming for a realistic simulation. You have to factor in as much details as you can. My guess is you will end up with well over a hundred different "attributes" to factor into the simulation when you are done, and each of them will need to be researched fully to get a accurate result.

So I wouldn't underestimate this scope of this project Fredbill it is actually a very large amount of work for experienced programmers to do.
Last edited on
WHAT THE HELL. I'd usually backdown but I have accepted the challenge. Once I get some free time I will start. I'm gonna do something really simple at first, and then work my way up.

I don't think it's that hard. But the real pain in the arse is thinking up the math for the x factors.

I think instead of a traditional health system we can make body parts.

For example getting hit in the head is an instant kill, 2 shots to the chest is an instant kill, shots to the arm and legs decrease the attack/defence, etc.

I'm going to start now by getting class structure and such ready.
Last edited on
To simplyfy it you could include a variable with attacksPerSecond this must of course be double or float because not all weapons attack once or more every second. Keeping it generall is important zereo.

Like I said as a comment:
// Start out simple.

Attacks per second is generall so that must be added. Weight will also be a factor, I said that in my main text. Forgot to include it in the example program. It is still just a start and there may be reasons for deriving annother class, but we should wait with that and just keep it simple for now.


weapon plays a minor part in the whole simulation.

This may be true but it is still a good place to start. Starting with terrain wouldn't make that much sense. Starting with the person makes sense but I will make a person class while he makes weapon class. If you want you can take part in the project, it is not that serious but it would be cool to simulate a fight between whatever you can imagine. Supernatural creatures abilities can be a derived class from weapons because the information still applies. (weight will be 0 if the weapon is part of the body)

Fred what compiler will you use? Is it ok that I use windows exclusive features? I think I'll work on an armor class because for the warrior class I need to already have weapon class and armor class done.
Last edited on
closed account (3qX21hU5)
I might jump in if I get some free time cause it does sound like a cool project. Though I will let you guys take the reigns for now and see how it goes.
I think instead of a traditional health system we can make body parts.

While this may sound more realistic I don't think it is unless it is implemented really good. A better system would be to just take 5 hp for arm, chest 10 hp, heart 70hp and bleed... Head will be instant kill unless he have some sort of armor. It will be much easier to calculate with numbers instead of calculate with body pieces. This doesn't destroy the point of armor though. We will find a way to specify what body part was hit and if there is armor there. Don't think too much about the damage and formulas for finding it. That shouldn't be a part of weapon class. just make a good interface for storing the attackdmg, attackspersec, etc. (The variables I listed) Make functions for changing the variables. Don't be specific. You shouldn't have to use a number once in the holy class. At least not yet.
Last edited on
Well I worked on it for like 30 seconds then got distracted. Lol.

I'm using VC++, so I don't mind if your code is windows-only.

I was thinking about using fstream to read xfactors from a notepad file to minimize code.

So 30 seconds to a minute of typing I got this http://prntscr.com/15kprx

Don't worry, I'm typing parameters to the constructor currently.
I have a basic idea of the class so I'll crank out some code.
Last edited on
Pages: 1234