Super Foul Egg 20120702

Here’s the first release of the newly rebranded Super Foul Egg for OSX:

This version includes the original title music/screen, plus a basic menu for choosing the game mode (practice, easy/medium/hard AI, two player). This build probably requires Lion, but I haven’t got any older OSX installs to test on.

It also includes an improved AI that I wrote months ago but didn’t get around to blogging about. The old AI tried to figure out where best to place an egg pair based on the number of connections that a given placement would make. It tried every column for both horizontal orientations, and each outcome was penalised for increasing the overall height of the playfield. The new AI creates copies of the game grid and runs simulations of all possible moves that it can make. It takes into account sequential chains, chain lengths, garbage egg removals and overall grid height. Once all of the simulations has run it chooses the move that produces the highest score.

The new AI doesn’t consider the pair of next eggs that are due to fall, but as I don’t recall ever beating it on its hardest setting (with the standard 4 egg colours) that isn’t really a concern. The main motivation for rewriting it was to improve its performance with 5 and 6 egg colours (which aren’t exposed in the menu system yet). If I remember correctly, the new version beats the old one most of the time.


Really Bad Eggs OSX Becomes Super Foul Egg

My plan to replace the graphics and sounds in the Mac version of Really Bad Eggs never came to fruition, so I’ve decided to switch back to using all of the original assets and the original name. The Mercurial repository can now be found here:

Recent changes include the addition of the original title music and title screen. I’ve also upgraded it to the latest release candidate of Cocos2D version 2. The options screen is the only remaining feature to complete before I can make a new release and move on to a new project.


Really Bad Eggs OSX Demo

Here’s a preview release of the Mac version of Really Bad Eggs:

For those of you without a Mac, here’s a screenshot:

I’ve been debating what to do with the game when it’s finished. I can either:

  • Open-source it on BitBucket;
  • Release it via the Mac App Store;
  • Release it as freeware on this blog.

If I want to release it on the Mac App Store (which would be neat) I’ll need to sign up for the Mac Developer Program. That’ll cost me $99 that there’s little chance of recuperating. There are a couple of Puyo Puyo games on the store already for bargain prices. I haven’t tried them so I’ve no idea if they’re any good, but Really Bad Eggs would probably need to be free to get any downloads at all. I won’t put advertising in the game, so there’s no chance of making any money from it.

I’ll also need to replace the graphics and sounds. I haven’t been able to track down the original developers so can’t get their permission to use their assets. I’m sure they’re great people and would have no objection to me using them, but I’d rather not get the game pulled due to a copyright dispute. Fortunately I know a couple of great artists who have expressed an interest in helping to replace the graphics, so that’s not too much of a hassle.

Releasing it as freeware is much cheaper (it’s free). If I can get the game listed on something like MacUpdate it should get plenty of exposure.

The last option is to open-source it. As a huge fan of open source software I’d love to do this, but I’m loathe to supply a finished game that someone else can release via the App Store themselves.

Anyway, the game in its present state is playable but has no presentation screens. The CPU is set to its hardest level, and restarting a game requires the player to restart the application. It has a few improvements over the DS version:

  • The larger screen let me include the blocks at the bottom of the two grids;
  • The garbage egg landing animation is more effective;
  • Eggs drop off the bottom of the losing grid when a game ends;
  • It includes the original background graphic from the Amiga game rather than the truncated DS version;
  • The incoming garbage indicator is in the original Amiga position at the edge of the screen, rather than on a separate screen where it can’t easily be seen.

Have a play and let me know what you think. Controls are included in the readme.


Really Bad Eggs Progress

The final version of Really Bad Eggs is almost ready. All of the coding is done. I’m just waiting for a title screen graphic from Noj, creator of the Simian Zombie monkey, before I release it.

As you’d expect from a jump from an alpha version to a full release, there are many substantial changes. First off, I’ve ditched the Tetris-style mechanics in the single-player game. Like I said in the last blog post, the single-player version of Puyo Puyo is dull no matter what you do. The real excitement comes from suddenly being given a dozen garbage eggs to deal with, which doesn’t happen when playing solo. “Game A” is now “Practice”, and “Game B” no longer exists.

The AI is almost entirely new - I rewrote it pretty much from scratch. It is considerably better at playing with 5 and 6 block colours than the previous version, and on a similar level when playing with 4 blocks. To test the performance of the new AI I had it play against the old AI as a benchmark. I watched each match and tweaked the code to deal with errors that it was making. As 4-colour matches took around 20 minutes each, this was a laborious task…

As an interesting aside, the new AI can rotate shapes in all 4 orientations, but enabling this ability led to it getting resoundingly beaten by the old AI in almost every match. I’ve got a few of theories as to why. It could be that playing horizontally reduces the opportunity for the AI to create vertical towers and hasten its own death. It could be that placing blocks horizontally leads to greater opportunities for accidentally creating sequences of chains. Lastly, it could be that, given the opportunity to place blocks vertically, the AI is more likely to block off a potential chain when adding to it by placing the chain block’s partner above it. The new AI will only use horizontal rotations.

The final version of the game includes a practice mode (single player renamed), easy, medium and hard AI modes, and a two-player mode. I initially dismissed the two-player mode as impossible, given the dismal state of wifi on the DS and the awkwardness of using a single DS between two people. However, the shared DS option was so trivial to implement that I added it in. I’ve included a suggestion in the readme that players switch sides between rounds of a two-player game to ensure that the player on the right isn’t at a complete disadvantage.

All of the block colours, bitmaps, sound effects and music are now in place. Various bugs have been squashed. It will compile and run in MacOSX thank to the usual SDL abstractions that I build into my DS code. Unfortunately, the SDL_mixer library does not support playing samples at user-defined frequencies, so the chain explosion glissando doesn’t increase in pitch each time a new chain sequence is created.

If you’re a regular reader (though I don’t think I have any regular readers), you might have noticed that I haven’t blogged much about this game. Other than the initial announcement/release, there’s been nothing. There is a reason for that: Really Bad Eggs was fairly trivial to write. Other than a mildly interesting graph traversal algorithm to identify chained eggs, the game is a simple grid-based Tetris clone. There really wasn’t much to blog about. Like EarthShakerDS, though, it was enormous fun to write.

One thing that is worth blogging about is the template I’ve put together for WoopsiGfx projects:

WoopsiGfx Template

This extends libwoopsigfx with:

  • Abstractions for the DS’ buttons that will compile with SDL and map to keys;
  • Abstractions for the DS’ touchscreen that will compile with SDL and map to the mouse;
  • Double-buffered framebuffer class that can be used as a wrapper around an SDL surface;
  • Hardware class that initialises the DS into a state ready for libwoopsigfx;
  • Makefile that builds and includes Maxmod-compatible files in the /sfx folder;
  • Pre-built folder structure.

You can take the template and get a libwoopsigfx-based game running in no time. Even better, the same code should compile on just about any platform with an SDL port so that you can test your code in a real debugger. Coding without a debugger or any kind of profiler makes you proficient at debugging by the seat of your pants, but sometimes it’s nice just to run Xcode’s memory leak identifier and have it spot problems for you. EarthShakerDS used an embryonic version of this template, whilst Really Bad Eggs uses the latest version.


Really Bad Eggs 20110627

Another of my favourite games from when I was growing up is Super Foul Egg. It’s a simple Puyo Puyo clone that excises all of the tedious anime interludes present in the original and focuses exclusively on the gameplay itself.

Really Bad Eggs is my latest project: a DS port of Super Foul Egg. However, I’ve been tinkering with the game a little to try and improve the single-player experience. You can download a copy here:

I’ve tried to bring some of the mechanics of Tetris to Super Foul Egg:

  • The game tracks how many chains of eggs you make;
  • The game includes levels, and the current level determines how fast the current shape drops;
  • The level increases each time 10 chains are made;
  • The game tracks the player’s score.

At the moment, I’m not sure how well the new mechanics work. The game doesn’t have the same draw as Tetris in single-player. Two-player mode (in this case, one player vs the AI) seems to be the only way that Puyo Puyo is really interesting, mainly because suddenly getting garbage dumped in the grid is the only excitement in the game. The game includes two of the Tetris-inspired game types: type “A” and “B”, which reflect the game types in GB and NES versions of Tetris. At present, type “B” is less exciting than type “A”, so I might ditch it.

In any case, the new mechanics are only part of the single-player mode. The player-versus-AI mode uses the familiar Super Foul Egg mechanics, and features an AI that would put up a good fight against the original.

Here’s a screenshot: