I've had a rethink about my approach to game changing, and what's allowed and what's not allowed, and have decided to back off a little on my more proscriptive stance. The games menu has been reworked to allow for this, but I still need to go back and rework the functions that actually change.
Now, MHQuake will divide games into two categories: "Expansions" and "Games". An "Expansion" is something that was previously hard-coded into the engine, or was written with the intent of being used in conjunction with a game. This includes "Hipnotic", "Rogue", "Quoth" and "Nehahra" (I don't have full support for the latter 2 yet). Specifically, it's replacement content. A "Game" is just a directory under "Quake" that contains maps, models, progs, etc. In other words, additional content.
Using this model, you can now select any number of "Expansions" that you want (all 4 if you're feeling lucky, punk), as well as one game. This perfectly replicates the stock ID Quake command-line behaviour. If you select more than one "Expansion" you'll get a warning to only proceed if you know what you're doing (I'm still convinced that they're not meant to be used together). If you select any "Game" other than ID1 in conjunction with an "Expansion", you'll get a similar warning. I hope to get rid of this latter warning if I can devise a means of detecting whether a "Game" is meant to work in conjunction with an "Expansion".
The order of loading is "ID1" first, then "Expansions", then the "Game", just like in the original.
If this sounds more complex than it need be, don't worry as I've hidden most of the fiddly stuff away. A "Menu of the Day" might explain things better:
(Note no Nehahra in the above as I haven't started that yet...)
I detect a valid game directory by looking for one of progs.dat, config.cfg or pak0.pak in a subdirectory off "Quake". There's a few it's going to miss, of course, but it's better than adding in too many (not everything under "Quake" is necessarily a game!), and there's always the console to deal with that. I might add in a few more checks to be sure of getting as many as possible.
Right now the console "game" command is more limited - it just lets you change to a single game. I have plans to make it even more powerful though (as the console should be) by adding in the ability to add as many extra game directories as you want completely on the fly.
The command-line is still fully supported, of course, so typing freaks can still get their jollies there (joke! it's also good if you specifically want to start up in a game other than ID1).
Overall I'm happier with this setup, as it replicates the original more accurately (perfectly, in fact) and reduces the possibility of mod authors complaining. Which is always a good thing.
Sunday, August 31, 2008
Game Changing Revisited
Subscribe to:
Post Comments (Atom)
2 comments:
hallo, it´s interesting stuff. i´am not programmer so i don´t understand many of your previous posts about rendering etc... but this compatibility possibilities really drew my attention. specially the nehahra support. i love that addon but in dp is sometimes horribly slow...so i would like to see full nehahra support in mhquake.
hey mh. reckless here looks cool with the new menu :)
dunno if you had a look at indside3d but i picked up on your old version with normalmaps and it has come quite far :) but i could use a hand on some weirdness also you might want to have a look at the changes :)
its steadily becomming a better glquake.
Post a Comment