Welcome to Yannick’s Game!

My nephew wanted to learn programming and loves videogames, so I, a dutiful uncle, set forth to teach him the basics of programming with a fun twist.

Want to play the game?

Here is the latest version (requires HTML5) The objective of the game? Get Sonic to cover as much ground as possible within 60 seconds. You can’t run on steep hills, and grab those 100 rings for SUPER speed!

Controls

Requirements

If you want to hack-away at this game and modify it, you will need the following:

Lessons and Chapters

Each day we would spend a couple of hours in front of the computer and learn Lua together, as well as the Love2d api. Each day we built on what we had the previous day. I did most of the math (wrong) and the coding was done 4-handed. We stayed clear of the LUA warts (OOP) and tried to keep design patterns at bay (but we will have to cleanup after session 8, that’s a given).

More to come Now that the holidays are over, we will work on this project remotely, our game designer in chief has a ton of features that he wants to add! On the writeup front, I will try to add a writeup for each session.

Methodology

We started with an hour of so of LUA examples in the console: what’s a number, what’s a string, how do I add stuff, print, create variables, test conditions, loop… and moved to LÖVE very quickly.

I expressly glossed over anything that was not required to get the game running. Yes, most constructs are globals, yes there are no classes and ther are no naming conventions, but all that was done to keep things familiar for a 11 year old. I wouldn’t subject him to state machines or factories just yet.

Our next project will be a Reactive Entity-Component rewrite of this game in rust ;)

Special Thanks

More from us?

Last words:

We really had lots of fun doing this, the math was hard for both of us and what I can’t share here is the pile of drawings we used to work-out the math, animations and ‘design’ of the objects.