General structure ideas for a modular 4x strategy game engine.

Started by
0 comments, last by Nercury 11 years, 1 month ago

Hello ladies and gentlemen. First post here. Thanks to an inheritance, I've recently shed the shackles of 9-to-5 work, and I'm ready to devote all my time for the next couple years to my dream of being an independent game developer. I'm pretty fortunate to have the opportunity. Though I am a software engineer by trade, I was doing .NET business stuff. Boring, easy, no imagination required. Anyhow, my first project is a 4x strategy game. I'll either be creating it in .NET using DX bindings, or brushing up on my C++. But that's really neither here nor there. Right now I'm in the larger design stage.

My first issue that I want to get some input on is structuring the data for the game in such a way that it is extremely modular and friendly to modders. In my work, it was pretty simple. I dealt mostly with SQL databases. But games store a richer variety of data, and need to load the data in a more dynamic fashion. I want them to be able to modify the game as much as possible, and I don't want to make it unnecessarily difficult for them. I envision total conversions that have people playing my game years after the vanilla game has worn thin.

Certain things are trivial. Exposing strings for localization and modding for example. Other things like save-game structure have me a bit out of my element.

Right now I'm looking for broader suggestions about data handling in a way that isn't bass-ackwards. Structuring save-games and game assets (everything from the first splash screen to the credits), mostly. As I get deeper into it I'm sure I'll have more specific questions.

Thanks.

Advertisement

You may look at Civilization to get some ideas. I am not saying that their approach is the best. But they made it very mod friendly.

Civilization uses mostly XML files for everything and some kind of cache (i guess internal database) to speed up game loading. Civilization allows for mods to override XML files by creating files with same names in mod directory.

Civilization IV used python for customizable scripting, Civilization V moved to Lua. You can actually integrate either of them quite easily into C#. Also if you are using C# you can do scripting with C# itself, although I would worry about security in such case :)

What I suggest, based from my experience with new things: hack a simplest possible working prototype. Use it as example to develop a new version, reuse good bits, replace/refactor bad ones. But if you worked as developer I guess you know all that stuff.

This topic is closed to new replies.

Advertisement