My plan is to write a game similar to turn-based tactical classic UFO: Enemy Unknown but with my own particular twist. It will be called Hostile Skies, so that name is now (c) and (tm) me! Those of you who have encountered my Quake mods will know that the standard LTH twists are "more customisability" and "more realism". So it will be here.
Strategy
I plan to build a game mode manager similar to the GameScreen project described here and here. I am sure their way is perfectly fine, but I am building this to learn XNA so I might as well start from scratch.
What they are using here is the Strategy pattern - XNA automatically calls Update and Draw on your game, so desgnating your game as the strategic authority makes sense; it can then delegate responsibility to whichever game mode is most appropriate. One starts on the menu screen and proceeds to what UFO calls the "geoscape" but I will call the "world view". Eventually one will proceed from the world view to the "tactical view", an individual battle.
So, I have my GameModeManager in place; it's just the default XNA new project game1.cs renamed, and moved to a directory called /engine.
Config
The first thing I want to do is be able to alter the screen resolution of my game easily; I have a laptop with separate monitor. I downloaded EasyConfig (1.02) to manage this. I added the 3 .cs files from the download to a /engine/config folder, and created a simple config.ini file in my Content folder, containing the following:
[Video]
width=1680
height=1050
In order to get the project to compile, I needed to alter the settings on my config.ini file, to set "Build Action" to "none" (otherwise it tries parsing the file itself and falls over) and "Copy To Output Directory" to "Copy if newer". Hopefully this will help someone out!
No comments:
Post a Comment