LÖVE framework on the example of Conway’s Game of Life

Mikhail Adamenko
5 min readApr 9, 2018

--

Narration

Frameworks. Because of them, I stopped to work in a web-development sphere for almost two years. I was overwhelmed by them, each day I saw a new, shiny, modern tool with the promise to fix problems of a predecessor. Some of them were the solution to problems, some were the problem.

Most of the time I tried to keep up with popular frameworks. Unfortunately for me, I can’t do it long enough and move to the relatively steady C-based languages, where everything is calm.

Now, After some time, I want to discover frameworks, but instead of learning which one is better. I decided to try as many frameworks, tools, programming languages, as possible, by accomplishing small projects from scratch to somewhat finished product and based on it, write an experience that I have in form of tutorials. With hope that it helps someone.

First series I want to begin with this one. The LÖVE.

What is LÖVE?

The main page described it as an awesome framework for creating 2D-games.

The framework used Lua language for interacting with lower level architecture like — SDL2, OpenAL, FreeType PhysicsFS, mpg123 and others, available technologies in usage directly is OpenGL — more precisely GLSL for writing shaders, others are available throughout Lua.

The framework and the language are pretty simple to learn, so a big portion of your time will be well spend on prototypes, games, or ideas that you may have.

The framework has a large community, different tools, and libraries written specially for usage with the LÖVE. The legal side of the framework allows you to make an open-source project as well as commercials.

Why to use LÖVE?

The LÖVE can be perfectly fit for:

1. Prototyping — The Lua language, well-written wiki and a minimally required effort path from the installation to a simple application in just a few minutes make it great for prototypes that will work, and can be transferred on other technologies or developed further.

2. Lightweight — Consistency of relatively small components make the LÖVE size small in the finished product. The .love extension, made an application even smaller because of separation of the framework and an application to different parts. But, even with the LÖVE dependencies linked together it still has a small size, which is good if you have size limits for some of your devices you develop, or just liked when finished product hasn’t unused libraries.

3. Portfolio — It’s always great to show something you made in your portfolio even if it crashes every five minutes or ended as a prototype of an early-stage product, experience earned from the small project will always be useful.

4. Experience — Finally, an experience you can get from the developing process, usage of the small frameworks will help you to better understand your own capabilities, adjust expectation and prepare for bigger projects. With a small start, you will waste much less time, if you will stuck in the process of developing process, because of lacking some skills, knowledge or understanding that a chosen pack of technologies wasn’t right for you.

Who already used LÖVE?

You can find more on the main page, but if you don’t want to, here is a little recap:

1. Mr. Rescue by Tangram Games

Mr. Rescue Game

An arcade styled 2d action game centered around evacuating civilians from burning buildings.

The game features fast paced fire extinguishing action, intense boss battles, a catchy soundtrack and lots of throwing people around in pseudo-randomly generated buildings.

Game Page, Source code

2. Move or Die by Those Awesome Guys

Move or Die

An absurdly fast-paced, 4-player local and online party game where the mechanics change every 20 seconds. The very definition of a friendship-ruining game, Move or Die is easy to pick up but hard to put down.

Game Page, Developer Page

3. Oh My Giraffe by Nico Prins

Oh My Giraffe

A game about a giraffe eating fruit while being chased by lions.

Game Page, Developer Page

And many more big and small games build by using LÖVE. One of which is helped me to make mine — ‘BYTEPATH’ be sure to check it. SSYGEN wrote an incredible blog of how he makes the game.

Background

For the LÖVE and Lua you won’t need much to know, but some useful knowledge to have is:

1. Understanding of the basic programming — loops, arrays, variables, functions, OOP, etc.

2. Work with the Window or Unix console. Simple commands like — install or uninstall, creating, deleting. Nothing special is needed to know.

3. Some familiarity with an IDE of your choice, for syntax highlight, git integration, debugging and many more which will certainly help you in the moment of development.

Let’s Try It Out

Now, when you have some knowledge about the framework, we can take our first step into the framework in the following articles.

Lua

If you interested in learning syntax of Lua before moving next there has one great article— Learn X in Y minutes.

TL;DR

Tired of many frameworks used on half, the author decided to dig into different frameworks to understand their possibilities. The first in the series — Lua-based LÖVE framework which is easy to learn, easy to start, easy to fall in LÖVE with. Great for prototyping, learning the Lua, and for a portfolio.

Before you move next

I want to thank you for reading the article, hope you find it interested to read, if not or you have something to say, please leave a comment or write directly to me. I will highly appreciate every feedback you have.

Have a good day!

--

--

Mikhail Adamenko

Born and live in Kazakhstan, Almaty, a self-taught developer, have an interest in many things from design to programming and philosophy.