Tag Archives: lua

Workshop: Journey to the Center of Hawkthorne

At our next open source workshop, Shawn Shaefer will be showing us how to build and contribute to Journey to the Center of Hawkthorne, a 2D platform-type game based on a game from an episode of Community. The game is written in Lua with the LÖVE game engine. (btw: it is cross-platform, so yes, your funky old XP-laptop will work.)

We’ll also have a presentation by Russ Spivey on build system basics with a focus on TravisCI (since that is what the game uses).

Anyone is welcome to attend this event! No prior experience with open source development or game programming is required.


Monday, April 15th
12:00 PM in Butte 201
Bring your laptop!



For our second project (June 14 – 21st), we decided to work on Lovely-snake. This game is a Snake clone written in Lua with the LOVE framework by our teammate Josh. I have always been a huge fan of Snake, so I was excited to work on this project. By the time we got started on it as a team, Josh had already written the basics of the game and had a working demo ready.

One of the things that surprised me about Lua was that it doesn’t have native support for classes, so as the game’s code grew, it became apparent that we’d need to implement classes somehow. We wound up using Middleclass, which works similarly to class systems of other languages, but uses a special class() function to prepare a variable to work as a class:

-- define myClass
myClass = class('myClass')

-- create an instance of myClass
myObject = myClass:new()

Some of the things we worked on were: a scoring system, killing the snake when he hits walls or himself, a scrolling level camera, and a level tile. See our contributions here: https://github.com/jbttn/lovely-snake/pull/13/files

This project still has a lot of TODOs, so if you’d like to contribute, read them here: https://github.com/jbttn/lovely-snake/issues

Josh is working on his own blog post about the level system we worked on, so keep a lookout for that.