Advertisement

What do you think of my Combat Engine?

Started by February 06, 2004 06:50 PM
11 comments, last by bcome 20 years, 11 months ago
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
<!-- ................................ -->u r what u bcomeMy (XHTML 1.0 Strict) Website
uhmmm.. I guess its okay.
Advertisement
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

<!-- ................................ -->u r what u bcomeMy (XHTML 1.0 Strict) Website
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.
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 Here
break; //breaks out of the switch
case 'A':
case 'a':
//AttackStuff Here
break;
case 'Y':
case 'y':
//GetStatus Here
break;
case 'E':
case 'e':
//GetEnemyStatus Here
break;
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]
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
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.
Advertisement
getchar is to the same effect?
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
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]!)
<!-- ................................ -->u r what u bcomeMy (XHTML 1.0 Strict) Website
what is the syntax of std::getchar? i looked through my headers and i couldn''t find it...
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
#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]
<!-- ................................ -->u r what u bcomeMy (XHTML 1.0 Strict) Website

This topic is closed to new replies.

Advertisement