On this week's game

Writing takes a lot of time I'd rather spend coding, so I'm writing a β€œdiary” entry only now, when the coding is over.
(I recommend you play the game before reading this.)

The original idea for this game was a butterfly breeding simulator: you'd cross two butterflies, get a bunch of eggs, then hatch the best ones into caterpillars and let them feed and grow, eventually becoming butterflies.

While feeding, caterpillars could power up and gain special abilities to be passed to their offspring: the ability to swim, break rocks, pause time. The objects would have *effects* on the *butterflies* (ha!), which would be then passed to new *caterpillars*.

The breeding stuff didn't get off the ground. There's a bunch of unused code to cross two butterflies with differently colored wings. But ultimately, all I had time for is single-colored ones. You now get eggs for free, and all of the caterpillars are the same when they hatch.
The almost-unused code is the only reason the game requires Numpy. I hope that's not a barrier for enjoying it.

But, what the game does have is caterpillar feeding! It is, of course, based on well-known Snake games: the caterpillar is long and it grows as it feeds. I've taught Snake at Python beginners' workshops, so I'm glad for a chance to polish a game like this.
I'm quite satisfied with the simple colorful graphics and quirky retro mechanics (that are entirely not true to biology!)

I spent way too much time on little animations. They're my favorite part of making a game. I hope you enjoy them!
(And yes, some big animations are rough around the edges. Priorities, priorities.)

There were originally to be 9 levels, arranged 3Γ—3 like a numeric keyboard: you'd start in the middle and unlock gradually more difficult ones near the edges (using πŸ”‘ keys close to the edges). Out of the nine, I got 6 somewhat done. After renumbering, you start at #2 – that might be somewhat surprising, but at least the keys are still close to what they open.

I'm somewhat happy with the tutorial level (#2). I wanted it to introduce the mechanics of all the game elements. It doesn't do a good job with the red mushroom – originally the ability to eat these for effects was supposed to be hereditary (only for descendants of caterpillars that cocooned a boulder), and was to be explained there. But otherwise, a curious player should have no trouble figuring things out.
Level #1 (maze) tests patience and reflexes. I remember fondly games that required this, but I guess we're used to more interesting things now.
Level #3 (grass and boulders) could be much tighter; there's a lot of moving left and right to achieve the goals. The key carousel is nothing more than a gimmick
Designing level #4 (island hopping) was fun at first, then it grew frustrating as time pressure increased. I don't think I had enough time to test the puzzle thoroughly. Hope it's fun to figure out anyway!
Level #5 (crossing the water) turns out to be a simpler variation on #4. That means it can serve as a preview for #5!
And level #6 is just complete filler. Sorry. If I didn't have a 2Γ—3 level select screen, I'd leave it out.

Could I do 3-5 new levels if I had one more week? Probably. It would need some more mechanics, though. I thought about tunnels (teleports), but I haven't figured out how to combine that with cocooning. Launchers (which skip 1 tile) are already somewhat quirky in the edge cases.
If I was to finish the breeding, it would open up the possibility for more powerful items, e.g. cocooning a diamond would grant you a recessive gene with the power of the corresponding mushroom permanently. That would make existing levels way easier, so it would present new design challenges.

But, if I had that time, I'd rather make a library to make cute animations robust and easy.
Even more likely, I'll program something completely different – something serious and not related to games; something that would either help others or get me money.
Caterpillar Effect's code cuts all the corners to save my time in the short run. It's not architected; it's full of code smells that would bite me if I were ever start to extending it. Which I won't – the week is over.

But I'll definitely return to game jamming! See you at some future PyWeek!

(log in to comment)

Comments

Not running in my win7, py37, pyglet 1.5.2, terminates with traceback

{

(pyweek29) D:\tmp\pyweek29\caterpillar-game-master>python run_game.py

Traceback (most recent call last):

  File "run_game.py", line 17, in <module>

    import caterpillar_game.__main__

  File "D:\tmp\pyweek29\caterpillar-game-master\caterpillar_game\__main__.py", l

ine 4, in <module>

    from .window import Window

  File "D:\tmp\pyweek29\caterpillar-game-master\caterpillar_game\window.py", lin

e 7, in <module>

    from .ui import LevelSelect

  File "D:\tmp\pyweek29\caterpillar-game-master\caterpillar_game\ui.py", line 3,

 in <module>

    from .resources import get_image, FONT_INFO, HALF_FONT_INFO

  File "D:\tmp\pyweek29\caterpillar-game-master\caterpillar_game\resources\__ini

t__.py", line 87, in <module>

    pyglet.font.add_file(_font_file.name)

  File "d:\dev\venvs\pyweek29\lib\site-packages\pyglet\font\__init__.py", line 1

73, in add_file

    font = open(font, 'rb')

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jugar\\AppData\\Local

\\Temp\\tmpys082ndbAldrich-Regular.ttf'

}


Oh dear. I don't have a Windows machine available to test there. Guess that disqualifies me.

If you want to play anyway, could you test with https://github.com/encukou/caterpillar-game/archive/master.zip ? I think that should fix the problem.
It woks !