Back to the Vavoom Forum Archives
Crimson Wizard
Janis Legzdinsh
Well, first of all I want to say, that it would be great to have Vavoom C class hierarchy with brief explanaion of what they do.The main classes are: Object - base class for everything. Thinker - base class for all level objects (actors, doors, etc.) Actor - base class for all actors. Player - implements player specific things. Weapon - base class for weapons. Window - base class for user interface objects (currently not everything).
1) is the letter case is essential in Vavoom C's variable names? (i.e. is 'MyVar' is treated the same as 'myvar'?)Yes it is, MyVar and myvar are different variables.
2) what Actor, Botplayer and PlayerPawn classes are doing?Actor is base class for everything that is represented with sprites or models. BotPlayer implements bot AI. PlayerPawn is base class for player's actor, nothing special about his one.
3) what is the difference between LocalSound and Actor's PlaySound functions?LocalSound is available only on client side, it's used by user interface - menus, intermissions, etc.
4) finally, how does StatusBar (client/statbar.vc) knows about player (or client?)? Where 'cl' pointer is defined? I ask this just for information, to be completely aware of what I am doing when modifying this file.cl variable is only thing available for status bar. It's defined in common/clvars.vc, type is defined in common/types.vc, additional fields in hexndefs.vc.
Crimson Wizard
BotPlayer implements bot AI. PlayerPawn is base class for player's actor, nothing special about his one.Well, as I understand this, class Actor deals with thing states and animation, class Pawn - is monster AI, and monster classes (Bishop, Ettin etc) just add specific AI to monsters. Am I right? Then, what is need of PlayerPawn anyway? What is it for? And about PlayerBot - you mean it can be used to create computer-controlled players (with full player functionality)? (By the way, I just wonder, aren't you planning to add Botmatch mode to Vavoom <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> )
Firebrand
Crimson Wizard
Firebrand
Crimson Wizard
Firebrand
Crimson Wizard
Firebrand
Janis Legzdinsh
Well, as I understand this, class Actor deals with thing states and animation, class Pawn - is monster AI, and monster classes (Bishop, Ettin etc) just add specific AI to monsters. Am I right?Right.
Then, what is need of PlayerPawn anyway? What is it for?It's basicly a base class for PlayerFighter, PlayerCleric, PlayerMage and PlayerPig. And MO property in Player class is expected to be a PlayerPawn.
And about PlayerBot - you mean it can be used to create computer-controlled players (with full player functionality)? (By the way, I just wonder, aren't you planning to add Botmatch mode to Vavoom)Yes, that's what it does. And you already can have a botmatch.
Why player's health on the statusbar cannot go above 255? I set new player attribute - 'MaxHealth', that raises with experience level, but when it becomes more than 255 current health value shown on statusbar drops down (it looks like it has only 1 byte for value storage). (REAL health value - that's in BasePlayer class - change normally) And, anyway, where client_state_t take current health value from?It's sent over network as byte, so on client you get only last byte.
Crimson Wizard
Yes, that's what it does. And you already can have a botmatch.<!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> But how???!! I've suspected that I can, but I haven't found the way I can launch a botmatch.
It's sent over network as byte, so on client you get only last byte.Hmm... but mana value CAN go over 255 limit. May be I should try to add another one param to Player class that would represent his health. <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> EDIT: Yes! That worked. I set new variable in Player class (named it Health2) and replaced Health variable everywhere in Player.vc, and also in statbar.vc (used cl->health2 field). Although, I had to add following block in all places where health is changed:
if(Health2 > 255) Health = 255; else Health = Health2;if I wouldn't do this player appears dead at startup since Entity->health = 0. However, he can play (!), but his view is rotated 90 degree right.. this lookes like player is a zombie with broken neck... <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Janis Legzdinsh
<!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> But how???!! I've suspected that I can, but I haven't found the way I can launch a botmatch.Start a multiplayer game, then go to console and use command addbot to spawn a bot.
Crimson Wizard
Janis Legzdinsh
By the way, why fragged players do not leave their weapons? (or it is Doom dm rules?)Doom engine games didn't have such a feature.
Firebrand
By the way, why fragged players do not leave their weapons? (or it is Doom dm rules?)Doom engine games didn't have such a feature. But it can be implemented with some prog tweakings, heh! <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->.
Crimson Wizard
if(Health2 > 255) Health = 255; else Health = Health2;Well, this actually was wrong and not needed at all. Then, I'd wish to ask: 1) What is bFloatBob flag in Actor (in which thing types it it used) and why there is such a strange string:
Health = P_Random();under condition "if(bFloatBob)" in OnMapSpawn() function?
Janis Legzdinsh
Crimson Wizard
Actor a; Pawn p; p = a;Does this mean, that 'a' contents are copied to 'p', or that 'p' is given a reference to 'a'?
Janis Legzdinsh
And why not use Z position?Z is current position. Health holds floating time.
Also, I want to be sure about class objects' copying, since i am not aware of how it is implemented in VavoomC. For example, if I write:Assigning reference variable to reference variable changes the reference.Actor a; Pawn p; p = a;Does this mean, that 'a' contents are copied to 'p', or that 'p' is given a reference to 'a'?
Crimson Wizard
Assigning reference variable to reference variable changes the reference.Ah, it is reference variable... I just forgot. Sorry. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Well, and then, how these class objects are created/destroyed? I mean - real objects, in memory. If I create a new variable of class Actor, for example, is the object already created? And then, if I give that variable a reference to other object, what happens with that, first, object, it just stays in memory unreferenced, or what? Excuse me for such a stupid question, but this thing confuses me much. It is not that transparent, as common dynamic memory in C++.
Janis Legzdinsh
Crimson Wizard
Crimson Wizard
if (vdot < -0.1) { if (bIceDamage && vdot < -GRAVITY * 0.25) { StateTime = 0.1; Velocity = vector(0.0, 0.0, 0.0); return true; } .....Thanks.
Janis Legzdinsh
1) Do I need to add my new thing classes into mobjinfo.vc?No. Actually I should clean this file up. Thanks for reminding me.
2) What are GLavaInflictor and LavaInflictor classes for?It's used as damage source for lava, just to tell that it's a fire damage and in a case of death a fire death animation should be played.
3) What does bBlaster flag means in Actor class?It's used for very fast moving projectiles, such as mage's first weapon projectile.
4) What the following code means in Actor::HitFloor() function? :
if (vdot < -0.1)
{
if (bIceDamage && vdot < -GRAVITY * 0.25)
{
StateTime = 0.1;
Velocity = vector(0.0, 0.0, 0.0);
return true;
}
.....
Thanks.
It's for frozen monsters. When they falls on the floor, it makes them explode immediately.Crimson Wizard
Janis Legzdinsh