Final version, delivered!

For Science!

Dr X and his arch-enemy Dr Z have competed for world domination over the years, until now. It's time to find out who's the Master Evil Genius. For science!

Note: although I've only marked a ZIP as final (to be included in the torrent), there are tar.gz and Windows binary bundles on the entry page!

Final gameplay video:

Post compo updates: For Science!


Meteor Defence (albeit ineffective)
Presented by scav

Give this entry an award


Ratings (show detail)

Overall: 3.6
Fun: 3.4
Production: 3.9
Innovation: 3.6

Respondents: 14


File Uploader Date
Final version (2 release) - Windows Bundle
reidrac 2013/04/21 09:15
Final version (2 release)
reidrac 2013/04/20 20:50
Final version (2 release)
reidrac 2013/04/20 20:49
Screenshot from 2013-04-20 18:41:37.png
Final version, delivered!
reidrac 2013/04/20 17:42
Screenshot from 2013-04-19 22:24:45.jpg
Game screen, almost complete
reidrac 2013/04/19 21:26
Screenshot from 2013-04-16 22:17:19.jpg
Early alpha of the game board
reidrac 2013/04/16 21:46
Screenshot from 2013-04-15 22:12:28.jpg
beta of the menu
reidrac 2013/04/16 21:45
Game idea
reidrac 2013/04/14 18:32

Diary Entries

Day 1: Got an idea, wasted lots of time!

Well, looks like I'm going to implement a board game. I had a reasonable good idea for "secret identity" (although realistically I don't think I would have been able to implement it in a week), but nothing for "nemesis". Oh, noes.

So I spent almost all my first day trying to find a game idea and mechanics that I could implement and more or less comply with the theme requirement.

I'm going with mad evil scientists, Dr X and his nemesis... Dr Z. Not that I love the idea but if life gives you lemons, do it multiplayer! (being multiplayer... 2 players).

I'll try to start with the graphics today, and I'll continue tomorrow after work.

Some spoilers here:

Add a comment

Day 2: Slow start, Cocos2d, some art

Yesterday's art attempt was a total disaster (oh, Inkscape!), so I spent today's commute thinking about alternatives... or how to draw what I want to draw (but I can't) in a way that is compatible with my actual skill.

Today I could only work for 4 hours because of work, but I had some progress.

First I've working in some concept art, put some place holders to see how the game screen will look like. That has been useful because it helped me to realize the tiles were too big and I didn't have room for the action on the bottom of the screen. I could try a higher resolution, but I'm going to stick to 640x480.

I've started with Cocos2d. It's the first time I use it, so it's been a little bit of a shock.

First screenshot

I've started with the general code structure and the game menu, to start with something simple. Cocos2d seems to be very smart and I like how is "directing" me (haha, Cocos2d phun!), so I think we're going to be good friends.

After having diner I had lost all my steam for today, so I tweaked a little bit the menu and wasted some time with "thy olde" SoundTracker to write a tune I've had in my head since I had the idea of the mad scientists. It's not perfect, but I think adds character to the game. I'm not sure if I'll keep the style during the game scene.

So far so good. Tomorrow I'll start working on the game scene, hopefully Cocos2d will be gentle with me.


Day 3: Slow progress and is that a cow?

Well, looks like wrapping my head around Cocos2d is going to be a real challenge. It is a powerful library I can feel it but unfortunately I don't know how to use it (yet).

Anyway, today I've been working on the actual game, drawing the board and kind of drafting a strategy to implement the mechanics, although I'm way behind of what I was expecting for today. Not a big deal, my expectations were probably too high.

After getting totally confused by Cocos2d a couple of times, plus the rage of realising the library won't take care of bleeding between adjacent images in the same texture (I fixed it adding 1 pixel border around the images and removing it when creating the sprite), I went back to Inkscape one more time... with some results. Yes, I'm very proud of that cow (what? "the cow" will be one of the ultimate weapons, for science!).

So that's it for today. I have cash, shield and four attacks (rocket, laser, meteorite and cow). I'd love to have at least one more attack, but I'm not worried about that. I MUST implement the game mechanics before is too late.

Tomorrow is going to be exciting!

Add a comment

Day 4: Quick update

Well, it could be worse... definitely. I'm starting to grasp how Cocos2d works, but it means that my trial/error process is resulting in the most awful code ever!

The good news is that the base game mechanics are almost working. Partially. Kind of. You can swap tiles, the invalid moves are detected and if you match 3 or more tiles horizontally and vertically... the gravity kicks in and the gaps are filled with new tiles.

Lots of things are missing, but I think its feasible I'll have a game by Saturday.

EDIT: ah, and there's at least ONE bug I need to triage.

Add a comment

Day 5: Getting there!

Well, today I got pretty close to what I wanted to be the final gameplay and I think Cocos2d is almost under control (I have that feeling, but things work... so never mind).

You can see a preview here:

What is missing in the video? Several things!

 - Display cash and the assets + their price.
 - The graphic of Dr X and Dr Z (and their evil space stations!).
 - AI opponent.
 - Animations when using the assets.
 - Sound effects.
 - Win / lose.
 - A HUD?

Other stuff missing:

 - Game screen bg music.
 - At least one more tile.
 - Options screen (not sure about this; disable bg music?).
 - Intermediate screen before starting the game to select difficulty.
 - Cut scenes.

I asked for a day off at work so I'll have two complete days to finish the game. Looks like I'll be able to deliver! Yay!


Day 6: The end is nigh!

Today has been epic, but still some stuff to do; one day left!

Revisiting my TODO from yesterday:

 - Display cash and the assets + their price. DONE
 - The graphic of Dr X and Dr Z (and their evil space stations!). DONE the doctors, not the space stations.
 - AI opponent. DONE.
 - Animations when using the assets.
 - Sound effects.
 - Win / lose.
 - A HUD. DONE (kind of).

Other stuff missing:

 - Game screen bg music.
 - At least one more tile.
 - Options screen (not sure about this; disable bg music?). DONE.
 - Intermediate screen before starting the game to select difficulty.
 - Cut scenes.

The AI part was difficult but it has been very useful because I made it play vs itself and it helped me to find 2-3 bugs that I wouldn't have triggered playing myself. I've added a "demo" mode in the menu so you can watch the Dr X and Dr Z kick some ass!

I don't think I'll add one extra tile (no space left in the HUD!), and I tried the difficulty levels and I don't like it, so my list is down to:

- Space stations.
- Using the assets: animation, shield up/down, etc.
- Win / lose screens.
- Sound effects, bg music for the game screen.
- I'd love to have at least one cut scene, but let's finish the important stuff first.

Tomorrow I need to spend some time drawing the space stations and then start programming the animations. Most of them will be easy (although I'm not sure what to do with the cow!).

Finally It's quite interesting how the code has evolved from "I have a plan" to "oh my! it is alive!". Hopefully a game, tomorrow is the last day!

Add a comment

Day 7: Delivered!

Well, it happened again! Another game!

I've submitted my final version. The source code requires Python 2.7 and works straight away in both Linux and Mac, tomorrow is "package day" and I'll try to make a binary bundle for Windows.

This PyWeek has been a hell of a ride. I made the same mistakes of the previous PyWeek (used a library I didn't know well enough), and few new ones. But I'm happy :)

I'll write a post-mortem in a few days. Now is time to have a burger to celebrate!

EDIT: I've released a new version that includes a patch for a bug in Cocos2d. Thanks to sixthgear for the report!


Postmortem: For Science!

Game concept

I had a good idea for the "secret identity" theme, but I failed to find anything interesting for the other themes before the challenge started. Because of that I spent all the first day figuring out what to do.

I decided to use the "arch-enemy" twist of nemesis and I wanted to do something with a strategy component presenting two enemies fighting each other over and over. Besides I wanted to let the multi-player door open, just in case I had the time and the inspiration, and a "vs" game seemed a good idea.

One element that is frequently used in strategy games is resource management. Basically I needed a way to provide to the player limited resources so he had to choose between different actions in order to defeat his enemy.

I'm not sure how I ended with a match-3 puzzle game for that, specially because I used Command & Conquer as a reference for the resource management idea. C&C is one of the strategy games I've played most (back in the day), and I tried to find a way to reproduce some of the basic mechanics with my limited art skills.

The match-3 puzzle kind of works, with very simple rules:
  • You must match 3 tiles or more to obtain resources: money and the assets to use against your enemy (they cost money).
  • Assets let you attack and defend (repairing your shield).
  • It is turn based (just in case the multi-player part happened, remember?): you can match-3 or use assets, so you must choose what is best for you each turn.

At first I meant to use rock/paper/scissors mechanics with each attack having a defensive counterpart, but because my artistic limitations and the time pressure I had to simplify the idea: several attacks with different price/damage to make the game more interesting and a "shield up" asset as defensive element.

The main problem with this game idea is the artificial intelligence, because the player will fight against the computer and it needs to be both challenging and fun. I didn't want to do it too difficult neither too easy.

The best way to minimize the effect of a bad AI is to have a "tournament" or "story" mode with a increasing level of difficulty, or a "human vs human" mode. Unfortunately I didn't have the time to get that far, but it would have been nice.

You can check the "final" idea here:

I'm very happy I stuck with the plan, because by the end of the week I was inclined to simplify things and the result would have been quite different.

Development: what went OK

I read about OpenGL, Pyglet and Cocos2d before the challenge. I made a warm up game with Pyglet, and that was very valuable. In fact I should have done the same with Cocos2d because I didn't know how to use the library and that made things a lot harder (but that's part of "what went wrong").

This time I've used Inkscape for the graphics and I like the results. I didn't have experience with the application, but that wasn't a big deal because I have limited pixel art skills too, and looks like it's easier (or faster at least) to draw decent stuff with Inkscape than to do good pixel art.

For the audio I used sfxr and Audacity, plus SoundTracker for the song (nailed it, didn't I?). I kind of regret adding the song too early in the development process because by the end of the week I couldn't get it out of my head.

Having one day off was great. I don't think I would have finished the game without that extra time, specially because I didn't have a game idea to start programming on Sunday.

My development cycle is kind of slow because of testing, and it is a good thing. In fact I've only detected a very small aesthetic bug in the final version of the game, and that feels great!

Development: what went wrong

Again: don't use a library you don't know well enough. Just don't.

I did it in the previous PyWeek with PyGame, and did it again this time with Cocos2d. Yes, Cocos2d is amazing; but it's hard to use and too easy evolve your code into something unmanageable. Besides that feeling of "I don't know what I'm doing" doesn't help when you are programming against the clock!

I tried to have a better structure for the code, and I had a plan. When I went with Cocos2d I thought the Scene/Director/Action structure of the library would force me to "do things right", but I was wrong because I still made a couple of big mistakes (I went with a view/controller pattern and in some cases I put data in the wrong place). At the end of the week I had a mixture of spaghetti code with some lasagne code (too many layers!).

I didn't test Cocos2d with py2exe and I found a couple of glitches. Not a big deal because I was lucky and I could patch the library, but that's something I should have done before the challenge. After all the hard work it's really heartbreaking when you stumble upon a bug in one of the libraries!

Finally I completed the game scene too late, and I didn't have enough time to play it to fine tune the gameplay and the AI. I think it happened that way because the game is like two games in one: the match-3 part (it was "ready" on Friday) and the attack/defence part (I couldn't finish it until Saturday afternoon); and two control parts: the mouse and the AI.

I have setup a web for the game and I'll release post-compo updates fixing any bugs I find (not many so far).

Final words

This PyWeek was intense, as it is supposed to be :). I had more time for coding than in the previous PyWeek, but the game was more ambitious and at the end I had more or less the same stress level.

I loved it, but I need to find a way to do it less tiring next time!

Add a comment