torsdag 20. august 2015

WOA III Death is Awesome Post Mortem

It has been a few days since I submitted my game 'Death is Awesome' to the GameDev.net's third annual game jam 'Week of Awesome III'. This post will chronicle some of the thoughts, processes, problems etc. encountered during the one week spent creating the game.

At first I thought that the theme, 'Death is useful' was really cool, and then I sat down to try to create a game incorporating this theme. The first thing that popped into mind was that you had to sacrifice the player character to set off traps so that the next player character could bypass it, or that the corpse of the previous player character would benefit the next one in other ways. Then I figured that since it was such an obvious interpretation of the theme it would probably be done to death (sic) so I should probably try to go down another road.

Then I thought about an olg german board game called 'Ursuppe' in which you play as amoebas in the primordial soup, that when an amoeba dies it serves as food to other amoebas of different colors. So I thought that would be quite cool, retrieved the board game from my closet and played with it a little to see if that mechanic could be converted to an enjoyable computer game. After a while tinkering with that idea I eventually discarded it, and went back to the drawing board.

I started googling 'death', 'death is useful' etc. to get some inspiration, and came over a youtube video about the black plague in the 1300's. The video itself was very interresting and what struck me the most was the incredibly interresting setting - Europe in the 1300's, full of pestilence and death. But how was death useful? It was certainly useful for the people that survived, that now had access to a lot more resources than before. It shifted the balance of power from the lord to the farmer in a way that forever would change Europe. But making a game about that would be too time consuming.

A little frustrated by now, I then remembered a very interesting article I had read some time ago by one of the game designers behind 'Magic: The Gathering'. (http://archive.wizards.com/Magic/magazine/article.aspx?x=mtg/daily/mm/174) - I thought I revisit the article and maybe get some ideas.

A game needs a goal, a set of consistent rules, inertia that drives the game forward, an element of surprise, room for strategy, fun (that can be achieved in a variety of ways), and flavor. The game also needs an element of conflict: What does the player want, why can't he have it and why should we care?

I thought the flavor was already in place, Europe in the 1300's, black death, farmers. So what about the rest? My inertia element was going to be plague and hunger. The cause of the spreading of plague was the rats, so that fell into place as a natural adversary in the game. Rats spread the plague, that kills farmers, and no farmers lead to no harvest which leads to starvation. I thought it would be fun if the rats also ate the harvest, evil rats that they were, and so it was. So, farmers - good guys, rats - bad guys. Kill rats, help farmers.

Now I had a basic idea for the game but as it was now death was not useful at all. Quite the opposite. I thought, who would benefit from death in this scenario? I thought about an undertaker. A priest. But then it struck me: Death himself! He must have had a field day at the time with so much Death going on. But why would he want to help the farmers? What does Death want? Souls. How does he get it? Deaths. Why doesn't he get it anymore? Too many people died so population has shrunk so much that not enough people are born to die. Crisis in the underworld!

I then imagined a little family in the netherworld with loving and overprotective Mom Death, strict and stern Dad Death, and little spoiled Death Jr. Dad Death is worried about the decline in deaths and wants Death Jr to go out and be useful for a change. Help the farmers in Europe get back on their feet so humanity can survive!

The idea made me smile so I thought that it was something I should try to make.

First I thought Death should only kill the rats. Then I thought hey, he has a scythe after all, why not cut some hay with it? The idea started to form. Kill rats and harvest hay. Bring the wheat back to the barn.

I started designing the main character. I wanted a flowing cape, a flaming aura, a skull and a scythe. As the basis for the game I used my own game engine. The engine uses Box2D for collission detection and physic, so I figured I could create a chain of bodies connected with revolute joints to make up the body. Fired it up, and it looked really good. I created a particle effect to place on the character's head to create the aura. I fiddled a lot until I got something that looked half acceptable. It was fun just to fly around. I figured Death needed a scythe so I made that. Then I thought he should probably be able to shoot some fireballs to kill the rats, so I added that. I also added controller support, and it was very fun just to fly around and shoot fireballs and chop with the scythe using the controller even without any enemies so I was happy!

I began creating the harvesting mechanic. I figured the player should be able to harvest each field 3 times and wheat should appear each time you swing the scythe that you then had to collect. The player should have a bag that you filled with wheat that would get full after a while, so you had to empty it. Then I had to create somewhere to place the harvest, so I started with crates. It did not seem to fit with the time period or even how things worked back then (or even now) so I tried to create a horse cart. My drawing skills were not good enoug to pull that off, so I opted for a large basket instead, modified from some free graphics from Wikipedia. Added some tween animations to the wheat when you harvest it so it bounces around a little, then figured I could use the same animation for rats when you slash them. I then added images of wheat in the basket to show how it filled up when you added wheat to it. I also created a particle animation with flying wheat for each time you do a harvest or placement of harvest in the basket. It started to look good!

I fired up Spine and created the farmer animations. One farmer boy and a farmer girl. I figured I could programmatically change the colors of clothes and hair to make a varied set of farmers - a cheap option but I was short on time. I also created a rat animation based on an animation I found online. Time to put them into the game!

In the game the farmers and rats didn't do much until I added some behaviors. I thought each creature should have 3 states: Neutral, Defensive and Aggressive. When neutral they should just walk around. When they spot the player they should change to defensive. While defensive they should flee trying to escape the player. When the player is no longer near, they change back to neutral. While in neutral sometime rats change to aggressive. When aggressive they seek out appropriate targets, that is wheat laying on the field or wheat in baskets. They then 'seek' those targets to eat the wheat or steal wheat from baskets. At all times I also needed to keep the enemies within the boundaries for the game so I added a 'Keep within Box' behavior as well to all creatures. I also added a tween animation for the farmers when they died, so the fall on their face or on their back and bounce a little when they die. Looked funny.

It was very satisfying to see the mobs react to how the player moved around and to the players attacks. But I thought the neutral behavior was a little boring, so I decided to change it to a flocking behavior instead. Adding a flocking behavior to a single rat does not do much so I had to create behavior groups. This is something I spent a long time on, getting the behaviors right. But after the change rats move in coordinated groups that spread out when the player approaches, then go back together again when he no longer is near. Looks very good so I think the effort was worth it.

Time to add some sounds, so I created a scythe sound, and recorded a lot of different sounds with my voice using a voice distorter app on my Android phone. This turned out surprisingly well. I also found some sounds on Freesound.org that i imported into Audacity and remixed to more fit my needs.

I then fired up jcgMusic to create music. I thougt I should at least have menu music, in-game music and a piece for the story to set the mood. I clicked and clicked until something I liked turned out. Converted the midi to a chiptune using specialiced software. Imported the resulting sound file into Audacity and added some reverb and chorus and cleaned it up a little. Sounded OK so I added it to the game.

I thought about placement of baskets and fields. To add a strategic element I decided to have the fields and baskets spread out so the player had to choose where he wanted to deposit wheat. Different baskets were near different fields, so the player has to choose between depositing all wheat in one single basket that is easier to defend from rats but that which distance from the field increases as closer fields are emptied, or deposit wheat in the nearest basket at all times and risk that rats eat from the baskets further away while you do so. If rats eat too much of the harvest it is game over.

The idea was good on paper but did not turn out as well as I had hoped in the final game. I think it would have been better if I had more indication at all times about where the baskets and rats were on the map. It was a little too hard to see when and where rats ate your wheat, leading to 'game over' without even knowing why a lot of times.

I figured I should implement the plague in the game. A plague that spreads. So I started creating the mechanics for that - a rat could spread the plague to other rats, and to farmers. If all farmers die it is game over. I figured that should be a loose condition - all farmers dead. I also made it so the player could kill the farmer if he was not careful, that way the player could shoot powerful fireballs to kill rats but due to the wide arch of the fireball it was a rather high risk of killing farmers at the same time. So kind of a risk/reward mechanic: Kill rats with the unsafe but very effective fireballs at the risk of killing farmers, or use the more safe but not as effective scythe. I also wanted the fireballs to set baskets on fire but that never made it into the game because of time restrictions.

After some thinking about the problem of rats eating your crops too quickly I came up with a couple of solutions. I added two elements to the game that would distract rats from eating crops: Lamps and corpses. The lamps could be turned on by fireballs and added to the strategic options for the player - depending on which lamps the player turned on he could control the playing fields - distracting the rats over to an area that was already harvested or where there are no fields or baskets to mitigate the risk of rats eating his crops. The same with corpses. Killing a farmer in a certain spot would distract rats to that spot. So now you could also herd humans to where you want them before you kill them. I though killing farmers was kind of counter productive, you were there to save humanity after all, so I made it so you could only kill plague infested humans without getting a score penalty. But be quick, because when the human contracts the plague it keels over quite quickly (The real black death killed a human in 4-5 days so I felt that was within the flavor of the game). Now death was also useful in a new way.

Now there were starting to become quite a lot of mechanics and rules in the game, and I got feedback that said it was too hard to understand what to do so I could not avoid creating a tutorial. I did not want to simply put all instructions in a readme file because people seldom read those anyway. Also the game might be placed embedded on a website somewhere and then the player won't have access to the readme file anyway.

I spend a whole day on creating a quest system to be able to give the player tasks to perform, and another day to create the dialog system that would progress the tutorial quest. I created the dialogue system so that I could also use it for the intro to explain the background for the game. I downloaded skull images for my person gallery and found some free clipart to try to give each of them a personality: Eyelashes for mom, a monocle and moustache for dad. And I figured I also needed a narrator, so I downloaded a rat skull and gave it some glasses to look smart. Presto! Wrote an intro story and the tutorials. Tried out the tutorial on the girlfriend and it seemed to do its job.

Now I needed some levels. The game engine can create a lot of different types of procedurally generated maps, so I used that as a basis to create each level. This creates varied maps with little effort, but you loose a bit of control of how the levels look. For this game some tweaking was needed to create appropriate maps, but having the basic map generation free from the engine helped a tremendous amount. The map selection functionality I also basically got for free from the engine.

Time to work on the menus. The engine has all the wiring to create maps and menus and buttons and such, so it was not too much work putting it together. I spent most of the time on assets and menu item animations. I created an about-screen. I also had to spend some time on saving the player state between levels.

I had to have some text on screen to show how much place you had in your bag for crops, how much crops total saved, how much crops left, how much crops the rats had eaten, and also the player experience points and level. I spent a lot of time to get the essential information on screen in an understandable way for the player. I don't think I succeeded entirely but it ended up way better than it was in the beginning when not even I understood why I lost a level.

And then there was tweaking. Lots and lots of tweaking. The player gets more powerful with levelups (more fireballs, larger bag for crops, faster scythe swings that do more damage) but enemies also get faster and more numerous. When I was happy, it was time to implement the win/loose condition checks, saving of player state between levels, and all the necessary nuts and bolts. I added a medieval city name to each level to add to the flavor.

I did add an achievement effect so that the player at least has a sense of achievement each time he increases in power. Each level looked very similar, with the same graphics, so I decided to add a different background to each level, and also to add some features like trees and bushes to give each level a more unique look, and more features.

I wanted to include the 'end game win condition' and a 'win game' screen so it was actually possible to finish the game - but time did not permit. So now you can play and clear all levels but all you have to show for it is your score. You can replay the same level over and over and get more and more powerful. When you die you just retry. This is what bothers me most with the game, and what I would have worked on had I had one more day.

Hopefully the game is still an enjoyable experience.

Ingen kommentarer:

Legg inn en kommentar

Your comments