Week 2: Save the Tomato

This past week I’ve been learning Unity‘s new UI and its 2D graphics and physics systems, so for my second weekly project, I’ve made a little game with it. It’s incredibly simple and rough, but here it is (click the picture to download; Windows only):

tomato

I bought all of the art assets for 25 bucks at the Unity Asset Store (Fantastic 2D Art Massive Bundle). The goal of the game is to collect as many coins as you can without letting the tomato touch the ground. See how high you can get the score! My record so far is 33. Supports the keyboard (space to jump) or an Xbox gamepad (A to jump).

This was about 5-6 hours of work (much of it spent watching the excellent Unity tutorial videos). The hardest part was figuring out character movement; it turns out it’s pretty tough to get solid-feeling movement in a physics-based game! I’m still not completely satisfied with it–it’s a bit floaty and not as responsive as I’d like–but it’s good enough…

Anyway, this is my first Unity game, so they’ll hopefully get better from here!

Week 1: μShooter

The Microview is a tiny Arduino-compatible device with a built-in OLED screen. It’s really nifty, and I’ve been looking forward to mine ever since backing the Kickstarter earlier this year. The other day it finally arrived, so as my first weekly project, I’ve made a simple game on it: a minimalist Gradius-style side-scrolling shooter.

The source code (an Arduino sketch) is available here! It expects an analog input (just one axis) on the Microview’s analog pin 5 and a button input (active HIGH) on digital pin 0. You could easily switch it to use two buttons for the movement instead of a joystick (it doesn’t even use proportional input). Here it is on a breadboard:

I love that the joystick alone is bigger than the μView.

Features:

  • Two types of enemies, a ‘diver’ than speeds toward you at high speed and a ‘tracker’ that moves a little slower but veers toward you when it gets close.
  • High score kept in EEPROM so it persists between runs.
  • No timing whatsoever, aside from a delay(10) in the main loop. Framerate is surprisingly consistent (and pretty good!) despite that. I’m guessing updating the OLED is the bottleneck.
  • Fills up less than half of available program memory and only ~800bytes of SRAM on the microcontroller, so there’s plenty of space for new features. 🙂
  • Text-based graphics in glorious 1-bit color!
  • Poorly organized, barely commented source code and bugs, bugs, bugs!

This was a quick one–about 3-4 hours of effort (including fixing the Microview). I’ll be participating in Ludum Dare 30 over the weekend, so I’ll hopefully have a second game to post by Sunday night! (Not on the μView though. It’d make it rather hard for people to review…)

One Project a Week

Lately I’ve often found myself sitting at my desk at home, staring at my computer screen, trying to decide between a bunch of different hobby projects I’ve been meaning to pursue and ending up doing nothing.

So, I’m going to try something new: every week I’m going to work on a small, self-contained creative project, and post about it on here when I’m done. I’m inspired here by Ramil Ismail’s Game A Week concept, but with somewhat looser rules, and a more general goal: to head off the creative paralysis that comes from too many ideas and not enough time.

The projects will be:

  • Reasonably self-contained, in a way that I can consider each one ‘done’ by the end of just one week.
  • Creative in nature: games, code, engineering, writing, music. (Edge cases I’m less sure about: game modding, lego models.)
  • Different every week. If I want to come back to a project, it’ll be separate from the new one that week.
  • Unrelated to my day job; done entirely in my spare time.
  • Posted on here in some form by every Sunday night.
  • Really, really rough, given the limited time I have between work and other obligations, and given that many (most) of the projects will be in areas I’m new to and/or not very good at. Seriously, most of this stuff will be terrible. But it will all be a learning experience!

Posting the projects here will be mostly for my own benefit; although I’m always working on something in my spare time, I rarely get up the courage to share any of it. I think doing so will give me a useful deadline and some extra motivation to make these things as solid as I can in the limited time I’ll have.

That said, maybe I’ll even come up with something of interest to other people. Let’s see how this goes!