#1GAM Game 9: Disc Relay

In January of 2016 I challenged myself to make 1 new game every month, for a year; 12 months- 12 games. This is one of those games.

[box type=”download”]

Development Stats

  • Language: Lua
  • Engine: Pico-8 Fantasy Console
  • Platforms: Web/Pocket Chip

[/box]

Near the end of August, after months of waiting, I finally received my PocketCHIP!

A little banged up in the mail, but working great!
A little banged up in the mail, but working great!

PocketCHIP

About PocketCHIP

  • 3,000 mAH battery
  • 4.3″ 480×272 touch screen
  • Keyboard
  • Open Source
  • GPIO breakouts

PocketCHIP is a small, hand-held computer built around the CHIP, a Raspberry PI-like mini-computer. The PocketCHIP comes pre-built with a touchscreen display, keyboard, rechargeable battery and of course the CHIP itself. It is designed to be hacked, with snap apart casing (no screws) and all the GPIO exposed along the top of the device. The only thing you need (beyond what’s in the box) is a micro-usb cable to charge the device. The inclusion of built in Wifi and Bluetooth is a nice addition as well.

pocketchip_gpio

However, there is one major issue with the PocketCHIP… the Keyboard! It’s really terrible; borderline unusable without some serious dedication. Typing on it is tough. The keys require a lot of pressure to register, and some keys (backspace and return specifically) take an obscene amount of pressure to use. But for computing on the go its passable. What isn’t passable is trying to play games on it. There is no d-pad; just 4 distinct arrow keys like a regular keyboard. But because you hold the PocketCHIP in your hands like a GameBoy, you need to press all 4 directions with your thumb (like a traditional gaming handheld). Imagine trying to use your thumb to press the arrow keys on a regular keyboard to control a game, and you start to see what its like.

The terrible, terrible keyboard.
The terrible, terrible keyboard.

If you had visions of using this thing as a portable emulation haven, you will be very disappointed.

It should also be mentioned that the screen resolution and slow processor make it fairly difficult to do any significant web browsing.

So if it’s not good for browsing the web, playing games, or anything else processor intensive, what is it good for?

Well, people have found tons of great answers to that on the forums (and featured on their blog), but for me the main reason I bought it was not to play games, but to make games! And with a tiny screen, and limit processing power, it makes a perfect home for the fantasy retro game console “Pico-8“!

pocketchip_next

Pico-8

About Pico-8

  • Display: 128×128 16 colours
  • Cartridge Size: 32k
  • Sound: 4 channel chip blerps
  • Code: Lua
  • Sprite: 128 8×8 sprites
  • Map: 128×32 cels
  • Controls: 2 6-button joysticks

The main thing that attracted me to PocketCHIP in the first place, is that it comes pre-installed with Pico-8. I’d been following the development of Pico-8 for some time, but hadn’t yet pulled the trigger on buying a license. I’d also been meaning, for some time, to pick up a Raspberry PI, so when I found the PocketCHIP, a Raspberry PI-like computer with a built-in license for Pico-8, I couldn’t say no.

p8_jelpi

And I was not disappointed! Pico-8 really is an amazing piece of software. It has completely reinvigorated my passion for #1GAM. This is the first framework, since XNA/Monogame, where I don’t feel like I’m constantly fighting all the built in functionality bloat (seriously, go check out Unity’s 2D platformer demo- It’s a joke). It helps that the design of the Pico-8 adheres very closely to my own design sensibilities (low resolution, limited color, 2D, sprites, etc). But what I love is that it forces me to stick to those design principals, and also provides the tools to do so. I find with Monogame I try to keep a consistent look, feel and sound, but it is easy to stray and sometimes hard to know what your imagined limits are. Pico-8 removes the guess work, and sandboxes you away from anything else.

p8_tracker

With the console, tools, and community all built into the software itself, development is extremely immediate. I found myself writing entire little demos on my 20 minute bus ride to work everyday (using PocketCHIP). There’s no Visual Studio projects to create/manage. No libraries to download. You just boot up the console, write 3 lines of code, hit run, and you have a sprite on screen.

sin01

The other really unique part of Pico-8 is the open nature of the games and the community around it. Every game uploaded to the Pico-8 BBS (the main sharing site for Pico-8 projects) can be downloaded from within the console, and at the touch of a button, you can switch to edit mode, which the entire game is opened up to you. The code, art, music, and levels. It’s all available to copy, remix, and hack as you see fit. It reminds me a lot of web development in the late 90’s, before everything got really complicated and obfuscated; if you saw something cool on a website, you simply hit “view source” and more often than not, you could see exactly what they did in plain html. Pico-8 is just like that. See a game that does some cool visual effect? Hit edit, and you can see exactly what they did.

1GAM

But what does it all mean for my 1-game-a-month challenge? Well this turned out to be one of the most productive months yet! I worked on a half-dozen on so little projects and took one to completion.

The game I took to completion is Disc Relay: a update to the classic “Flying Disc” mini-game in “California Games”.

Time your speed and angle in an attempt to throw a Frisbee as far as possible. Then take control of the receiving player, and position yourself for the catch! If you do manage to catch it, quickly throw it again. Keep going until the Frisbee hits the ground, and see how far you can make it!

An update to the classic “Flying Disc” mini-game from California Games.

It’s a pretty simple game, and was relatively easy to implement. Most of the challenge was learning a new platform, and re-familiarizing myself with Lua.

flyingdisc01

flyingdisc02

One of the more interesting parts of the project was creating an endless game, while still using the level editor. I essentially wrote a looping level the can use the entire Pico-8 level data. So when the player reaches the far right of the level, we start rendering the map data from the far left on the next row down. However, the player is always just moving right, so when he is one tile beyond the width of the map (tile 128) he is actually on tile 0 of the second row.

A look at the level editor.
A look at the level editor.

 

This means that the position of the player can no longer be mapped 1-to-1 to the level data when doing things like collision checks, but allows for much more creative level design (over a purely procedural one). Its even capable of expanding to support randomization. So rather than going linearly right to left, top to bottom, it could pick “chunks” of map at random.

Although I was mostly done the game about half way through the month, rather than continue to polish as I usually would, I decided to instead start some new projects in Pico-8 to further explore other areas. This post is already too long though, so I will save those for another day.

[box type=”download”]

System Requirements

[/box]