jdolan / quetoo

Quetoo ("Q2") is a free first person shooter based on id Tech2. GPL v2 license.
http://quetoo.org
203 stars 28 forks source link

Replace g_teams and g_ctf with g_gametype cvar? #116

Closed dimmskii closed 8 years ago

dimmskii commented 8 years ago

It would make it way easier to add game types, such as Clan Arena, Harvester, Jailbreak, Domination, etc. I'm tired of game modes spawning whole new gamedirs (which require code merging, etc, mind you). IMHO, separate game and cgame is only worth it if one were to make a major modification to the game style itself on a whole other level. For example, that superheroes mod for Quake 3, or that racing one. Now THAT is mod-worthy.

Separate cvars should prevail only for pan-gametype settings. For example, starting weapons, starting ammo, infinite ammo bool, health, etc.

jdolan commented 8 years ago

Yea, I totally agree with your overall assertion. I'm not sure that combining the cvars that we have in different ways can't yield the same thing -- perhaps even with more flexibility, tho.

These cvars don't load different game modules or gamedirs. The idea is that you can have instagib CTF, arena TDM, etc. I love the idea of adding new game types either way, tho :)

dimmskii commented 8 years ago

Ha, I was just going to say, I realized that insta is implemented already. Instagib is actually cvar-worthy for sure, since it works with any gamemode in the history of quake that comes to mind. Short of instagibbing overload bases :P I guess the current scheme is workable too, but there would need to be decided a complex presidency order between similar gamemode cvars like CTF/A&D/Harvester/etc (they use the same spawn points, but change the entity at each base). I guess we should see where the road takes us when more game styles are implemented.

EDIT: Actually, I've got it. Just check for true on the other conflicting gamemode cvars as soon as the one of them is changed (and set to true). Then just arbitrarily set the rest to false. That way, the latest gamemode set to true would always hold priority on the server. That would be most logical: in case of messy server configs, just add stuff to the end and it will work.