Tuesday, August 9, 2011

The last 9 months

Welp. I haven't updated this for 9 months. I'm gonna be explaining why I was gone and what I was doing, for my massive community of 3 readers :P.

When I was last updated, I had been working on Deep Field for about half a year. Although I had made several good design decisions, the more I playtested, the more I felt there were deep structural flaws in the design of the game. When I started work on it, I originally wanted to make something similar to Oasis, a fantastic indie game released several years ago. But over time, it turned more and more into a complicated strategy game with a difficult to learn system of interactions. This is what I had wanted to avoid most of all: High optimization learning curve. When you played Deep Field, you weren't always sure whether you had done the right thing, and it really hurt the game. It was also slower than I had originally hoped my game would be, it had fewer options at any one time, and the code was an absolute mess. It was a good learning experience, but by the end I was just completely burnt out.

I decided to switch to something else, and try to make a fast arcade shooter. I came up with a cool story, and slowly but surely got sucked into adding more and more features: Randomly generated levels, experience, skills, perks, items, all kinds of stuff. Additionally, I ended up experimenting with shaders, a reasonably new technology for Flash (although a very old technology in game development in general). I put lighting into the game, which ended up limiting me in ways that I didn't realize would happen when I started. I also built out a GUI framework to use with the game. I finished the game about a month ago, and it's been up on FlashGameLicense.com since then, but sadly the fish aren't biting. I feel the game will do reasonably well whenever it's released, but I really would rather have a sponsor than not, so for now it's on the back burner.

This arcade shooter was my second actually complete game, after Polygonal Fury, which felt... lets say fantastic. I had worked a bit on Polygonal Fury 2 here and there since I released the first one, but I kept on jumping around as far as technologies go, making it difficult to keep any steady progress. Over the last month I've switched techs (again), but hopefully this time for good. I'm using Unity now, which has been an absolute blast: It's a fantastic platform. I'm hard at work on Polygonal Fury 2, which I hope to release over Steam or other digital distribution platforms. I also hope to have the game functional for mobile devices, although the power limitations and screen size limitations are pretty extreme. I'll know more about that as I get closer and closer to a finished state.

Deep Field was an interesting project, but when I went back to it after finishing my shooter, I remembered just how much of a mess the code base was. If I was to go back to it, I would almost certainly build it in Unity, taking with me many lessons and ideas I've learned/had over the past 9 months. I do hope I'll be able to one day, maybe even after I finish PF2. I have some ideas for how to simplify the gameplay in a way that will make it much much more fun.

For now I'll be posting up dev diaries for PF2 in the upcoming weeks. I'll try for one a week, explaining a problem, describing my solution, stating the lesson. I liked that format.

Peace out,
Johannes Pauw (DogInLake)

Thursday, November 18, 2010

Endgame Slowdown in 4x Games

Most 4x games share a fatal flaw -- endgame slowdown. Everyone who's played civilization has experienced this issue: at the start of the game your turns take 5 seconds, and by the end of the game you're spending 3 to 4 minutes per turn. This starts to significantly delay the positive feedback that you get from making good decisions, forcing you to make a decision (I'm going to attack Catherine), and then only see the result an hour later.

Some games have no mechanisms to combat this issue, but Civilization 5 came up with an interesting solution, by giving special benefits to small empires. These small empires (1 - 4 cities or so) get to advance along an alternate tech tree at a faster pace than larger empires do. Additionally, when conquering an enemy city you can choose to incorporate it fully into your empire, or turn it into a puppet state. Puppet states still provide you with resources, but are uncontrollable and don't count towards your total number of cities. In this way, a player can continue to only manage a handful of cities all game, all while building, conquering, negotiating with other leaders, etc. Since they released Civ 5, I haven't been able to play through one game with a large empire. I've tried, but every time I give up after a few hundred turns and start a new game with a small empire. I don't think I'll ever go back.

For Deep Field, I wanted to have a mechanic that similarly reduced the amount of endgame slowdown. I decided to incorporate a 'mothership' token, which essentially forces the player to only take action at a specific location. If they want to colonize a new star system, they have to move there and colonize it themselves. If they want to build buildings, they have to fly to the system and queue the buildings up. If they want to attack an enemy star system, they have to transfer some of their fleet to their mothership, fly to the system, and initiate the fight. This system means that a turn takes the same amount of time during all periods of the game.

The mothership also had additional effects on the flow of the game -- at the start of a game you spend most of your time colonizing, building, and exploring. By the end of the game, most of your time is spent fighting enemies and conquering planets. Additionally, it forces interesting strategic choices and encourages players to play by feel rather than working out the perfect set of moves for any particular situation. I feel that overall the mothership mechanic has been a big success.

4x Lesson Learned
Endgame slowdown is something to try and avoid. No one wants to spend 10 times as long to see the result of their decisions at the end of the game compared to the beginning.

Monday, November 8, 2010

Active Opponents in Short Games

When I started work on Deep Field, I wanted to make the enemy empires fully simulated -- they would explore, colonize, grow, declare war, etc. As I built out the A.I. for the enemies, I started to realize that it felt fairly shallow. Battles were always front-loaded, with all of the fleets of the respective empires clashing in one massive confrontation near the border. After this battle, whichever side had more ships left would quickly steamroll over their enemy's solar systems, ending the war.

When the player was on the losing end of this, it felt unfair -- the player didn't have time to react to mistakes that they had made. Obviously there are circumstances where the player deserves to lose completely for making a truly egregious mistake, but most of the time mistakes should be equated with setbacks, not with losing completely.

To make things worse, it felt shallow when the player was on the winning side as well. There was no give and take to empires fighting. When you win one fight and then defeat the enemy empire wholesale, it's fairly boring.

Eventually I realized that the better option was something like the campaigns from RTS games. In Starcraft 2, the enemies in the campaign level aren't fully realized A.I.'s. They start with a huge amount of structures, units, and resources, and then the player whittles them down over time. This makes the game almost feel like a bit of a dungeon crawl. That's the feel that I realized I needed, and so I changed the game to have enemy A.I.'s that attack you every now and then, but don't colonize new stars. The player defeats larger, more powerful opponents one at a time, as they progress through the dungeon of nodes.

Flash 4x Lesson Learned:
Fully realized enemy empires feel shallow in short-form games. The game is decided on a knife-edge, which isn't as interesting as a slow steady advancement as you defeat chunks of the enemy's empires.

Monday, November 1, 2010

Local vs Global Resources

Near the start of my work on Deep Field, I didn't have any upkeep mechanics for income. This meant that both A) you could have any number of ships, since your empire constantly produced them, and B) Your income tended to skyrocket faster than you could use it. I tried solving this issue with increased colonization and alliance costs, but it always felt a bit off. Additionally, the lack of a cap on the number of ships you could have meant that you tended to flip from being underpowered to overpowered, if the enemies left you alone for 30 turns too long.

Overall, it just felt bad. I realized at the time that there's a significant difference between how you should deal with local and global resources.

One of the core skills to learn in most 4x games is judging when to invest resources in a new colony, city, etc. These new resource producing objects cost a fair amount, both immediately, and over time: they take many turns to build up. Eventually they'll be worthwhile, but at the start, they do very little for you. However, if you can use a global resource to start or speed up the development of these new colonies, you can focus your whole empire's output on a small set of locations. This leads to significant and honestly unbalanceable increases in player power.

Deep Field has two local resources: Food and Construction, and two global resources: Income and Research. Research is internally balanced because I set the cost of every single researchable technology by hand. Income needed to be balanced, and I think I've done a decent job. Using a slider, you can set what percent of your Income you want to go towards maintaining fleets. Going from 0 to 100% fleet maintenance should take the player about 40 turns (if they have equal Income and Construction).

This means that they have to front-load the majority of the building time. If they're under heavy attack at 0% fleet, it's likely that they will just lose their entire empire. A player needs to stay at say... 30% to have a hope of defending themselves. And as they go up in difficulty, this number rises and rises. Still, they always want to keep it as low as possible, so they can make more money to start more colonies. This interplay makes for satisfying gameplay, and the short game lengths means that it isn't too frustrating when you gamble and lose.

Tying together the fleet cap and income, and putting in upkeep for buildings, stars, and fleets, has dramatically improved gameplay.

4x Lesson Learned:
Global resources need to be capped or limited in some way. A player's empire will change in size and output dramatically over the course of the game. Allowing them to focus the entirety of their empire's power in one location will end up being incredibly difficult to balance.

Monday, October 25, 2010

Deep Field Overview

Deep Field is a 4x strategy game, in the tradition of Masters of Orion or Galactic Civilizations, mixed with mild dungeon crawler mechanics, like you'd find in FastCrawl. However, because it's a flash game, I've done my best to make the game easier to pick up and play, while making sure that it's still hard to master. In this post, I'm gonna give a quick overview of the structure of the game.

First of all, Deep Field is meant to be a fast game. Taking inspiration from Oasis, my goal is that a player can play through a level of Deep Field in 10 or 15 minutes, and that a campaign will consist of 10-20 missions, instead of 5. Short game length gives a significant improvement to the speed at which a player can learn a game, because they can see the result of making good or bad decisions immediately, instead of realizing 5 hours into a game that they made a mistake in the first hour and now there's no way they can win.

The basic structure of Deep Field should be immediately familiar to many players.
  • The map consists of a series of stars connected in a web by traversable warp conduits.
  • Each star can be colonized, after which it begins to provide resources (Food, Income, Construction, Research). A star's total resource output is calculated by taking the base value it has for each resource, combined with any flat bonuses from buildings, research, or upgrades, then multiplying by any multiplicative benefits given by the star's population level, buildings, research, or upgrades.
  • Colonized stars can build buildings to improve resource output, or to provide special benefits like additional defense or instant travel. They also construct fleets which are used to attack enemy empires.
  • Neutral empires can be allied with for a cost, providing trade income and improved research.
The four resources each have their own function:
  • Food increases the population of the star. Population multiplies resource output for every type of resource the planet provides. Having a total of 10 food means that the star will build up to a cap of 3 population, which will then increase your total output for every resource by 15%. Additionally, a certain amount of population will be used up when you construct a new building.
  • Income is used to colonize new stars, and to create alliances with neutral empires. Additionally, planets and ships both have upkeep costs, which reduce the amount of income you get per turn.
  • Construction determines the speed at which the star constructs buildings and ships, as well as slowly accruing to increase the total number of each type of building you can have in your empire.
  • Research is used to... research. Unlocking new technologies gives a variety of bonuses.

The fact that food multiplies resource production for every type of resource, means that it's an important resource for every star in your empire. Most stars will specialize in two resources: Food, and something else.

Along with shorter game lengths, another major difference between Deep Field and most 4x games is that you have to physically move your mothership around the game world to be able to affect it. You can only build buildings, manage ship construction, colonize, create alliances or attack enemies using your mothership. Your planets will continue to produce resources or build queued buildings while you aren't present, but you can't make any new decisions about them without returning. I really like this mechanic for a short game, because it means that a turn is the same length regardless of whether it's the beginning of the game or near the end. Your endgame turns won't be bogged down by having to manage a huge number of planets and fleets. It also adds some really interesting mechanics, because now time feels like a resource you have to manage. Do you spend the next 25 turns exploring the galaxy? Or do you use the time to stick around and colonize more stars?

Originally, I had the enemy empires colonizing stars, sending fleets, and competing with you actively. But after a ton of playtesting, I found that it's more fun to have the enemy empires be static, other than sending fleets to attack you every now and then. This makes the game feel like a combination of 4x and Dungeon Crawler, which works well with the mothership mechanic. Enemy Empires do, however, become more powerful and start sending fleets more often as time goes on, so you can't just sit around in your empire and wait until you become all-powerful before striking out against them.

Finally, the game is going to have an extensive upgrade system between levels. As you complete levels, you'll be able to give yourself permanent benefits, like higher starting resources, special abilities, increased sight range, faster movement, more powerful ships, etc. As you become more powerful, you'll be able to complete more difficult campaigns, providing a long, smooth difficulty and progression curve.

Well, that's it for now, if you guys have any questions, don't hesitate to ask!

Thoughts on Strategy Game Resources

The purpose and exact function of the resources in Deep Field have changed a lot since I began working on the game, and I'd like to talk about some of the stuff I learned along the way. I think I'll likely write up two posts about the topic. This first one is going to cover basic resource mechanics, and the second one will be about the interplay between local and global resources.

When I began work on Deep Field, I set out to make a fast, fun, casual version of the 4x genre that I love so much. I thought, at the start, that I would do away with the general idea of having population that builds up over time. My plan was to make colonized planets provide a flat level of income for each resource, and have it only change due to constructing buildings, which would also provide flat benefits. But the more I playtested this, the more it grew to disappoint me. In retrospect, I should have seen it coming.

The reason was fairly simple -- without a mechanic like population, which multiplies the base output, specializing planets is pointless. If a planet can't multiply its output in any way, why would you care if your +4 research building was on planet A or planet B? That decision no longer matters, since you'll get the same benefit regardless of where you build it. You run into a similar issue with buildings. If you *do* have multiplicative population (5 population gives + 50% to all production), but you don't have buildings which provide multiplicative benefits, then your best strategy is always to build buildings on planets with high base food. It's better to build that research building on a planet with 5 food and 2 research, than to build it on one with 3 food and 10 research. Eventually, I realized that I need multiplicative effects on both population and buildings, because it provides the most significant synergistic effect when you specialize a planet. And deciding how and why to specialize your resource producing objects (cities, planet, whatever) is one of the most interesting decisions you have to make in any decent 4x game.

4x Lesson Learned:
Making decisions about colony specialization is fundamentally enjoyable, and there should be room for synergy between buildings, colonies, and population.

Saturday, October 16, 2010

Damn... a whole month slipped by...

...while I stopped updating this blog. My previous estimates proved to be off (by a lot), but I'm still working hard on Deep Field. I've always been told by veteran developers that estimating projects is really tough, and man, were they right. I just... I'm terrible at it. Just terrible. Have to work on that for the future, I think.

Deep Field is in a completely playable state, just bug fixes, minor design changes where I've realized mistakes cropped up, and content. I'm aiming for the end of October, but considering my past timeline failures, I think maybe I'll comment that this is the end of October in 'DogInLake time'.

Additionally, I've decided that keeping track of all the changes I make and updating this blog is a huge amount of effort that doesn't give me much benefit. I'll be updating more frequently, but daily updates will turn into weekly updates.

For this upcoming week, I plan on eliminating all the show stopping bugs that remain, and finishing the content creation for levels, achievements, and long term advancement. Also have ask the guy who offered to do music if he could get some rough stuff put together, so I can get a feel for how it'll fit.