Page 1 of 1

Questions about making a (single-player) game

Posted: 2011-01-30, 19:49
by void
Howdy!

I have some more or less general questions about making a game with Cafu from the ground up - a single-player game to be specific.

In my understanding a good way to start a new project is by copying Games/DeathMatch/ and renaming it to Games/MyAwesomeGame/ (or something less cool ;)).

However, what I don't know yet, is how the engine handles loading games (MODs).
How can I get the engine to load MyAwesomeGame instead of DeathMatch?
And what is the "entry point" of MyAwesomeGame? The main menu (GUIs/MainMenu) per default?

Another question of mine is, whether there is anything special to consider when making a single-player game instead of a multi-player game with Cafu: Is it recommended to exclude or switch off certain server-related stuff?

Cheers!

Re: Questions about making a (single-player) game

Posted: 2011-01-31, 15:18
by Saniro
Well all you have to do to make it singleplayer is not add any multiplayer features, and don't run any servers, simple. " How can I get the engine to load MyAwesomeGame instead of DeathMatch? " You have to delete the deathmatch folder and only my "myawesomegame" folder in. Now if you are talking about making nice models (Players, NPCs, monsters, etc.) Good modeling softwares are milkshape, anim8or, and blender. (anim8or and blender are free, and i would recommend those above all.)

Re: Questions about making a (single-player) game

Posted: 2011-01-31, 18:08
by Carsten
void wrote:In my understanding a good way to start a new project is by copying Games/DeathMatch/ and renaming it to Games/MyAwesomeGame/ (or something less cool ;)).
Yes, that's right.
However, what I don't know yet, is how the engine handles loading games (MODs).
How can I get the engine to load MyAwesomeGame instead of DeathMatch?
There are two ways to accomplish that:
Either use command line parameter -svGame:

Code: Select all

Cafu.exe -svGame MyAwesomeGame
or in file config.lua, add line

Code: Select all

dlg_svGameName="MyAwesomeGame";
somewhere near the end. The effect is in both cases the same: MyAwesomeGame is loaded instead of the default DeathMatch.
Also try Cafu.exe -h for some useful info.
And what is the "entry point" of MyAwesomeGame? The main menu (GUIs/MainMenu) per default?
In a sense, yes: The GUI with name "Games/"+Options_ServerGameName.GetValueString()+"/GUIs/MainMenu/MainMenu_main.cgui" is loaded after program start.
Another question of mine is, whether there is anything special to consider when making a single-player game instead of a multi-player game with Cafu: Is it recommended to exclude or switch off certain server-related stuff?
No, there is nothing special to take care of: Cafu runs the single player game as a special case of the multiplayer game where only a single player participates. :up: