Skip to content

stevecochrane/Mar-Koochooloo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mar Koochooloo

Mar Koochooloo (that’s “little snake” in Farsi) is an iteration of the snake game for Playdate with nine levels and a “Gentle Mode” for new players, available to download for free on itch.io.

Mar Koochooloo title screen

Options screen

Snake in the first stage

Snake in an early stage

Snake zig-zagging in staircase pattern

Level Clear screen

Snake wrapping around the screen

Credits screen

I made the game for my daughter and collaborated with my extremely talented and prolific nephew who makes music as KRVB. He made the music and sound effects with GarageBand on his grandfather’s old iPhone and was just 8 years old at the time. The music is easily the best part of the game.

There are many versions of the snake game, but this is most inspired by QBasic Nibbles, which you can now play through your web browser thanks to the wizards at the Internet Archive. Nibbles is special to me because it’s one of two games that came with QBasic and one of the first games I began to tinker with when my grandfather introduced me to programming. Most of the level layouts in Mar Koochooloo are adopted from Nibbles.

How this was made

Mar Koochooloo was programmed in Lua with the Playdate SDK. The developer experience on Playdate is excellent and everything went really smoothly for me. If you want to make a game for a gaming console and not just for PC, this is about as straightforward as it gets.

The in-game fonts are Roobert 11 Medium and Roobert 10 Bold, both of which are included in the Playdate SDK.

The tilemaps were made in Tiled, the pixel art was made with Acorn and the code was written in Visual Studio Code. The simpler sound effects were made with jsfxr.

State of the code

This is definitely not the best code I’ve ever written, though it performs well and I don’t intend to maintain or continue to build upon it after the intial release, so maintainability isn’t much of a concern. It runs at a steady 30 frames per second and that’s the maximum frame rate for a Lua game on Playdate.

I’ve structured this like my old Flixel projects from a decade ago where there are different state objects (playState, titleState, etc.) representing every possible state that the game can be in at any given time, and on every frame of the game in the main playdate.update() function it will look to the current state and call the matching function. playState still does too much and would be broken up further if I was to keep working on this.

If you want to read from the beginning, the main.lua file is the first file to be executed when running the game.

About

Snake game for Playdate with nine levels and a “Gentle Mode” for new players.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages