Back to the Vavoom Forum Archives


Forum

Some questions about building mod

Wed, 09 Nov 2005 20:15:55

Crimson Wizard

Hello. I am a novice to Vavoom and currently trying to learn how to use it. Earlier I built a small mod on JHexen and now I want to rewrite it on Vavoom C. But I meet a lot of problems here. Most irritating, ofcourse, is that some functions are not present or misplaced. Thus, at first, i wish to ask, where is located a function, that checks for intermission message skipping? (In JHexen source it was called CheckForSkip) I've edited JHexen source so it allowed to have multipaged cluster messages. It worked so, that text was written down to the bottom of the screen, then it waited for clicking 'Fire' button, and continued to write text from the top of the screen; also I left possibility to press 'Use' button to skip whole intermission at once. To do this properly I need to change code in function that detects buttons pressing (mentioned above). At second, I need to know if there is any variable, macro or function, that let me get screen parameters (width and height). And also, I wonder, why there is not implemented some function for string class that could allow extracting substring? The only way to do such procedure, as I found out, it is copying string fraction char by char thru using loop. Thanks.
Wed, 09 Nov 2005 20:43:04

Firebrand

In my short experience using Vavoom C, I found that some of the functions are hard wired with the executable, so you should try to look for them in the Vavoom source code too <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, as for the screen parameters, there's a function called SetVirtualScreen, that can scale the current display to another resolution from the one being used, but you should be careful how you use it, as it can screw some things. You whould use it once, the first time you use it, everything rendered from it down will be scaled, if you use it a second time to return it to the original virtual resolution (320, 200), everything will render normally, I hope I made clear my explanation, if you have more questions just ask <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> .
Wed, 09 Nov 2005 21:20:40

Janis Legzdinsh

CheckForSkip is located in engine (file sv_main). When a 'Fire' button is pressed, it's passed to client which sets progs variable skipintermission to true. It's then handled by intermission code (imission.vc). Strings are on my 'to do' list. So far they haven't been implemented because strings ain't used that much.
Thu, 10 Nov 2005 11:34:58

Crimson Wizard

I see. Well, fortunately I managed to solve this, slightly changing my algorythm. And I do not need string copying now, at least in this case. About screen size. I want to put a graphic on screen during intermission (it's a menu arrow appearing to say that it is the end of page and player must press button to continue). In JHexen I used SCREENWIDTH and SCREENHEIGHT to define its location (relative to bottom-right corner). What I should use here, in Vavoom? Or, maybe, I may use constants - 320x240 - will this work at any resolution?
Thu, 10 Nov 2005 12:49:01

Janis Legzdinsh

Vavoom uses a virtual screen for drawing. The default size is 320x200.
Thu, 10 Nov 2005 13:30:41

Crimson Wizard

When you say 'default' you mean that it can be changed by user? (And you mentioned that you are going to change it to 640x480 in later versions) Well, what about just any function that allow to know current virtual size?
Thu, 10 Nov 2005 17:51:45

Janis Legzdinsh

Since original progs never change it, it's always 320x200, and all drawing code assumes it to be so. You can change it with function SetVirtualScreen to change it.
Fri, 11 Nov 2005 13:13:47

Crimson Wizard

Er, no, I do not want to change it at all. I just want to be sure that I may use these constant values to set relative grafic position.
Fri, 11 Nov 2005 19:13:38

Janis Legzdinsh

Currently you can be sure that screen size is 320x200.
Wed, 03 May 2006 11:34:17

Crimson Wizard

Do not want to start new topic. My new question is: how can Client classes (statusbar, clientgame etc) know whether player is human or cpu (bot)? Is there any flag or property that defines that? Secondly, is there a deaths counter for player? (I know there's frags counter, but summirising all the times player was fragged cannot give right answer in case if player died from enviroment (ceiling crushes, falling damage etc).
Wed, 03 May 2006 16:22:01

Janis Legzdinsh

My new question is: how can Client classes (statusbar, clientgame etc) know whether player is human or cpu (bot)? Is there any flag or property that defines that?
Currently it doesn't have such information.
Secondly, is there a deaths counter for player? (I know there's frags counter, but summirising all the times player was fragged cannot give right answer in case if player died from enviroment (ceiling crushes, falling damage etc).
You can, since deaths from environment or suicides are counted as frags against player itself.
Thu, 04 May 2006 14:01:50

Crimson Wizard

Hmm... It looks like I misundertanded how these frags counters are stored. Those in Client Game are available only between levels, don't they? At least when I check 'scores' pointer (type 'scores_t*') of ClientGame object when playing deathmatch, it has null value, so dynamic array is not allocated. Then, where I can read current frags counters during the game? Are they available to be read from client modules? I underline that I need all the frags for all the players versus all the players. (I am trying to make Scoreboard for Korax Arena project, that Firebrand has asked me to create) And also. What does following message means:
level update: player overflow
well, I can GUESS what it means, but I wish to know, in what conditions can it appear? BTW, Firebrand, if you are reading this occasionally, it's in last KA version <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> [quote="Janis Legzdinsh":24la92sc]You can, since deaths from environment or suicides are counted as frags against player itself. ...And what about monster killing the player?
Thu, 04 May 2006 15:27:05

Firebrand

Hmm... It looks like I misundertanded how these frags counters are stored. Those in Client Game are available only between levels, don't they? At least when I check 'scores' pointer (type 'scores_t*') of ClientGame object when playing deathmatch, it has null value, so dynamic array is not allocated. [quote="Crimson Wizard":3gbn8u5q]Then, where I can read current frags counters during the game? Are they available to be read from client modules? I underline that I need all the frags for all the players versus all the players. (I am trying to make Scoreboard for Korax Arena project, that Firebrand has asked me to create) The frag counters are also stores by the player class (check the player.vc file), I created scores for all the frags in team games too, I don't know if it's possible to pass these to the client side and use them too. AFAIK they are actually used, since the scores are printed ingame already. [quote="Crimson Wizard":3gbn8u5q]And also. What does following message means: level update: player overflow I think this is a debug message, I tried to explain all this in the PM I sent you at the KH's forums. [quote="Crimson Wizard":3gbn8u5q]I wish to know, in what conditions can it appear? BTW, Firebrand, if you are reading this occasionally, it's in last KA version <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Yes, I'm well aware of this <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->, Janis might know better than me which conditions are needed for this <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. [quote="Crimson Wizard":3gbn8u5q][quote="Janis Legzdinsh":3gbn8u5q]You can, since deaths from environment or suicides are counted as frags against player itself. ...And what about monster killing the player? You could create a deaths counter in the same way the frags actually work for the player and maybe use it in the client side too.
Thu, 04 May 2006 16:52:53

Janis Legzdinsh

[quote="Crimson Wizard":1dkr6lae]Hmm... It looks like I misundertanded how these frags counters are stored. Those in Client Game are available only between levels, don't they? At least when I check 'scores' pointer (type 'scores_t*') of ClientGame object when playing deathmatch, it has null value, so dynamic array is not allocated. Yes, scores are available only during intermission.
Then, where I can read current frags counters during the game? Are they available to be read from client modules? I underline that I need all the frags for all the players versus all the players. (I am trying to make Scoreboard for Korax Arena project, that Firebrand has asked me to create)
You could add them to player class, like other fields for client are passed.
And also. What does following message means:
level update: player overflow
Basicly it means that network buffer is overflowing and you might see some blinking sprites.
[quote="Janis Legzdinsh":1dkr6lae]You can, since deaths from environment or suicides are counted as frags against player itself.
...And what about monster killing the player? To be clear - any death not caused by other player is counted as frag against self.
You could create a deaths counter in the same way the frags actually work for the player and maybe use it in the client side too.
Good idea.
Thu, 04 May 2006 19:05:50

Crimson Wizard

What I want to know. Can this overflow error cause some parameters sent from Player to ClientState to be ignored? I am not absolutely sure (I shall test it probably one more time), but when I added 1 additional parameter both to Player and MainClientState and tried to use it during game, it seems that it was loosing its value every time. But when I put that new parameter at the beginning of class variable list (both Player and ClientState), all seemed to be normal. (Then again, maybe there had been some other mistake.)
Thu, 04 May 2006 22:53:44

Firebrand

I don't remember correctly, but there's a part that is specified for player parameters that are passed to the client, in this case it would be the player's health, armorpoints, etc. Obviously, it's the right place to put any parameters you want the client is able to use (unless I misunderstood what you are saying).
Fri, 05 May 2006 10:36:56

Crimson Wizard

Yeah, I know that, ofcourse (I made a RPG mod with a lot of new parameters sent to client, didn't I? <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> ). As I understand that, Vavoom checks how much variables MainClientState class has in its declaration and transits the same number of parameters from Player class, beginning with 1st variable (non-constant) found in Player's declaration. So, what I was saying. There were, let's say, 20 variables in MainClientState, so it had to receive 20 first variables from Player. I added 21th variable both to MainClientState and Player. And it was loosing its value until I put it on the 1st place.
Fri, 05 May 2006 13:23:51

Crimson Wizard

Does VavoomC support multidimensional arrays? WIKI sais it does, but when I write i.e.
int MyArray[10][10];
It treats it as compiler error. The only way I found is to write:
struct mystruct
{
      int value[10];
};
mystruct MyArray[10];
Fri, 05 May 2006 17:50:50

Janis Legzdinsh

Number of parameters to be sent is the value num_stats in GameInfo class. Multi-dimensional arrays are not supported, wiki is a little bit out of date.
Fri, 05 May 2006 19:50:58

Crimson Wizard

Oh, thanks, I forgot about num_stats. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Then, the next question. Is it possible to get all the players' names either from client or server classes? I know that client can get current player's name using GetCVarS function, but how can I get ALL the players' names? EDIT 6th may 2006: And two more: 1) May be I have already asked this, but what is GC class? and what's the difference between GC's DrawText & DrawIcon functions and Object's built-in functions? 2) How the 'color' parameter in R_FillRect() is defined? the same way as classic RGB? (0x00RRGGBB)? (may be it is 0x00BBGGRR - I am not quiet sure, but you might got the idea) Or it is palette dependent?
Sat, 06 May 2006 13:45:05

Janis Legzdinsh

Then, the next question. Is it possible to get all the players' names either from client or server classes? I know that client can get current player's name using GetCVarS function, but how can I get ALL the players' names?
Each player has a Name property. To get them on client, add an array to Player class with names.
1) May be I have already asked this, but what is GC class? and what's the difference between GC's DrawText & DrawIcon functions and Object's built-in functions?
It was meant to be a graphic context, similar to Windows API. But it's prety useless in it's current state (it only manages clip rectangle) and in new redesigned UI it will go away.
2) How the 'color' parameter in R_FillRect() is defined? the same way as classic RGB? (0x00RRGGBB)? (may be it is 0x00BBGGRR - I am not quiet sure, but you might got the idea) Or it is palette dependent?
It's classic ARGB. Currently alpha is ignored, but you should set it to ff in a case it will be enabled later.
Tue, 09 May 2006 12:25:08

Crimson Wizard

Occasional questions. 1) I was trying to understand how KoraxSpirit damages player and failed. There's no Damage function called neither MissileDamage is set. But I remember that these spirits can kill player in game. Maybe I am wrong? 2) What is ProjectileBlade class? It is not used anywhere. And also I ask for help in understanding what exactly classes are heresiarch weapons he kills player with. I need exactly those classes that cause player death (that are counted as instigators in Actor:Damage() ).
Tue, 09 May 2006 14:31:25

Firebrand

[quote="Crimson Wizard":2fc25fc0]Occasional questions. 1) I was trying to understand how KoraxSpirit damages player and failed. There's no Damage function called neither MissileDamage is set. But I remember that these spirits can kill player in game. Maybe I am wrong? 2) What is ProjectileBlade class? It is not used anywhere. And also I ask for help in understanding what exactly classes are heresiarch weapons he kills player with. I need exactly those classes that cause player death (that are counted as instigators in Actor:Damage() ). 1) IIRC, the spirits aren't supposed to damage the player. 2) It's used for scripts to spawn this kind of projectile. As for the Heresiarch, I think they are the SorcererBalls, if you look inside the Damage function in the actor.vc file you can see which actors make special damage, I remember the Heresiarch attacks being there.
Tue, 23 May 2006 10:52:27

Crimson Wizard

Is it allowed to derived BasePlayer from some other, custom class instead of Object? For example, I create MyClass class derived from Object and change BasePlayer : Object to BasePlayer : MyClass. Will it work? Next, what kind of error may happen in V_StructInit (or SV_StructInit, forgot the spelling) theoretically?
Tue, 23 May 2006 11:42:23

Janis Legzdinsh

Is it allowed to derived BasePlayer from some other, custom class instead of Object? For example, I create MyClass class derived from Object and change BasePlayer : Object to BasePlayer : MyClass. Will it work?
No
Next, what kind of error may happen in V_StructInit (or SV_StructInit, forgot the spelling) theoretically?
There's no such function, check the spelling.
Tue, 23 May 2006 19:50:20

Crimson Wizard

Well, that might be some consequenses of modyfing BasePlayer class as mentioned above, so no it does not matter.
Thu, 06 Jul 2006 18:09:12

Crimson Wizard

I want to ask some questions about MainGameInfo. First, in what moment GameInfo object is actually created? When the Init() and InitNewGame() functions are called? Then. I have an object (of a class derived from class Object directly) created when the game starts - in InitNewGame(). MainGameInfo has a reference to it. I wish this object be destroyed just when current game ends (in any case - either when a new game starts or player chooses "end game" option in menu or whatever). If there's a way I can catch this moment in game process? And also. If it is neccessary to explicitly, manually destroy all the Actors which I spawn? EDIT: additional one: How I may make classes, included in the beginning of the classes list, know classes that are included after them? For example, Actor class knows class Minotaur.
Fri, 07 Jul 2006 18:14:01

Janis Legzdinsh

I want to ask some questions about MainGameInfo. First, in what moment GameInfo object is actually created?
During initialisation of the engine.
When the Init() and InitNewGame() functions are called?
Init is called when MainGameInfo is created. InitNewGame is called every time a new game is started or is loaded from savegame.
Then. I have an object (of a class derived from class Object directly) created when the game starts - in InitNewGame(). MainGameInfo has a reference to it. I wish this object be destroyed just when current game ends (in any case - either when a new game starts or player chooses "end game" option in menu or whatever). If there's a way I can catch this moment in game process?
Currently only when InitNewGame is called again.
And also. If it is neccessary to explicitly, manually destroy all the Actors which I spawn?
All Thinker-s are destroyed with the level. You should destry it if it's no longer needed.
EDIT: additional one: How I may make classes, included in the beginning of the classes list, know classes that are included after them? For example, Actor class knows class Minotaur.
Add this to svprogs.vc before including game/classes.vc:
class Minotaur;
Sat, 08 Jul 2006 17:27:51

Crimson Wizard

Thank you. I wish to answer another one. There's CreateLevelInfo() function in MainGameInfo, which, as I understand, creates HexenLevelInfo object. But still, there's no reference to it in MainGameInfo itself. Why?
Sun, 09 Jul 2006 15:17:51

Janis Legzdinsh

I didn't have any reason to have it there.
Tue, 11 Jul 2006 08:14:04

Crimson Wizard

Can you explain, how it is checked that player or monster crosses the line for action special triggering?
Tue, 11 Jul 2006 18:20:43

Janis Legzdinsh

Entity class has a CrossSpecialLine event which is called for every line with line special that the object is crossing.
Tue, 11 Jul 2006 19:02:31

Crimson Wizard

Hmm... maybe it's what I need. I was just thinking of creating a 3d trigger I spoke long time ago (in "features proposal"). It seemed very difficult, if not impossible to make it detect when player crosses an imaginary line defined by trigger itself, so I thought it would be better if trigger will use existing map lines. But still there's a problem of detecting player entering trigger area from top or bottom. Currently I have some ideas, but they look too weird to try them.
Tue, 11 Jul 2006 21:35:19

Firebrand

Why don't you try using the sector's FloorZ and/or CeilingZ values and the player's Z position to determine it he's under the 3d floor or over it?
Wed, 12 Jul 2006 05:15:23

Crimson Wizard

Oh, I am really sorry, <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> hadn't try seeking solution on some paths, and then I have found what is needed. And that's what I want to say regarding this: <!-- m --><a class="postlink" href="http://www.vavoom-engine.com/forums/viewtopic.php?t=751">http://www.vavoom-engine.com/forums/viewtopic.php?t=751</a><!-- m --> <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Sat, 22 Jul 2006 13:00:54

Crimson Wizard

1) Aren't there any way to make pointer be equal to zero or it is denied in Vavoom? 2) What is map grid unit size in Vavoom coordinates?
Sat, 22 Jul 2006 16:03:58

Janis Legzdinsh

1) Aren't there any way to make pointer be equal to zero or it is denied in Vavoom?
You can, just assign 'none' to a reference or 'NULL' to a pointer.
2) What is map grid unit size in Vavoom coordinates?
1
Sat, 22 Jul 2006 19:03:07

Crimson Wizard

[quote="Janis Legzdinsh":1wcvyvif] You can, just assign 'none' to a reference or 'NULL' to a pointer. Ah, its NULL.. I was trying "null", now I don't know why.. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Sun, 23 Jul 2006 17:56:00

Janis Legzdinsh

If you were developing in C#, I could understand why.
Sun, 23 Jul 2006 18:06:58

Crimson Wizard

No, that's probably because VavoomC uses 'none' - in lower case. Well, heh, mayby also because I was drowsy at that time. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Mon, 31 Jul 2006 17:34:44

Crimson Wizard

Can I use function pointers in VavoomC?
Wed, 02 Aug 2006 19:22:04

Crimson Wizard

I can change music by using ChangeMusic function. But how I may return original map's music (defined in MAPINFO)?
Wed, 02 Aug 2006 19:29:39

Janis Legzdinsh

Can I use function pointers in VavoomC?
You can have delegates.
I can change music by using ChangeMusic function. But how I may return original map's music (defined in MAPINFO)?
GameInfo.level->SongLump is currently playing song, save it before playing your song.
Sat, 05 Aug 2006 10:41:45

Crimson Wizard

SongLump has "name" type, while ChangeMusic takes "string" parameter. How I may convert name to string? There's only StrToName() function.
Sat, 05 Aug 2006 11:23:31

Janis Legzdinsh

Must fix this. Use va("%n", whatever)
Sat, 05 Aug 2006 11:26:07

Crimson Wizard

Ok. Got another one: is there any variable for number of active players, or it can only be counted using Players reference array in GameInfo?
Sat, 05 Aug 2006 11:47:14

Janis Legzdinsh

Currently countng players is the only way.
Sun, 06 Aug 2006 12:54:42

Crimson Wizard

How many Local Sounds may be played at a time?
Sun, 06 Aug 2006 15:38:24

Janis Legzdinsh

They don't have a limit so they are limited by total number of channels.
Fri, 11 Aug 2006 10:59:18

Crimson Wizard

Aren't there any variable that stores player's position during attack (melee or missile). I ask because I want to make one and do not want to have duplicates.
Fri, 11 Aug 2006 11:42:24

Janis Legzdinsh

Player.MO.Origin
Fri, 11 Aug 2006 12:00:48

Crimson Wizard

No, no, I mean backup value for an OLD position when player attacked. I have no idea what it could be needed for, but simply wish to be sure.
Fri, 11 Aug 2006 14:40:55

Firebrand

You can create a new variable and store the players position before the attack.
Fri, 11 Aug 2006 15:05:34

Crimson Wizard

DAMN! <!-- s:x --><img src="{SMILIES_PATH}/icon_mad.gif" alt=":x" title="Mad" /><!-- s:x --> I know I can create such, and I am going to. What I ask is - if there is one already or not!!!!! [img:22fcz9sn]http://foolstown.com/sm/mad.gif[/img:22fcz9sn] Well, according to your answers I suppose there isn't. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Fri, 11 Aug 2006 20:46:47

Mago KH

Haha, no need to loose your calm over a variable. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Sat, 12 Aug 2006 05:26:16

Crimson Wizard

You're right. Sorry. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Sat, 12 Aug 2006 11:14:10

Janis Legzdinsh

Yes, there isn't such a variable.
Mon, 14 Aug 2006 05:17:38

Crimson Wizard

This time I got 3 questions. 1. What is the actual difference in calling LocalSound() from different clasees: Window, GameInfo, Player, Actor etc. When those sounds will be played for all clients and when only for one? 2. How may I intercept player commands for movement and changing direction of view? Well, at least for movement. I wish to try making special Activate/Deactivate for PlayerPawn as well. Currently it works unstable and causes game crashes often. 3. How may I call window from server classes (Player for example)? Do I need to precreate that window somehow? (Well, actually I made similar thing already with Scoreboard in KA by precreating it in ClientGame and using flag in ClientInfo to know whether it must be shown at current moment, but want to be sure if it is the best way) Thanks in advance.
Mon, 14 Aug 2006 09:51:28

Janis Legzdinsh

1. What is the actual difference in calling LocalSound() from different clasees: Window, GameInfo, Player, Actor etc. When those sounds will be played for all clients and when only for one?
LocalSound() is a client side method, you are not allowed to call it from server side classes, such as Actor, Player of GameInfo.
2. How may I intercept player commands for movement and changing direction of view? Well, at least for movement. I wish to try making special Activate/Deactivate for PlayerPawn as well. Currently it works unstable and causes game crashes often.
It can be done by modifying those variables in the begining of the PlayerTick method.
3. How may I call window from server classes (Player for example)? Do I need to precreate that window somehow? (Well, actually I made similar thing already with Scoreboard in KA by precreating it in ClientGame and using flag in ClientInfo to know whether it must be shown at current moment, but want to be sure if it is the best way)
Currently the only way now is by using a custom network protocol command. Most likely you'll have to precreate the window.
Mon, 14 Aug 2006 09:59:48

Crimson Wizard

[quote="Janis Legzdinsh":1e411dxq]LocalSound() is a client side method, you are not allowed to call it from server side classes, such as Actor, Player of GameInfo. But I called it from my SoundQueue class derived from Thinker and it played well. [quote="Janis Legzdinsh":1e411dxq]
3. How may I call window from server classes (Player for example)? Do I need to precreate that window somehow? (Well, actually I made similar thing already with Scoreboard in KA by precreating it in ClientGame and using flag in ClientInfo to know whether it must be shown at current moment, but want to be sure if it is the best way)
Currently the only way now is by using a custom network protocol command. Most likely you'll have to precreate the window. Excuse me, can you explain this more clear - what's "custom network protocol command" applied to Vavoom progs?
Tue, 15 Aug 2006 08:11:58

Janis Legzdinsh

[quote="Crimson Wizard":p9g07ezk][quote="Janis Legzdinsh":p9g07ezk]LocalSound() is a client side method, you are not allowed to call it from server side classes, such as Actor, Player of GameInfo. But I called it from my SoundQueue class derived from Thinker and it played well. Yes, but in a network game only the player running the server will hear them. And if you'll try to run a dedicated server, it will crash it.
[quote="Janis Legzdinsh":p9g07ezk]
3. How may I call window from server classes (Player for example)? Do I need to precreate that window somehow? (Well, actually I made similar thing already with Scoreboard in KA by precreating it in ClientGame and using flag in ClientInfo to know whether it must be shown at current moment, but want to be sure if it is the best way)
Currently the only way now is by using a custom network protocol command. Most likely you'll have to precreate the window.
Excuse me, can you explain this more clear - what's "custom network protocol command" applied to Vavoom progs? Add a new svc_ command in hexndefs.vc, send it to client (see Actor.ExplodeMissile() for example) and on client side parse it (in ClientGame.ParseServerCommand() method).
Tue, 15 Aug 2006 13:26:20

Crimson Wizard

That's interesting. Possibly I can use this svc_ commands for my sound queue as well. Can I send lump name using MSG_Write somehow? Also I am curious what's the meaning of MSG_Select(MSG_SV_DATAGRAM) command?
Tue, 15 Aug 2006 14:01:39

Janis Legzdinsh

[quote="Crimson Wizard":1nzoht9c]That's interesting. Possibly I can use this svc_ commands for my sound queue as well. Can I send lump name using MSG_Write somehow? You should assign some IDs for sounds and handle actual names on client. [quote="Crimson Wizard":1nzoht9c]Also I am curious what's the meaning of MSG_Select(MSG_SV_DATAGRAM) command? It's required to tell into which message the following MSG_* comands will be writing to.
Mon, 21 Aug 2006 11:49:14

Crimson Wizard

I still found it a bit problematic to make a normal Sound queue. Problem is following. I may, ofcourse, send order for client to play sound. But how I may know if a local sound is already playing? I suppose that I should not call IsLocalSoundPlaying() from server side? Then, I either need to move whole implementation of sound queue to client or make it somehow receive return value from client which will say whether a sound is playing. Thinking of first variant - only way to make queue recheck its state periodically is to have Tick function; only Window decendants have it, and I do not want to derive SoundQueue from Window because it is silly. As for second variant I do not know how to return some value from client to server. Is it possible? Currently I managed to invent only one way to solve this problem with sound queue - to use extra svc_ command from Thinker's descendant to force sound queue on client recheck its state. Well, maybe I am thinking too hard (as 4th Class once said <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> ) and it is already best way, but still, aren't there better ones?
Mon, 21 Aug 2006 17:27:00

Janis Legzdinsh

[quote="Crimson Wizard":3io5rk2q]I still found it a bit problematic to make a normal Sound queue. Problem is following. I may, ofcourse, send order for client to play sound. But how I may know if a local sound is already playing? I suppose that I should not call IsLocalSoundPlaying() from server side? Then, I either need to move whole implementation of sound queue to client or make it somehow receive return value from client which will say whether a sound is playing. Yes, you must move it to client side. Server should not care if sound is playing, client should decide what to do.
Thinking of first variant - only way to make queue recheck its state periodically is to have Tick function; only Window decendants have it, and I do not want to derive SoundQueue from Window because it is silly.
ClientGame.StatusBarUpdateWidgets() is also called every frame while connected to server, call it from here.
As for second variant I do not know how to return some value from client to server. Is it possible?
No, and as I already said, server should not care.
Wed, 23 Aug 2006 19:18:22

Crimson Wizard

Only way to tell client that sound should be played for exact player is to pass additional parameter (# of player), right? Also, what are these members of ClientState? float mtime[2]; float time; float oldtime;
Thu, 24 Aug 2006 11:52:57

Janis Legzdinsh

[quote="Crimson Wizard":x3i2yrcn]Only way to tell client that sound should be played for exact player is to pass additional parameter (# of player), right? No, just send it to correctplayer, not ot everymody. Instead of MSG_Select use Player.SelectClientMsg(MSG_SV_CLIENT); [quote="Crimson Wizard":x3i2yrcn]Also, what are these members of ClientState? float mtime[2]; float time; float oldtime; mtime is not used right now, time is server time of current update, oldtime is server time of previous frame.
Sun, 03 Sep 2006 17:36:38

Crimson Wizard

Janis, what is the better way to make bots autospawn on map start? I want to add an option in multiplayer start menu to define quantity of bots spawned.
Sun, 03 Sep 2006 18:29:21

xstriferz

Probly this is not related, but, what is the command to type in doom builder to load a custom made wad in vavoom using strife?
Mon, 04 Sep 2006 07:42:37

Crimson Wizard

[quote="xstriferz":2npsb1xa]Probly this is not related, but, what is the command to type in doom builder to load a custom made wad in vavoom using strife? First, download vavoom editing package, which contains config files for DoomBuilder (Vavoom???.cfg). Then, while opening map or creating a new one, select Vavoom for Strife configuration.
Mon, 04 Sep 2006 18:23:15

Crimson Wizard

What is "flags" param in CreateCvar(name Name, string default_value, int flags) function ?
Mon, 04 Sep 2006 19:17:07

Janis Legzdinsh

[quote="Crimson Wizard":4hz4q1zo]Janis, what is the better way to make bots autospawn on map start? I want to add an option in multiplayer start menu to define quantity of bots spawned. Spawn them using console command (use CmdBuf_AddText).
What is "flags" param in CreateCvar(name Name, string default_value, int flags) function ?
A combination of CVAR_* flags, 0 if none.
Wed, 13 Sep 2006 09:58:59

Crimson Wizard

What does "ramp" variable in particle_t structure mean?
Wed, 13 Sep 2006 11:37:10

Janis Legzdinsh

Some Doom particles use it as the index of the colour in the array. It's not used by engine, so you can use it for different purposes.
Mon, 02 Oct 2006 18:05:37

Crimson Wizard

For some reason Doom 2 (1.21.2) does not allow Action Special > 255, while Hexen does. I do not know, if it is a bug or normal behavior?
Sat, 07 Oct 2006 12:30:31

Crimson Wizard

Is it possible to make an Action Special which returns some result to map script?
Sat, 07 Oct 2006 13:28:57

Crimson Wizard

It seems that now we cannot make Action Special ID > 255 at all. Why?
Sun, 08 Oct 2006 10:44:55

Janis Legzdinsh

[quote="Crimson Wizard":3v9ehh49]Is it possible to make an Action Special which returns some result to map script? Only boolean value can be returned.
It seems that now we cannot make Action Special ID > 255 at all. Why?
I guess it's because you are using extended version of acc which by default uses byte instructions in which case line specials are encoded as bytes and are limited to 255. By passing -h option it will use integer instructions.
Sun, 08 Oct 2006 14:36:45

Crimson Wizard

[quote="Janis Legzdinsh":hka186tx][quote="Crimson Wizard":hka186tx]Is it possible to make an Action Special which returns some result to map script? Only boolean value can be returned. And how it can be done? Unfortunately I used ACS too long ago last time to remember much about it.
Mon, 09 Oct 2006 17:58:41

Janis Legzdinsh

Just check the return value of a line special.
Sat, 14 Oct 2006 12:13:54

Crimson Wizard

[quote="Janis Legzdinsh":2lzzzidi]
It seems that now we cannot make Action Special ID > 255 at all. Why?
I guess it's because you are using extended version of acc which by default uses byte instructions in which case line specials are encoded as bytes and are limited to 255. By passing -h option it will use integer instructions. I tried but it doesn't seem to work. I checked acc debug info and saw it still substs wrong action special ids, for example '4' instead of '260'.
Sun, 15 Oct 2006 07:38:17

Janis Legzdinsh

I just checked compiler and found out that it internaly stores action specials as bytes, so you are limited to 255 action specials.
Sun, 15 Oct 2006 11:50:19

Crimson Wizard

Uh, too bad. Still we may use original Raven's acc.exe, but modern has many additional features that are too good to be rejected. Is ACC released as open source? Maybe it can be modified somehow?
Tue, 17 Oct 2006 17:51:04

Janis Legzdinsh

Of course it is open source, you can get the source from ZDoom's website or from Vavoom source tree (but it's an older version).
Sun, 12 Nov 2006 16:34:49

Crimson Wizard

Assuming we have some actor spawned somewhere. How I may check whether he has / has not walls (solid lines (?)) in vicinity of his body radius (i.e. is he got stuck)? Seems TryMove does not help much in this case.
Sun, 12 Nov 2006 17:01:20

Firebrand

I know why you are asking this <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->, I've been looking for a solution to it to, but I'm stuck, supposedly, you should check if thing will fit the desired position (with it's radius), if it won't fit you shouldn't spawn it, I think the problem could be related to that, hope this helps you out <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Mon, 13 Nov 2006 07:18:44

Crimson Wizard

Oops, nevermind. Again, I forgot about TestLocation function.

Back to the Vavoom Forum Archives