Love, Two Dimensions, and Playable Prototypes


Oh!  I didn't see you there.

Welcome back to the Tinymancers DevLog.  Its been like what, about a week since I saw you?  Hope you're doing well.   Your hair looks nice today.

Why am I being so nice?  Well, I have discovered Love.  https://love2d.org/, specifically.

Its a lightweight, open-source game engine written in Lua (https://www.lua.org/), which is a "Lua is a lightweight, high-level, multi-paradigm programming language".  That makes this combo ultralightweight

After some success with our Tabletop Simulator "Paper" prototype, we wanted to take this relationship to the next level and make this game prototype into a video game prototype.

Our goal was a throwaway codebase to "find the fun" in the idea, not something we'd actually commit to for the long haul.  This meant that we wanted super low overhead to get up and running, minimal complexity, and little rectangles for graphics.  There's an easy metaphor here about some kind of noncommittal romantic fling, but I'm tired of this bit and its beneath me.  What's that you say? Just by acknowledging the metaphor is possible I have essentially made the metaphor?

Existential.

Prototyping

We were vaguely aware of the existence of of Love2D, but had only ever written Lua scripts for Aseprite plugins and Redis filtering.  Within literally a minute or two we had a Hello World up and the basic building blocks of a game.

It took a few minutes to get a dev environment spun up, but VSCode seems plenty up to the task, and there's a handful of good extensions in the ecosystem for Lua + Love2D.  (The aptly-named Lua extension by sumneko seems to be popular and got us Lua standard-library intellisense. https://github.com/LuaLS/lua-language-server)

Lua lives up to its hype in being slim, pretty intuitive, and easy to understand at a glance.  It has python-like syntax with JS-like typing rules, but C-like data structuring.

We had a pretty basic simulation of the parts going in a couple of days as above.  Cauldrons spawn Monsters, and Monsters attempt to get to the Cauldron of the opposing color to destroy it.

A few days later we had a playable Player, Player Shooting, Monsters, Damage, and destroying Cauldrons to "win"!

Sharing is Caring

Being able to use a common IDE like VSCode instead of a dedicated engine IDE like we normally do came with an unexpected benefit!

We could use the Live Share extension to collaboratively work through features we wanted to get into the prototype.  Since Love2D is pretty lightweight and easy to understand, and we're valuing simplicity over long-term sustainability in our code, you can even divide and conquer in real time.  We had some instances of this where one of us would be writing a player/agent function while the other is updating `main.lua` to handle it!

Findings

The dream of developing a throwaway Prototype codebase is that you'll discover problems (or good things!!) that you didn't account for in your Design Docs and Paper Prototype.  Its very hard to account for every case or situation in a doc or in a controlled simulation like a Paper Proto, especially if you're all idiots.  If you're all idiots, you might not have considered pretty basic cases like what happens if you shoot your own allied creatures.

This did end up making us make concrete design decisions on what to do in situations that arose, which feeds back into any design docs you may have.  Having a rough prototype as a source of truth to develop your final codebase against is a huge weight off!

Leave a comment

Log in with itch.io to leave a comment.