The Blog

of Demilade Sonuga

Writing a game from scratch (no game engine, no OS)

Prologue · 8 min read

2022-10-20

Hello there. We're about to go on a fun ride, an adventure, an ecstatic experience. But before we do, I would like to introduce myself and what this is all about. I'm Demilade Sonuga, a computer science maniac addicted to code. A few months ago, I had an idea of building a game from scratch in my favorite language, Rust. ...

Getting Started I · 17 min read

2022-10-22

Now, before we can get to the fun stuff, we first need to do some setup and configuration. If you don't have a rust compiler, download one from (https://www.rust-lang.org/tools/install). Create a new Rust project and open it in your favorite text editor. ...

In the Beginning is the BIOS · 21 min read

2022-10-24

What is a computer, exactly, and how does it operate? What are the sequence of steps that were taken before these words you're reading got on the screen? You pressed the power button, then what next? Your OS logo showed up, and in a few seconds you were looking at your desktop wallpaper. But how was it ...

Getting Started II · 32 min read

2022-10-26

In the previous post, we learned a few things about how the computer starts up and about how our entry point will eventually be called. We need to replace our `main` function in our `main.rs` file with an `efi_main` function. ...

Printing Hello World · 41 min read

2022-10-29

In the previous post, we created a working efi app that does nothing. Now we're going to print "Hello World!". At this point, your `main.rs` file should be looking like this: ...

A Few Things About Computer Graphics · 9 min read

2022-11-01

So far, we've printed "Hello World", and while that's nice, for a game it's not good enough. Printing text is not all we're doing here. We also need to draw graphics. Before we proceed to the UEFI specific stuff required to do that, let's take a quick detour to understand some things about computer graphics. ...

The Graphics Output Protocol I · 31 min read

2022-11-04

In the previous post, we learned a few things about how graphics are displayed. Now, we're going to take our first steps to getting graphics on screen. ...

The Graphics Output Protocol II · 20 min read

2022-11-07

In the previous post, we took our first steps to modeling the GOP. At this point, your code should look like this: ...

The Graphics Output Protocol III · 46 min read

2022-11-10

Now that we've modeled the GOP, we need to continue with our game. Our aim right now is to check out what's there, see what the GOP has available for us, then use that to come up with a way to draw graphics on the screen effectively. ...

The Graphics Output Protocol IV · 113 min read

2022-11-13

The remaining steps left on our list to figure out graphics are: 1. Figure out how to change the mode to a graphics mode with the GOP. ...

The Graphics Output Protocol V · 47 min read

2022-11-16

We're finally on our last step to drawing graphics on screen: ...

Printing Hello World Again I · 36 min read

2022-11-19

To get printing text again, we have to use the raw pixels of our graphics mode. But before we proceed, we must first ask ourselves this question: what is text? ...

Printing Hello World Again II · 40 min read

2022-11-22

In the last post, we pinned down our font for the letters 'A' - 'Z'. If you got stumped along the way, the full source for the last post is ...

Printing Hello World Again III · 61 min read

2022-11-25

It's finally time to print "Hello World!" in our graphics mode. ...

Refactoring I · 55 min read

2022-11-28

In the previous posts, we did a lot. We modeled the Graphics Output Protocol, switched to a graphics mode, designed a font and printed "Hello World!" with our font in our graphics mode. But, at this point, there are a lot of things that are just off with the code. ...