Object Respawn (multiplayer)
<i>This post was originally made by <b>danij</b> on the dengDevs blog. It was posted under the categories: Beta 5, Games, jDoom, jHeretic, jHexen, Version 1.9.</i>
I'm currently working on commonising the method for object respawn in multiplayer (that is the implementation to handle respawning items into the game world after some time in multiplayer, such as powerups health packs etc).
I would like to internalize this control in both jHeretic and jHexen to offer more direct control and more advanced customization (eg user modifiable respawn times via the GUI).
Currently this can only be implemented in jDoom as the object respawn process is controlled 100% internally in the jDoom library.
In jHeretic and jHexen the object respawn process is split, the routine is initiated within the respective game library but then control is handed to a few user customizable (DED) STATEs with two limited actions which are called to end the object respawn wait and to create the item in the world again (unhide).
There is only two advantages to having this controlled externally in the current implementation in jHeretic and jHexen:
<ul>
<li>User controlable respawn time:This will be replaced using internal settings via the multiplayer game setup menus.</li>
<li>The respawn states can have custom state execute commands so that special actions can be set to occur when an object starts/ends the respawn process</li>
</ul>
How should I go about this to retain backward compatibility with any existing mods and what should become of the existing STATEs and Actions used to control this in jHeretic and jHexen?
My first thoughts are to use a hybrid technique controlled 100% internally by the game library but to change to dissappearing/reappearing states momentarily before the action occurs (these STATEs will have no direct control over the object though. ie. their frame time will not be used to control the respawn wait time). The old unhide actions will become NULL action ptrs with no affect.
I'm currently working on commonising the method for object respawn in multiplayer (that is the implementation to handle respawning items into the game world after some time in multiplayer, such as powerups health packs etc).
I would like to internalize this control in both jHeretic and jHexen to offer more direct control and more advanced customization (eg user modifiable respawn times via the GUI).
Currently this can only be implemented in jDoom as the object respawn process is controlled 100% internally in the jDoom library.
In jHeretic and jHexen the object respawn process is split, the routine is initiated within the respective game library but then control is handed to a few user customizable (DED) STATEs with two limited actions which are called to end the object respawn wait and to create the item in the world again (unhide).
There is only two advantages to having this controlled externally in the current implementation in jHeretic and jHexen:
<ul>
<li>User controlable respawn time:This will be replaced using internal settings via the multiplayer game setup menus.</li>
<li>The respawn states can have custom state execute commands so that special actions can be set to occur when an object starts/ends the respawn process</li>
</ul>
How should I go about this to retain backward compatibility with any existing mods and what should become of the existing STATEs and Actions used to control this in jHeretic and jHexen?
My first thoughts are to use a hybrid technique controlled 100% internally by the game library but to change to dissappearing/reappearing states momentarily before the action occurs (these STATEs will have no direct control over the object though. ie. their frame time will not be used to control the respawn wait time). The old unhide actions will become NULL action ptrs with no affect.
Comments
I think it's a good idea to have the disappear/appear states so that any callbacks and commands can be executed when those states are entered. The timings themselves are best controlled as in jDoom/jHeretic at the moment, IMO. The P_HideSpecialThing in jHexen seems awkward.
I was wondering, the game setup strings posted to the master server - they arn't actually parsed or interpreted in anyway are they (ie they are simply read into a onscreen buffer for the users benefit when viewing the server list)?
Since I plan to be adding several new multiplayer options that affect gameplay their values should be mentioned in the server's configuration info in the server list.
will it to be released?