zturtleman / sgfork

Automatically exported from code.google.com/p/sgfork for archive purposes. I do not maintain it. Don't report issues here.
GNU General Public License v2.0
0 stars 0 forks source link

Debug mode as mod #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Overall description of the new feature:
By "debug mode" here I mean some additional visualization, information, 
client/server functions that are not required during regular games.

There are a lot of ways to do debug mode:
1. Via #define. So to get some features work we have to rebuild whole game 
with new flag. This will keep main code untouched about any speed changes, 
but will make it difficult to players to check the stuff themselves.
2. Via CVars. That way we get very convenient tool for players, but we lose 
some of performance due to checking, storing and handling debug variables.
3(!). Via #define for the modifications.
And that is the way I would like to use.

In code it will look like #ifdef MISSIONPACK definitions. During building 
process we will get two packs of QVMs and (as an idea) two more executables 
(sgfork_debug.exe and sgfork_dedi_debug.exe).

A player only has to launch other executable if he/she wants to play with 
debug client file. And choose the mod in the game to play with debug QVMs.

We get source code integrity: all main code is shared between debug and 
non-debug source code.
No loss of performance in non-debug mode.

As minor plus we will illustrate to upcoming modders how to create their 
own mods and test the mod part as well.

Sure we can have some debug mods if it will be required. Like "damage 
system debug mode", "moving debug mode", "config files debug mode", etc.

Original issue reported on code.google.com by igorpana...@gmail.com on 26 Dec 2009 at 5:49

GoogleCodeExporter commented 9 years ago
There is one thing to notice: Doing debug features that way we will hint 
modders to 
make mods the same way - debug+original. So each mod could be represented by 
two mods 
actually.
I don't think it is bad thing, but I have to notice it anyway.

Original comment by igorpana...@gmail.com on 27 Dec 2009 at 6:14

GoogleCodeExporter commented 9 years ago
As r123 notice:
I marked all stuff for debug mod with the following comments in code:
/*DEBUG_MOD
...
*/

Original comment by igorpana...@gmail.com on 7 Mar 2010 at 9:20