   What do you think of my Combat Engine?
  I''ve been working on a combat engine, and I have a rudementary demo showing off what it can do, please comment!http://legion.gibbering.net/deque/download/combat.zip   u r what u bcome
  uhmmm.. I guess its okay. ;  Do you think it is a good idea to have the attack/agility/defence/accuracy be tied to experience points? IMHO, I think it makes it more true to life, because the better you get at something the better it sticks to you.   u r what u bcome;  That is well done.  I like the idea of your using a skill (def, att, etc) upping it''s lvl and exp. Though I would get away from the floating point stuff since you are getting integer points added to your exp (93.9991% exp on attack? instead go for 94/100 (94, what you have; 100, to next lvl)I am planning on using something similer for weapon and magic. And I think I will do the same thing you are doing with att/def/dex etc. Great Job!Erik of Ekedahl I am a madman running through the halls of computer latency, freeing the dark-suckers from their pedistals of atrophy... man I need some sleep. ;  Yo, couple of things, 1. GOOD 2. to get the selection... dont use cin.. or cin.get... #include <conio.h>getch() //returns a character, which can easily be interpreted... (the advantage is the user doesnt hafta hit enter)switch(getch()){case 'Q':case 'q'://QuitStuff Herebreak; //breaks out of the switchcase 'A':case 'a'://AttackStuff Herebreak;case 'Y':case 'y'://GetStatus Herebreak;case 'E':case 'e'://GetEnemyStatus Herebreak;default://They didnt hit any of the keys you wanted them to}the thing with switches is that they will keep on going right on down the line untill they hit a break, keep that in mind   [edited by - Ademan555 on February 8, 2004 9:42:48 PM];quote:Original post by Ademan555  getch() //returns a character, which can easily be interpreted... (the advantage is the user doesnt hafta hit enter)The disadvantage is that <conio.h> and its associated functions are not Standard, and thus are not supported by all libraries.Use [std::]getchar (in <cstdio> - <stdio.h> if you''re programming in C) instead. ;   getchar is to the same effect?  ;  Thanks!quote:Original post by chaim79  Though I would get away from the floating point stuff since you are getting integer points added to your exp (93.9991% exp on attack? instead go for 94/100 (94, what you have; 100, to next lvl)Actually it does use integer, the floating point is just to tell you that you got 93.99991% of the required exp before upping. (maybe I''ll post some of my trade secret code to show you how i do it )class Character {protected:    //...    long accuracy, xAccuracy;    //...    virtual long computeExperienceRequiredForIncreasing(StatisticType which) const;    //...public:    //...};  cout << "Accuracy XP Collected: " << float(xAccuracy) * 100.0f / float(computeExperienceRequiredForIncreasing(ACCURACY));  quote:Original post by   2. to get the selection... dont use cin.. or cin.get...Hey! Can''t a programmer be lazy when making a demo? (I''ve uploaded a modified version, it is easier to beat the computer... NOT [really]!);  what is the syntax of std::getchar? i looked through my headers and i couldn''t find it... ;#include <cstdio>int main(){    int in = std::getchar();    printf("in==%d", in);    return 0;}More comments please!   [edited by - bcome on February 10, 2004 5:51:38 PM]