Celebrating Food Chain Farm version 0.7

I just released version 0.7 of Food Chain Farm, my casual space ecosystem sim. Get it while its hot!

So let’s talk about this release. What’s new in this release? What have I learned along the way? And when will the game be finally done?

What’s new?

It’s fair to say that this is a pretty big release. I even took a 3-month sabbatical to work on the game.So what’s new in Food Chain Farm 0.7?

Food Chain Farm can get quite hectic sometimes…

First of all, I’ve added a story. I wanted to motivate the player, to set a goal that you can engage with emotionally. So I’ve written some lore, and it goes as follows. You are Xlorp, a young alien boy, and you have to take care of a marooned interplanetary colonist, a rescued human. Being an alien, your biochemistry is very different from humans, and therefore you have to figure out everything from scratch. You have to build a supporting ecosystem. You’ll start to grow some plants to generate oxygen, and some simple vegetables as food. Over time you learn to make better and more tasty food, and improve life quality for your human pet.

Meet Xlorp…

Secondly, I wanted to some sort of progression system in the game, a way to upgrade your systems and unlock new possibilities over time. So I’ve added this in the form of the pet store. Zed, the store owner, advices you on how to best take care of your human. If Zed sees that your human is doing well and you can handle the responsibility, then he will sell you some useful pet care amenities. Perhaps some livestock, or some kitchen appliances to produce better quality food. Zed is a helpful and knowledgeable being that really supports you while you’re trying to figure things out.

For the third addition, we have to dive more deeply into the science. I wanted to make the game system more complex, so there is more to explore and discover. Previous editions of food chain farm have focused only on the carbon cycle, now I’ve also added a nitrogen cycle. Nitrogen is an important compound for life, no living cell can be made without it. Nitrogen is all around us – the air we breathe is almost 80% Nitrogen. Yet most of this nitrogen is not in a form that plants can consume. Dealing with that is an interesting challenge.

The nitrogen cycle involves bacteria consuming some delicious ammonium

Outgrowing the classroom

So just a bit of background: I started work on Food Chain Farm a few years ago, in collaboration with my sister who teaches biology in high school. At the time, my goal was to create a game to teach biological concepts in a fun and visually interesting way. Carbon cycle, photosynthesis, food chains, all of that can be quite abstract sometimes, but I wanted to make it really come to life. This has been quite successful. The game has been used in classrooms over half a dozen times, and another classroom session on the nitrogen cycle is on the schedule. (If you’re a teacher reading this and you want to try it in your classroom, contact me).

But, I’ve come to realize something about games for the classroom. They can get away with being less fun, because:

  1. You have a captive audience.
  2. “More fun than regular class” is a low bar. Students appreciate anything that breaks the rut.
  3. The game needs to be entertaining for only one hour. By contrast, a store-bought game needs to be entertaining for a dozen hours, to feel like you got your money’s worth.

And that is also why the label “Educational game” has so many negative connotations. Marketing is very different for educational games. Educational games are sold to teachers and parents. They need to showcase educational value. The kids, who get these “fun” games hoisted upon them, learn to associate “educational game” with “boring, forced experience”. In other words, if you target parents and teachers, educational is good. If you target gamers, educational is best left out.

And here’s the rub. I’m gamer at heart and it stings to think people will think less of Food Chain Farm due to the educational label. I want to prove that games can be both fun and educational at the same time. That the educational aspects of a game don’t make it less fun. And the only way to prove that, actually prove that, is to make a commercially viable game – competing in the real world against games that are definitely fun.

So, no more “educational”, at least not in the marketing materials. Instead, I’m going with the phrase “science-based game”. It’s a real game, designed for having fun. However, grounded in science. Like my favorite book, “The Martian”, by Andy Weir. This book is, at the highest level, a gripping tale of perseverance and inventiveness in the face of almost certain doom. If you come away learning something about how to grow potatoes on mars using rocket fuel, then all the better, but that’s really just a side-effect. I’ve not “given up” on making games for the classroom. But I realize that I can’t be sure that the game is fun, unless I can also sell it as a regular game.

Future plans

Let’s be clear here – the game is not done! What we have at the moment, you may call an “Early Access Demo”. I’m releasing as a way to gauge reactions, and to show my plans. But there are definitely rough edges, and I have so many ideas for improvements. Here are some ideas I’m considering for a future update:

  • Saving and loading. Currently there is no way to save progress, if you close the game you have to start over. This is something I intend to fix.
  • Bio-plastics for building pipes and tubes (you no longer get them for free)
  • Blowing up asteroids with explosives to get extra resources and discover secrets. Many explosives are based on nitrate, which ties nicely into the nitrogen cycle.

What else should I add? Let me know! And if you want to stay updated on future releases, subscribe to the newsletter or join us on Discord!

Developing an art style for food chain farm

rabbit sketch and final version

Just a couple of weeks ago I released version 0.5 of Food Chain Farm! This release has been a year in the making and has a ton of new stuff. Today, I want to dive deeper into one aspect: the improved art style.

The game has a lot of graphics, more than any other game I’ve done before. Dozens of plants, animals, resources and other objects, all drawn in detailed vector graphics. And it’s a huge challenge for me. I’ve always been programmer first, graphical artist second (and music is even further down the list…). For most games I worked on in the past, I’ve either limited myself to a small amount of pixel art, or I’ve outsourced the artwork to a partner. They say you need to put in 10000 hours to become really good, and I’m afraid I haven’t put those hours in yet…

And there are so many beautiful indie games out there. It’s hard not to feel discouraged when there are so much awesomeness to compare with. Nevertheless, I’m going to stick with it. I’ll be the first to admit that this art style is a work in progress. But with the 0.5 release, for the first time I’m happy with the direction things are going.

As an example, let’s look at how one item in the game has evolved over the past years:

apple tree original

The apple tree has been in the game right from release 0.1, back in 2018, and I put it together quickly in Inkscape, from basic geometric shapes. The foliage is just the union of bunch of circles, the trunk was drawn as a polygon using the mouse. Inkscape makes it easy to adjust the curve of a given line, so I made the sides of the stem curve inwards. The apple itself is a modified circle, with a green-red-white radial gradient to give it a nice shine. I added a short brown line for the stem of the fruit. To top it all off I gave the foliage a gradient as well, as a cheap way to give it some highlights and shadow.

This was always meant to be a placeholder, to get going quickly – it was never the intention that this would make it into the final game. But coming up with a better version took longer than I thought.

I’ve experimented with various methods e.g. using a Wacom tablet, using the ‘trace sketch’ function in Inkscape, with mixed results. In the end I settled on a much simpler process: I first sketch on paper, I scan it, and then trace the sketch with the mouse, in Inkscape. The result looks like this.

apple tree sketch and final image

For inspiration and examples, I use images from the internet of course. But in this case I could actually take inspiration directly from my environment. I live next to a small orchard, and there is this nice old apple tree right in front of my house. The trees tend to be pruned to a flat wide shape (I guess it’s easier to pick apples that way) and end up with crooked, gnarly looking branches. It’s something that I tried to mimic in this sketch.

photo of apple tree

The sketching phase is important. I’ve learned that I’m much better at coming up with ideas on paper first. Sketching digitally doesn’t work well for me. And over time, my sketches have developed in a certain way. I’m making them more elaborate, trying to add more character, but at the same time I make them looser, more playful. I spend less effort making the sketches very precise. I don’t worry about the exact lines until I digitize the sketch in Inkscape.

To see what I mean, take a look at this bunny character. I started with a few quick sketches. These were drawn after photos and have realistic proportions.

rabbit sketches

Compared to, say, a cow or a pig, bunnies have a relatively small, narrow face. And, of course, large ears. By giving the head a more exaggerated shape, narrow at the eye level, and oversized ears, the essence of the character becomes more rabbity. I switched to a frontal perspective, this is a common theme for all animals in the game.

I’ve tried to become less rigid, using more round curves instead of straight lines, even for things that ought to be straight. Take a look at the new oven drawing for example. Here I exaggerated the roundness of the countertop and the brick sides.

oven sketch and final image

Below you see some sources of inspiration. The picture on the left is from Anton Pieck. This Dutch artist is known for a romantic style, with old fashioned candy shops, life-worn houses and snow-covered Christmas villages. His paintings put a lot of detail in building materials, making them atmospheric and full of character. I grew up with this art style – he was the original designer for the Efteling theme park, where I visited frequently as a kid. The image on the right is from the game Oxygen Not Included (ONI). I love this game for the art style. Everything is full of character. Ladders, pipes, walls and floors – things that really should be straight – are higgledy-piggledy. ONI takes creative liberties to give it a unique character. By the way, ONI has more things in common with Food Chain Farm – more on that in a later post.

inspirations

Also, to get more practice (to get those 10000 hours if you will), I’ve been  taking some live model drawing classes. The pictures below were taken during a socially distanced drawing class this summer. Drawing live models is great sketching practice. You have to be quick – the model can hold a pose only for so long. One common warm-up exercise is to draw a succession of poses in two minutes. It seems impossible at first, but you really get better with practice.

Photo of drawing class

Of course, for the game, I can change proportions for a more cartoony appearance. Here are some sketches I’m working on, for a future version of the game.

Have a look for yourself, Food Chain Farm 0.5 can be downloaded from itch.io!

Bringing Food Chain Farm to the classroom

We tested Food Chain Farm for the 3rd time in a classroom setting, with great results. So, how does that actually work in practice?

We use a modified version of the game. The first three “levels” are really just simulations. Students have to watch clouds of oxygen and carbon dioxide move between farm animals and answer about 20 questions on paper. Starting with a questionnaire might seem like a boring way to present a game, but it works well. Not all students are natural gamers, and this way they can think about biology before they have to think about which buttons to click.

The first few questions are extremely simple and are designed to make the students just observe what is happening on the screen:

Question: Which two resources are produced by the tree? (Answer: Oxygen and Apples)

Further on, it gets a bit tougher and students are supposed to link what they see with what they’ve learned before.

Question: Which process takes place in the tree (Answer: Photosynthesis)

Question: which cycle is simulated in this game. The carbon cycle, or the nitrogen cycle? (Answer: the carbon cycle)

But then we get to the more interesting part. Further questions do not have a single simple answer. They are designed to make the students think critically, and are a great starting point for classroom discussion.

Question: the tree converts inorganic substances into food, which the cow consumes and converts again into milk and inorganic substances. However after a while, the truck is full of milk and the cycle stops. Why does it stop? (Answer: If milk stays in the truck, then resources are taken away from the cycle. The cycle is actually incomplete, and must break down eventually)

After the questionnaire is done (after half an hour), students are free to play the regular game as far as they can get. They continue to play and build at their own pace. For an extra challenge, all scores are tracked and projected on a central screen.

This is a game is about concepts like photosynthesis, carbon cycle, trophic levels,  producers, consumers, herbivores, carnivores, assimilation, dissimilation, food, and energy. But the game doesn’t explain these concepts. I wouldn’t recommend giving the game to new arrivals without instruction, and expect them to be able to take a biology test afterwards. What the game does do very well however, is use what was already taught, and reinforce it, visualize it, provide a fresh perspective on it. The novel presentation keeps students engaged.

I’m looking for more volunteers to test the game in a biology classroom. After three tries I’m very confident that I can provide something that is both engaging and educational. The question list can be adjusted to the level of the students to a very large extent. If you are a biology teacher, or know one, please leave a comment or send me a tweet.

Do you just want to play the game? Food Chain Farm can be downloaded here. Version 0.2 is out now and 0.3 is coming soon!

Introducing a new game: Food Chain Farm

As mentioned before, my goal is to make an educational game. After more than a year of quiet behind-the-scenes development, Food Chain Farm is ready to come out. It is a construction game in a fun farm environment, with a tinge of biology education.

In the beginning, you see a pig, floating in a box in space. It needs food and oxygen to survive. Where do you get that from? A bit further, there is another box containing an apple tree. Connect the two boxes and transport apples and oxygen from the tree to the pig. At the same time, bring water and carbon-dioxide back. Thus, you form a sustainable loop. Animals and plants living together, each producing what the other needs.

It’s probably clearer if you watch the trailer:

Food Chain Farm is intended to be used in a classroom. Concepts such as photosynthesis, metabolism, and the carbon cycle are very abstract. The game visualizes these concepts in an appealing way, making the theory come to life for students. I collaborate with high school teachers, to try out the game in a classroom setting, to find the right balance between fun and education.

classroom
Testing out the game in a classroom

Food Chain Farm simulates photosynthesis and other concepts from real-life biology. The simulation is simplified, of course, but still realistic. Some may think that a realistic simulation is boring, and you need to introduce artificial rules to make the game fun. But I believe that this is not necessary. Nature itself is full of trade-offs, leading to interesting choices that make for an interesting game!

Version 0.1 is ready for download for Windows and Linux. This is still the early access phase, so be sure to leave some feedback so I can improve the game!

Optimizing OpenGL performance with apitrace

Today’s post is for the programmers: it’s a bit technical. I finally solved a long-standing performance issue  in Happy Usagi, and I thought I’d share my notes.

The issue

This was the problem: Happy Usagi was sometimes a bit jittery or choppy. The graphics weren’t entirely smooth, there was a little interruption every second or so. On newer computers it was barely noticeable, but on some older models it was a real issue. And the graphics aren’t complicated, so there really was no excuse.

Allegro and OpenGL

Usagi uses the Allegro game programming library. Allegro bundles a whole bunch of libraries for various aspects of games: sound, physics, joystick input, etc. For graphics, it depends on OpenGL (it can optionally use DirectX instead but that’s not relevant for this story).

Allegro wraps around OpenGL, and in effect hides its complexity. This is a double-edged sword. As long as everything goes smoothly Allegro makes things easy for the programmer.  But when there is a bug, Allegro hides what is really going on. So you need a way to look under the hood.

Enter apitrace

Apitrace is an open source tool for tracking all the OpenGL calls done by your program. Installing apitrace on linux is as easy as:

sudo apt install apitrace apitrace-gui

To start recoding a trace:

apitrace trace --api gl build/debug/usagi

This generates a file named usagi.trace (or usagi.1.trace, usagi.2.trace etc.). You can view this file with

qapitrace usagi.trace

Which results in a screen like this:

Each frame (drawing cycle), apitrace records all OpenGL calls. In the screenshot above, you see that nearly all frames consist of 757 calls. It makes sense that this number is constant from one frame to the next, because each frame, the game builds up the scene in exactly the same way: draw the background, draw the bunnies, draw the interface buttons. Most OpenGL functions perform communication with the graphics hardware, which is slow, so it’s important to keep this number as low as possible. 757 is probably a bit higher than I would like. Allegro adds a few extraneous calls that aren’t strictly necessary, but this is part of the trade-off between the ease of use of Allegro and the raw power of OpenGL.

What’s noticeable though, is that there are a few frames with crazy high numbers of OpenGL calls. 19286 calls in one frame? Now that would certainly cause a jitter! Apitrace lets you examine these calls in detail, as in the screenshot below.

Looking through the calls in this bad frame, I notice a few that don’t occur in the good frames. For example, there are calls to glPixelStorei(). Although I don’t know exactly what it does, that doesn’t matter right  now: the fact that it only occurs in  the bad frame and not in the good frames makes it a suitable starting point for further investigation.

Zooming in further

So I open Usagi in the GNU debugger (gdb) and start tracking back from glPixelStorei

 gdb build/debug/usagi
 # Set a breakpoint on the glPixelStorei function
 (gdb) b glPixelStorei
 # Start the program
 (gdb) r
 starting program build/debug/usagi
 Thread 1 "usagi" hit Breakpoint 1 in glPixelStorei () 
          from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1

Ah great, it worked! I caught the program red-handed exactly in the middle of a bad frame. Now I just have to trace back to the origin of the problem, literally, using the “backtrace” command:

(gdb) bt
 #0 0x00007ffff4307980 in glPixelStorei ()
....
 #12 0x00007ffff67b3475 in al_draw_bitmap_region
 #13 0x00000000004518b6 in blitRow
 #14 0x0000000000451d3c in Bitmap::TiledBlit
 #15 0x0000000000469979 in Button::doDraw
 #16 0x0000000000467277 in Widget::updateBuffer
 #17 0x0000000000467092 in Widget::draw
 #18 0x0000000000460546 in Container::draw

Here you see the chain of function calls that led to glPixelStorei. You have to know the code to be able to interpret this, but I can see right away that the call to Button::doDraw was completely unexpected and unnecessary. Buttons are drawn on a back buffer that is only redrawn whenever the button changes state. In the game, buttons may be enabled or disabled depending on how much money you have. For example, the “buy a block” button becomes available when you have earned enough money to buy that block. And money changes every second or so. Suddenly all the pieces fall into place: due to a mistake the game was redrawing all the buttons, every time your money counter changes, which is complete overkill.

There is more. Why does the redraw of a button cause such a crazy high number of OpenGL calls? It turns out that the button was copied from System memory to Video memory, a big performance no-no.

It’s funny how a really difficult bug becomes really easy to solve with the right toolset. I’ve known about the jitteriness for a long time, but couldn’t figure out what to do about it. Until I started using apitrace. Once you know exactly where the problem is, the solution is trivial. In the end it took about four lines of code to fix the main performance issues.

New Release of Happy Usagi

These fixes are important enough to immediately released them. Version 0.3 of Happy Usagi can be download here.

Tips for beginning speedhackers

This is the second part of my series about Speedhacking. Last week I looked at the reasons why you should participate, now I’m going to give some tips for beginners.

Are you going to join a speedhack, or other type of game jam, for the first time? Here are some tips!

How to limit your scope

In my previous post, I wrote about how important it is to limit your scope. But how exactly do you do that?

If you’re really a beginner, keep it very simple. If you think an idea might be just doable, cut it in half. Make your own variant of Snake. Pacman. Tetris. These are the type of games that are feasible in a weekend.

Don’t invent everything new, but remake a game you already know. Is it bad to make a clone? Of course not,  remaking famous old games is excellent practice. You won’t expect a beginning chef to create delicious new recipes – first they have to master the classic ones.  Start with a remake, and if you find some extra time, you can always add your own flavour and twists to it.

It’s best to choose from the genres of arcade games or puzzle games. Arcade games are focused on reaction speed, and usually have just a single screen or a single mechanic that is repeated over and over again,  with increasing difficulty. This provides an interesting challenge without requiring you to design lots of extra “content”.

By “content” in mean levels, graphics, storylines. Any genre that requires a lot of that is really tough to pull off in just 72 hours. Examples of these are platformers or RPGs. You may think that it should be possible to program a character like Super Mario in just a weekend. And you would be correct. The problem is that what makes Super Mario fun, are the levels. Designing levels takes time. And the amount of time you spend designing is directly proportional to how fun your entry will be. There is no way to speed up the process. And it eats away from your polishing time.

Schedule polishing time

It’s possible (although not very healthy) to spend a good 40 hours out of those 72 hours making games – that’s an entire work week compressed in 3 days!  But working to the limit is a sign that you set the bar to high. With a lower bar and fewer hours of work, you can actually achieve better results.

I’ve seen it happen that participants could only work on their entry for one day instead of the weekend, for reasons (work, life, illness, whatever). And still ended up with a high-ranking little arcade game.

It’s usually not the case that you need a fantastic new idea to make a game work. Instead, what makes a game work is a decent idea with a lot of polish. Making a game fun means polishing it. The amount of time you set aside for polish determines the success.

What is meant by polish? Playtesting. Balancing the game.  Take some time to actually play the game yourself. Let somebody else try it. Is it too difficult? Is it too hard? Is the goal of the game intuitive? Add finishing touches. Sound effects and music usually come in last but add a lot to the fun factor.

So instead of planning a game that takes 40 hours to implement, plan for a game that takes 20 hours to implement, then spend any remaining time adding as much polish as you can. The good thing is that usually, this is the most fun aspect of game development. In this phase, every tweak, every added line of code immediately improves your game in a visible way.

How to use the rules to your advantage

It’s easy to see the random rules as annoying barriers that stand in the way of  the game you really wanted to make. For example, maybe you have decided that you wanted to remake Sim City. Then the rules are announced, and maybe one of the rules is that the theme must be “Gravity”. What do I do with gravity? How on earth do I combine Sim City with gravity? The trick is not to get too hung up on a single plan. Be opportunistic, not dogmatic. Keep your options open. Be willing to make any of a range of games – arcade games, puzzle games, etc. So maybe you can’t make Sim City. Is that really the only possible game you could ever make?

Another way to look at it is this: Don’t see the rules as limitations, but as stepping stones for your imagination. This is an opportunity to think out of the box. It would be so cool to play Sim City on the flying rocks of Pandoran!

I can’t do art

Worried you can’t do good art? Again, what may appear as a limitation is really a stepping stone for your imagination. Focus on what you do know. Make a game that is focused around patterns of geometric shapes – like for example Circles. Even better, just use only text. There are some really cool games made with just text, like Dwarf Fortress and Nethack.

Make a word puzzle game, or  a text adventure. Focus on procedurally generated art. Or use a super-low resolution (but scale  it up for modern screens). It’s much easier to generate a lot of art if sprites are only 8×8 pixels.

I’m not a good programmer

Worried that you’re not a good enough programmer? Well, the bad news is, you do need to know some basic programming. Actually, you need a combination of skills to make a good Speedhack game, but programming stands at the basis.

But then again, it’s just a matter of matching the scope with your skills. As long as you’re willing to learn, you can start really small. Can you write “Simon Says”? Can you write “Hang man”? Can you write “Higher, Lower”? These games can be programmed in Scratch! (Unfortunately I haven’t seen Allegro bindings for scratch yet, so that would make them inadmissible to TINS. But you get the point). Combined with the right art, design and sound, you can still make something cool. Perhaps you’re not going to win the competition with these games, but the challenge is purely your own: can you become a better programmer?

Teaming up

Another way around a skill gap is to team up with somebody else. Some competitions, including TINS, allow this. Is it really possible to let teams compete against individuals? How can that be a fair competition? Certainly I’ve seen some very good TINS entries in the past that were made by teams. But don’t underestimate the extra difficulties involved in teaming up. There won’t be enough time to do all the meetings and huddles that usually involve joint programming efforts. You need to be able to rely on each other, and find ways to remove interdependencies so that you’re not constantly waiting on each other.

I’m not saying you shouldn’t join a team. Just be aware of the complications. Teaming up may help you to work around a skills you lack, but requires all of you to have communication skills in abundance.

Here’s that promo bit again

So, did I convince you that it’s feasible? Do you think you can do it?

Why not give it a try? The next TINS competition will be held from October 20 to 23. Head over to tins.amarillion.org, register and sign up!

The Many Benefits of Speedhacking

Speedhacks (a.k.a Game jams), are competitions where you design and implement a complete game, from scratch, in an extremely short time limit (typically one weekend, or 72 hours). I’m a frequent participant and organizer of these events for the Allegro community (including the upcoming TINS competition, more on that below). I found them to be incredibly educational and fulfilling, and they’ve allowed me to grow as a developer. Here is why you too should participate in one.

Getting things done

Making a whole game in 72 hours, how crazy is that? For those who ever tried, the prospect seems daunting.

Starting from early high school days, I’ve always wanted to make my own games. I was endlessly doodling level designs, and I had reams of elaborate technical notes. It was disheartening to look back at all those plans and aspirations, and see how little came of them.

That feeling changed after my first Speedhack. For the first time I realized that, yes, I actually can make all these ideas come to life. Of course there are limits to what you can do in a weekend, but actually making something playable, as opposed to lots of half-hearted attempts and interminable projects, is extremely gratifying and a very powerful motivator.

The problem is that you can’t really show off a stack of design notes. Maybe you get some props if you have some cool drawings, but more likely your peers will recognize it for what it is: vaporware. A short playable arcade game is a lot cooler than the epic game that merely exists on paper.

So how do you pull this off? You need developer skills, to be sure, but perhaps less than you think. What you need first and foremost, is to learn to limit your scope.

Limit your Scope

In Extra Credits, game designer James Portnow talks about scope as being one of the six skills that game designers should learn.

Every budding game developer is really a gamer who thinks: it would be so cool to play a game that is a role playing game combined with real-time strategy, with lots of mini-games and cowboys in space.  And it should have dragons and magic and tons of weapons to choose from. You know what, I’m going to make that game myself! It’s so easy to fall into this trap. You design something grand and majestic that completely fails to see the light of day.

Where does it go wrong?

Know your limits. Even if you had all the skills required to pull off a grand project like that, it’s just so hard to stay focused on a single project for years on end. Work or school or other real-life obligations intervene. Instead, plan for just the amount of time that you can completely oversee. Speedhacks teach you to work with a short time horizon. You can shield yourself from distractions for 72 hours.

Constraints make the creative juices flow

Would you like to make games, but can’t come up with ideas? Are all the cool game mechanics already taken? There is nothing like an imminent deadline to get the creative juices flowing. In the words of Calvin: you can’t turn on creativity like a faucet. You have to be in the right mood. That mood being: last-minute panic.

At the start of Speedhack, random rules are drawn from a predetermined set. Your game has to adhere to these rules to be a valid entry. For example, a  rule may say that it has to be a puzzle game. Or that it has to have snow in it. Or that you can only use hand-drawn assets. Theoretically, the rules are there to prevent false starts. The idea is that you can’t start on your game before the rules are known, so nobody can take an unfair advantage by starting early. But really, the rules just add to the fun.

Rules force you to come up with crazy ideas. For past Speedhacks, I’ve come up with a platform game set inside a laundry machine, a space shooter where you have to defend Mars against the attacking Earthlings, a puzzle game where you have to choose a matching outfit from a perilous walk-in closet, or a two-player co-op battle game inside a space cheese. Coming up with ideas is not a talent that you’re born with or not. Its a skill, that you can practice. And Speedhacks are a great way to practice.

Community

If Speedhacking is so great, why don’t you do it all the time? If you can make a game in a weekend, why don’t you make a new game every weekend?

You can’t without motivation. Here is where the community comes in. Locking yourself away for a weekend may not seem like a very social activity, but it is. During a competition you interact with fellow Speedhackers. Reading the progress reports from others is fun while you take a break from an intense hacking session, and creates a shared experience. The fact that others will be waiting after the deadline to play and review your game, motivates you to not let them down.

The community is your carrot and your stick. Failing to finish feels a bit like breaking a promise.

Oh, the things you will learn!

Speedhacks give you a chance to learn new algorithms, experiment with new techniques, or try out ideas with a prototype.

Have you never applied the A* algorithm? Here is your chance to try it out! Always done hand-pixeled art and want to try your hand at some vector graphics? Now you have the perfect opportunity to do so.  Do a Speedhack every so often to broaden your skillset.

Even if the game you make never ends up being more than a prototype, more often than not you’ll find ways to apply the things you learn later on during your working life.  I first used A* for a train routing game I did for speedhack, but later found a use for this technique in a project for work.

So where do I sign up?

Nowadays, there are plenty of Speedhacks and Game jams being organized all over the Internet. Some focus on particular retro systems or screen modes. Some are face-to-face. One of the oldest and most famous ones is Ludum Dare, and it attracts tons of participants every time.

Invitation to TINS

As mentioned before, I organize a Speedhack semi-anually, called TINS.  It is going to be held again over the weekend from October 20 to 23. One thing you should know is that it’s organized by the allegro community, and therefore using allegro is a requirement. Allegro is one of the most widely portable libraries, ranging from android to Windows to Mac.  Head over and sign up!

In case you’re wondering, TINS stands for “TINS is not Speedhack”,  and references the original allegro Speedhack.

See also part 2 of this series with tips for beginning speedhackers

Implicit Tutorials (Notes from Indie Game Show & Tell)

When I discussed educational games, I omitted one very common type:  games that teach you how to play the game itself.

Last week I participated in the Indie Game Show & Tell in Amsterdam. And there I learned about self-explanatory games, and also the fact that Happy Usagi currently sucks at this.

The idea is also called “Implicit tutorials”, and is an important concept in game design. There should be no need for a manual (nobody reads it anyway). The less explanation, the better.  By gradually introducing game elements in a clever way, the game should just explain itself . Super Mario World 1-1 is a very famous example of this.

The first demo of the evening was by Jeroen Wimmers about the game “Circles” (See the screenshot above). It really drove home the point of implicit tutorials. Circles is what you may call an example of “Constraint-based game design”, the constraint being that everything, every single thing, is a circle. Start of the level: a circle. Goal of the level: a circle. Level select menu – a bunch of circles.  In a relentless drive to eliminate shapes with corners, explanatory text has no place. How does the player know that you’re not supposed to touch certain circles? Jeroen showed how he went through dozens of iterations, trying different visual cues (trembling, disappearing, expanding),  keeping this and reverting that, until the game was crystal clear. Circles is out on steam if you want to give it a try. (There is a free demo).

Another talk on a very similar topic was about Reggie, by Degoma games. Reggie is a tomato with the ability to reverse gravity, in a cool little platformer. This game similarly went through several design iterations, incorporating feedback from players at conventions, until finally the mechanics were universally understood. You can watch the entire talk on Youtube:

But there is a downside to implicit tutorials. A tutorial can slow down the pace and make players give up before they get to the good parts. I can think of a few recent games that suffer from this.

I myself was there to present Happy Usagi. There is no recording of the talk. But I showed this movie which is also on Youtube:

While showing this video I explained that the game has an “altitude-bonus” mechanic. It works as follows. When your bunnies are happy and well-fed, they jump more. For each jump, you get points. The points are multiplied by how high the bunny is. For a jump at floor level, you get 10 points. A jump on a stack of four blocks tall rewards you with 40 points. This mechanic encourages you to build. By building higher, you make each jump worth more.

The audience asked me this insightful question: “How does the player find out about this mechanic?” After all, how can a reward incentivise players to do something, if they don’t know that there is a reward? The truth is that this is an area where the game can be much improved. I did add a small hint: When a bunny jumps, a number appears at that spot to indicate that points were scored. But it’s very easy to miss the connection between score and altitude. To a casual observer, it seems the score is calculated pretty much at random. Here the player needs explicit explanation.

So that is some very useful feedback. And that’s what made this event so great – not only to have the chance to present our work, but also to get feedback from fellow game designers, and to learn more about game design.

Progress Update: Usagi on Android

Just a quick post to show what I’ve been working on. I finally managed to get Happy Usagi to run inside an android emulator:

This is a huge step! So far I’ve only made games for Windows and Linux. Getting them to run on Android has been a major goal when I started this journey. Unfortunately, it is not trivial to get C++ code to run on Android. That’s why I’m happy to show you this progress update even though it’s far from complete.

Wouldn’t you like to see the game on the Android App Store? I know I would 🙂 You have to be patient though. There is still a lot of work to do. Besides bugfixing, I also have to rework the game to a touch-based interface.

But when all that’s done, you can keep virtual bunnies in your pocket!

What makes a good educational game?

As I mentioned at the start of this blog, in the future I want to focus on creating educational games. The term ‘educational game’ means different things to different people, and it’s also somewhat of a buzzword nowadays.  Here I want to explain what ‘educational’  means to me. What type of educational game would I like to make? I’ll try to answer that by comparing with a few examples.

Is Pacman a good educational game?

As a counter-example, let’s start with  a well-known game that is not usually considered very educational. Pacman. If you think about it, there are many skills to be learned from playing Pacman. Timing and reaction speed. Hand-eye coordination. Basic spatial thinking. Pattern recognition. Each of the four ghosts moves according to predefined patterns, and recognizing those patterns is the key to mastering this old classic.

According to the book ‘a theory of fun for game design‘, humans play games to learn. Playing behavior arose during evolution so that we could practice life skills in a safe setting. Each time you escape a ghost or eat a power pill, you are preparing for an encounter with a lion on the prehistoric savannah. You learn, and your brain rewards you with a puff of endorphins. We call this fun, but really, biologically speaking it’s indistinguishable from learning.

So all games are educational in some way. The only problem is that many action games teach paleolithic skills. Reaction speed. Battle tactics. Aiming a weapon. Territorial dominance. We still get the fun from learning, but what we learn does not prepare us much better for life in the 21st century.  Gaming is a waste of time, not because we don’t learn from it, but because we learn mostly outdated skills.

Is Portal a good educational game?

Yesterday at the Amsterdam game developer meetup, we discussed educational games. Portal, the 3D puzzle game with mind-bending physics, came up as an example of an educational game. One of the puzzle-mechanics in this game is conservation of momentum. Apparently Portal has been used in a classroom setting, to teach this physics principle to students.

I don’t think Portal is the kind of educational game I would like to make. To me, there are two problems with it:

First, conservation of momentum is only a small part of the game. Yes, there are a few puzzles that are incredibly hard to solve if you don’t apply this concept properly. But if you want to teach, then the other 90% of the game gets in the way a lot. Portal was never designed as an educational game. It was designed as a fun puzzle game that coincidentally happens to use a few classroom physics concepts.

Secondly, it’s  a very  limited use of the endless possibilities of games. Conservation of momentum means: an object in motion stays in motion until a force is applied to it. This is a concept close to daily experience,  almost intuitively understandable. There is no need for expensive optical equipment to study it. There is no need to take the class on a field trip to a distant museum. Just a soccer ball is enough to demonstrate it.  All the tools needed to make the concept insightful are already at the teachers disposal.

And we can do so much more than that! Games allow us to open up entirely new virtual worlds where we can shrink to microscopic size and move through the human body (biology), walk around in ancient Rome (history), simulate entire cities (geography).

That is not to say that teaching through games isn’t a great way  to liven up a boring classroom. But then you’re reducing the gaming aspect to just a gimmick, a psychological trick to maintain attention. When I was in high school, in English class we were rewarded with five minutes of watching Mr. Bean at the end if we paid attention the rest of the time (I suppose the intention was to convey English culture, because Mr. Bean doesn’t convey much of the English language). There is nothing wrong with this approach per se, but it’s a relatively poor use of the possibilities of games, and not the type of educational game I want to aim for.

Niche

Let’s get to one of my favorite educational games of this moment: Niche.

In Niche you control a group of fictional mammals, and by properly selecting pairs of animals to breed, you can slowly improve the fitness of the population: stronger claws, better hearing and eyesight, better resistance to heat or cold. You make your group more resistant to predators and the environment. The more you play, the more you learn about genetics. The more you learn about genetics, the better you get at the game.

Niche teaches concepts from population genetics without being explicit, without being too teach-y. The students are just playing a fun game where you have to protect your tribe of cute furry animals. Slowly, as you get better at playing the game, you start to recognize the game mechanics. These happen to work by simulating real-life biological concepts. By getting good at the game, you slowly develop intuition for genetic principles, such as phenotype and genotype, recessive and dominant alleles, mutations, disease resistance, incest and inbreeding,  natural and artificial selection, survival of the fittest.

Not only that, but it is plain fun to play! Don’t take my opinion for it, just take a look at the reception on Youtube. Both fun and educational, what more could you want?

Future work

In short, my “sekrit project”, my future educational game should have these features:

  1. It is fun to play and not overly pedagogic.
  2. It teaches advanced modern concepts that go beyond the reaction speed, the fighting and territorial dominance of action games.
  3. And it makes use of the possibility of virtual worlds to visualize hard concepts, to take something that is not intuitive, that is remote from everyday experience and find a way to experience it.

By the way, I’m always looking for interesting examples of educational games. Know another good one? Leave a comment!