Dag / Day 1: Videogame's Devlog - Totti's Quest

Created Tue, 04 Jun 2024 21:13:25 +0200 Modified Tue, 04 Jun 2024 21:13:25 +0200

Day 1 - Totti’s Quest

Finally, after some years, I am experimenting for the first time with making video games.

I have always been fascinated by the idea of creating a video game, but I have never had the courage to start. I have always been afraid of not being able to finish it, of not being able to make it as I wanted, of not being able to make it fun.

But this time things are different: I wanted to make a game for GBA, but thanks to a friend of mine who suggested me to use Raylib, a C library for making games, I decided to start with that.

Honestly I was intimidated by the idea of starting from scratch, because many frameworks nowadays I thought were too complex for me. But Raylib is damn simple, and I like it.

I can’t make games from one day to another, it requires a lot of time, work, programming, testing and all the other software development phases. After all I write software for a living, so I know what I am talking about.

Let’s start with a silly thing and make Totti’s Quest, a red square that if it touches another green square, the other one turns yellow and starts the Roma anthem + an image of Totti

The first problem is drawing a square. Well, just check raylib lib! But raylib is a library in C.

My main language is Python: it’s not “I don’t like C”, it’s more like “I use Python every single day, so I am confident with it”.

They are programming languages: exactly like with the normal ones, they work in the same way. The only difference is that C is verbose, I need to manage more things (like structs, dictionaries are not native and so on). Python have a lot of gimmicks that make it easier to use. Since the result is gonna be the same, I decided to use the latter.

Fortunately, raylib was ported to Python so you find these “bindings” that basically make the library suitable for a language that is different from the original one.

I’ve managed to complete the code with a bit of a problem: I can’t get the audio to work because it always clashes.

It occurs to me that I can use boolean variables to indicate states, like “played” or not.

This is an approach that works, and I am happy with it.

Green square and yellow square