Felipe Tavares' Avatar

Card Game: Part 1

January 23, '19

This is the first post in a quick series where I am going to tell you a bit about the design and implementation of a card game running on my Nibble console.

In this part, I will talk about how I got the idea.

The Talk

Last week I gave a small talk about game development, where my goal was to live code a full game from scratch in 30 minutes or under.

I was only able to code around 50% of the game I had designed (compared with a full implementation by LOC), but I was pretty happy with this result anyway:

446 Reference/.../main.lua
221 Live Coding/.../main.lua
667 total

I had two goals in mind, which I think I accomplished:

Preparations

The week before the talk I prepared everything for it, and this involved both creating some neat looking pixelart assets and coding the entire game around three times (plus a couple of code design explorations).

Before that I also had finished five small games to explore which mechanic I would like to expand in the talk.

Here are a few of the games I experimented with:

Breakout-Like

Space Invadersish

Hearthstone Clone

During this process I noticed a couple things I really like about developing from scratch (e.g.: during prototyping) on the Nibble.

First one is that there isn’t any context switching involved, all you have to look at is your code and the result of your code, no extra clicking around or switching thinking paradigms.

The other thing I like is that the API is just dead simple. You don’t have to think about hot it works, everything is clear. And this is greatly extended by the fact that the console itself is simple.

Hearthstone Clone

You don’t have to think too much about control schemes because there aren’t many ways to map things to the controller.

Nibble Sketch

You don’t have to think too much about colors because there aren’t that many and they all already work together out of the box (but of course you can change them to better fit your needs if you aren’t just fast-prototyping).

Palette

And this also extends neatly to its programming language, Lua, which doesn’t have much of anything. At most a couple different ways to do things.

In the next part I’ll talk about the final design and how I plan to turn this quick experiment into a fully featured card game. Also how I ripped off Hearthstone.