Mike Cartmell’s blog

Thoughts from a software engineer in Singapore.

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

Creating a Tower Defense Game in Pico8: Part 1 - Hello World

Hello! This post is the first in a new series where I’m going to make a tower defense game in Pico-8 and explain exactly how to do it, from scratch. If you’re looking to learn how to code, or you know how to code and are interested in learning how to make games, this is for you! I think making games is an excellent way to learn how to code, for several reasons....

February 5, 2024 · 4 min · Mike Cartmell

How It's Going

I meant to write about how my sabbatical/gap year is going much earlier - it’s been almost 4 months now - but never got around to it. I’m definitely enjoying my break so far, but I didn’t realise how much I needed a break until it started. When I wrote about leaving my job I did mention I wanted rest, but also liked the appeal of having more time to spend on hobbies and other things too....

January 3, 2024 · 5 min · Mike Cartmell