SpaceWar Update: Horizontal vs Vertical Feature Design
Greetings, Programs!
I haven’t posted about this before so I’ll give you a quick explanation of SpaceWar.
I’m a big fan of 4X space games, games like Masters of Orion 2 and Galactic Civilizations 2. In these games, you take control of a species or empire and try to become the dominant force in the galaxy through colonization, research, combat and diplomacy. But I’ve always thought that they lacked epicness; games will often last for hours or even days, but your interaction with the games are quite limited and travelling to a star system 4 light years away could take just 1 turn!
My vision of a 4X space game would take months to complete, and would be detailed enough to keep people interested for the entire length of the game. The game would run in real(ish) time, constantly, but will not require the players to be logged in all the time. If it takes a fleet a week to reach its destination, you don’t need to sit there watching it go. GO, FLEET, GO! I’d also like to make ship building, research and diplomatic missions more realistic, hopefully simulating at as low a level as possible. An example could be that while on a mission, the captain of your armada’s flagship is taken ill and the nowhere near as experienced commander will have to take over and possibly botch the mission.
To summarise: SpaceWar = Masters of Orion 2 + Dwarf Fortress + FarmVille + Supreme Commander + Neptune’s Pride + Star Trek + Anything else that’ll inspire me in the YEARS it’ll take to make this game.
Anyway…
Today I was working on the ship design system, Ships will be built to a Ship Design, a Ship Design will have various Ship Component Designs such as FTL Drive Designs and Beam Weapon Designs. I was busily working away, when suddenly I realised that I was implementing a generic solution to a simple feature in the knowledge that I will need it later. This is fine in small steps, you can design something to be extensible, but halfway through I stopped and said, “Wait, what the f**k am I actually trying to make happen here?”
That’s when I decided to stop and take a look at how I got to this point. I concluded that I was writing these features all sideways, it seemed to me to be a classic case of horizontal versus vertical feature design.
I’d started by writing the database access layer for the ship components, then the business logic without really realizing what the player was actually trying to do. I decided to stop working on all these inaccessible features in the back end and start bringing the client up to speed. This way I can build the entire feature vertically, starting with the client gui, then the web service call, then the business logic and then the database access layer. Doing this should ensure that my featured remain player-focussed and not just a code for the sake of code.
I like how much I’m learning about the way I work while not in a professional environment, I need to make these sorts of thoughts seconds nature, working on this game seems to be rapidly providing epiphanies.
I suggest every programmer should have a home project to work on, its a great way to flex your code-muscles.
read more