4 Hugues Ross - Blog: 04/01/2014 - 05/01/2014
Hugues Ross

4/26/14

AMAZE Postmortem

With this post, the little saga of AMAZE will be over.
It's rather freeing to be able to move on to other projects, but I think it's good to give it a bit of closure first. Normally, when I make a postmortem like this one I list what went right and wrong with the project. However, very little went right, so I think it's better to focus on what I learned so that I don't make the same mistakes again. Without further ado, here's the list:


When handling things asynchronously, watch out for race conditions:

This is a big one. It's the source of the stupid crash bug that I can't fix. The issue lies in the engine's scripting. Specifically, the ability to put delays in script. Originally, scripts were executed synchronously, in a single frame. By adding delays to scripts, I introduced an asynchronous element that meant that multiple scripts could run concurrently. This quickly became a nightmare, and eventually led to the bomb crash. Specifically, a delay occasionally causes a bomb to be destroyed while a collision script involving it is running. Because the remaining script is now trying to mess with something that doesn't exist, the game crashes. If I'd just made the script activate a timer on the bomb, the script would run on one frame and naturally would be prevented from running unless the bomb existed. This is the method that I'm going to try next time.

Don't put off art/audio:

For that matter, I shouldn't put off levels either. Because I focused solely on the code for so long, the end of development was just a mad rush to crank out as many assets as possible, and the quality suffered accordingly. Had I been working on the assets throughout the process, the game would probably be much nicer now.

Entity Component Systems are great, but don't forget prebuilt objects completely:

ECS was probably the biggest success of the project, but I still screwed up with it. I made creating levels slow, and updating objects next to impossible by not having any means of making predefined object 'templates' that I could stick everywhere and modify as necessary. Not only did this make designing levels take a long time, it also worsened the final product's polish immensely. For instance, I wanted to make a little ding sound and some sparkles when treasure was collected. However, this would've required me to alter every single bonus in the entire game by hand! Seriously, I'm not even joking. Had I made prebuilt objects possible early on, doing this would've been trivial, and taken 2 minutes at most. Whoops.

Preparation is key:

This rule applies to basically everything related to this project. Had I decided on a concrete art style, the game would've looked better and I wouldn't have had the issues I did(Like how some sprites are top-down, and others are from a slightly angled perspective). Had I planned the engine out more from the start, I wouldn't have had to rewrite as much as I did and the game would have been finished quicker. Had I spent more time thinking not just about what to put in the game, but how to do so, I would've started with a much smaller scope. I could keep going for a while, but I think you get the idea. Without a clear direction, the project became a nasty mixture of ideas that didn't quite fit together right.

Start Small:

When making the first version of this engine, I shouldn't have tried for a major project. Instead, I should have tried to make a bunch of small, varied games. It would've given me a better idea of where my strengths and weaknesses lay, and I could have spent more time fixing and upgrading the engine.


So, you might be wondering what will happen next with the engine. To make things simple, I'm taking a mulligan. I'm going to rewrite the engine from scratch and try to apply all of the lessons I've learned this time around. I'm going to plan more, make more small games, and also try to practice art and sound more. Then, hopefully I can try for a major project around version 3. Finally, I'm going to try and be more open about my work. I'm going to set up a public repository for the project so that others can see and contribute to the project if they want. I'll write more about that soon.

4/25/14

AMAZE Released!

Changelog:

  • Added more bonus pickups.
  • Fixed a bug where Zone 2's music wouldn't play.

Well, it's finally over. As of today, AMAZE and all of its source files are available for download on the games page. To be perfectly honest, it's a very underwhelming game. There's a serious lack of polish, a (thankfully rare) crash bug, and a general unfinished feel to the game. It makes me sad, in a way, to see it end like this. I first started this project about a year and a half ago, making it the longest project I've ever completed. Despite this, it has a similar, if not worse, feel compared to my tiny game jam games. Anyway, at least I know the reasons why. I'll explain that more thoroughly in my postmortem tomorrow. 

Needless to say, I will not be making the same mistakes again. I will be beginning a new project shortly, along with the second version of DFEngine. I will be fully rewriting the code, but now that I know what I'm doing it should be a bit faster. Stay tuned for that!

4/11/14

AMAZE - 26 - Done!

Changelog:

  • Finished the last 2 levels.
  • Finished the music for the Title Screen and Zone 2.
  • Added two difficulties: Casual and Challenge.
  • When loading a new game, the correct music should now play.
  • Changing the volume will now have an immediate effect.
  • Added some bonus pickups to almost every stage.

Here's the total completion of the remaining parts of AMAZE:
  • Levels: 30/30: 100%
  • Tilesets: 6/6: 100%
  • Music: 7/7: 100%
  • Total: 100%
So, that's it! The game is finished!

I'm glad to be done two weeks ahead of schedule, though feels rather odd. Normally, I'm several months(or more) off! Anyways, this will give me a couple of weeks to run tests on the game, and maybe tweak things a bit.

Unlike most of my projects, I will also be publicly releasing the source code at launch. You'll probably be seeing me do this much more often from now on. I think it's time to start giving back to the open source community. In fact, I will(hopefully) have the next versions of AMAZE be open source from the start, letting people see my progress much more closely and even contributing if they wish!

If you read my last post, you might notice above that there's no mention of a Hardcore mode. That's because I've decided to change how the difficulties work. Challenge is the same as Hardcore was supposed to be-exactly as the game was up until now. Casual has been changed a bit. Instead of adding checkpoints, I've decided to start Casual games with the maximum number of lives. I decided to change this mainly because of scope issues. Implementing checkpoints alone would be a pain, but then placing and testing them for every level in the game would be a nightmare. It's a feature that I really want to add, but that I should have started long ago for there to be any chance of it getting in. Anyways, if Casual is too easy, or Challenge too difficult, you can change the setting at any time. Note that you only get the extra lives if you start on Casual, and switching to Challenge will not remove them.

Finally, I'm going to take a short break next week, and I'll be back once AMAZE is released. I want to make some changes to this site, which will hopefully make it a bit nicer. If I'm fast enough, I might even manage to launch those changes with the release of the game!

For now though, goodbye!

4/4/14

AMAZE - 25 - So Close...

Changelog:

  • Finished the Final Zone tileset.
  • Finished the music for the Tutorial, Zone 1, Zone 3, and the Final Zone.
  • Life pickups now permanently increase your max life count, but only if you grab them on your first run of the level. Afterwards, they're just a bonus.
  • Finished 2 more levels of the Final Zone.
  • Added an end to the game.

Here's the total completion of the remaining parts of AMAZE:
  • Levels: 28/30: 93.3% 
  • Tilesets: 6/6: 100% 
  • Music: 5/8: 62.5% 
  • Total: 88.6% 

At my current rate, it looks like I might be finishing next week! After I get the rest of the music and levels, I'm going to take the time to add several difficulty levels. I decided to do this, mainly because of the final levels. Right now, even I have some difficulty getting through the last few levels and I've been playing this game longer than anyone else!  I will be making three difficulty levels:

  1. Casual Mode - You'll get an extra hit before death, and you respawn at checkpoints throughout levels.
  2. Challenge Mode - You respawn at checkpoints throughout levels.
  3. Hardcore Mode - No checkpoints, just as the game is now.
To do this, I'll need to put in checkpoints. These should be pretty easy, just setting where to stick the player when killed. Progress and items will be kept when  respawning like this, but the restart button will still reset everything.

I think this will make the game a bit less punishing for players, especially when they're just playing for the first time.

I've also started screwing around with a new project, but I'll save those posts for after AMAZE is finished.