Mike Cartmell’s blog

Thoughts from a software engineer in Singapore.

Homebrewing Beer

Recently I’ve started to brew my own beer - I’m on my third batch now. I got the urge after wanting to make a game about managing a pub. That got me to discover another game via Steam called Beer Brewing Simulator. Then after playing that for a while, it seemed easier than I thought - so I decided to give it a go in real life! Several things put me off doing this before, but I realised they’re misconceptions....

September 27, 2024 · 8 min · Mike Cartmell

Creating a Tower Defense Game in Pico8: Part 5 - Placing Totems

In the previous tutorial, we made our player move around the screen. Next on our list is the ability to place totems (our towers) - a core gameplay element in a tower defense game! Unlike the player, totems don’t exist at the start of the game. Also, there can be many totems on the screen at the same time! So for this to work, we’ll need to introduce two new concepts:...

February 22, 2024 · 4 min · Mike Cartmell

Creating a Tower Defense Game in Pico8: Part 4 - Player Movement

What Next? So far, we’ve introduced some basic coding and game design concepts and written some helper functions that will live up to their name soon enough. Let’s take a step back and think about what kind of game we’re making, as this will help guide us over the next few parts of this tutorial. Tower Defense Player controls Typically, the player in tower defense games acts as a godlike presence, building and upgrading towers from nowhere as the player issues actions using their mouse or a touchscreen....

February 6, 2024 · 10 min · Mike Cartmell

Creating a Tower Defense Game in Pico8: Part 3 - Setting Foundations

Helper Functions There are some techniques, like _debug mentioned in part 2, that I use in almost all my games. In this post we’ll implement some of them right at the beginning, because it’ll save us time later! In Pico-8’s code editor you’ll notice a number at the bottom-right which increases as you write code. This is the token count, and it’s very important to keep an eye on this because Pico-8 programs can only have 8192 tokens!...

February 6, 2024 · 8 min · Mike Cartmell

Creating a Tower Defense Game in Pico8: Part 2 - Special Functions

Special Functions In part 1, we wrote some commands called function calls to tell Pico-8 to draw text and shapes on the screen. But we can write our own functions too. And there are 3 special functions that, if you include them in your code, will be called by Pico-8 itself while your program is running! This forms what’s known in game programming as a game loop. Games must run code constantly to calculate game logic, move characters around on the screen, respond to the user pressing controller buttons and so on....

February 6, 2024 · 6 min · Mike Cartmell