A blast from the past — retro games with Love2D and Lua

Tracy Chen
3 min readJul 1, 2022

--

Super Mario Bros — Nintendo

I’m a 90’s baby. Born into the decade of Super Mario, Pokemon, Sonic to name a few of the trending video games of the time. Video games have come a long way since those days, better animations, more complex story plays and the progression from 2D games to 3D multi-player games. But despite the upgraded graphics and more powerful engines, I don’t identify with modern games nearly as strongly as the games of my childhood. There is nothing quite like the feeling of rescuing Princess Peach from Bowser (Super Mario), blasting your way through the Easter Island heads (Salamander) and avoiding being mummified while clearing obstacles (Metal Slug).

It has always been a bucket list item for me to develop a game. As a child, I said that I was going to work for Konami because of my avid love of airplane shooter games. All of these memories resurfaced a week ago, when my brother demoed his final project for his freshman CS course. He programmed a version of a game called Tomb of the Mask. This, layered on top of my search for a retro game that I used to play, led me to the ultimate question, why don’t I just program it?

A few disclaimers before we dive in — this is my first experience with Love2D and Lua. This game is a proof-of-concept, to get familiarized with the framework and peculiarities of Lua. It was also developed after a 1.5 hour lecture from Harvard’s CS50G. As a side note, I’ve been enjoying this course and recommend it for anyone looking to get their feet wet in game development. I’m currently on Lecture 2 — developing Flappy Bird.

Game overview
Code
What’s next?

Game overview

The objective of this vertical scrolling game is quite simple — to avoid hitting the obstacles. I remember in the actual game, instead of squares there were pixelated bots instead. If anyone knows the name of this game, please drop it in the comments! I feel a bit like Andy from The Office not being able to remember where the jingle “break me off a piece of that: _______” came from.

Code

Here is a preview of the game in action. Hop over to my github repo if you want to play the game. There are also in-game sound effects!

What’s next?

Now that I have a better sense of how Love2D works, I plan to finish CS50G and then work on developing an airplane side-scrolling shooter game. This will be more of a long-term project. My partner, Victor is a Warzone and first-person shooter game fanatic — he will be developing this game with me. Follow along if you are team 2D! We will dive into wireframes, code, challenges, highlights and we’ll see if we can turn Victor into 2D gamer.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Tracy Chen
Tracy Chen

Written by Tracy Chen

A product person who still dabbles in code.

No responses yet

Write a response