<< ABX! Devlog

Where It Started

Where this project all began!

I figured I’d start from the beginning of this project to really show the progression of where I started and where I’m going.

In The Beginning

There was light… wait, wrong text.

In the beginning, there was a window.

The black screen moment

Truly, this was the start. I was so hyped to even just have a window showing. I just looked back in the repo, and this was December 6th, 2025, so I guess that’s the official start date of this game. That means I’ve been working on it for six months now. Time flies by so fast, man. “Days are long but the years are short” is such a true phrase. Anyways, that’s enough of my old man ponderings.

I remember when I got this far, I texted my friends who program professionally, and they were also hyped, saying “we love a black box” because it’s the start of something. This was my first time tackling a project in C and actually getting something to appear, so it felt like a huge win. Looking back at it now, I had no idea what I was getting myself into and all the work that would go into this project just to get something somewhat playable.

There were many ideas and iterations, but the black box was the start of it all. So all this to say—I’m proud of the black box, because without it I wouldn’t be where I am today in my programming journey. I’ve grown and learned a ton since then. I’ve started smaller projects and finished them when I needed a break. But this black box was the start of it all. It was the first time it wasn’t for Boot.dev or someone else’s idea—this was my idea, and I started it. For that, I’m really proud of myself.

I know this is less of a true devlog about what I’m working on, but I think it’s so important to get perspective on the things we’re working on and to spend some time reflecting on where we came from while looking forward to where we’re going. The next log will be more about actual progress, but I just wanted to start here.

Until the next one!

Code

Figured I could share the code for the black box.

#include <SDL2/SDL.h>
#include <SDL2/SDL_error.h>
#include <SDL2/SDL_events.h>
#include <SDL2/SDL_render.h>
#include <SDL2/SDL_video.h>
#include <stdbool.h>
#include <stdio.h>

const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT = 600;

int main(int argc, char *argv[]) {
  if (SDL_Init(SDL_INIT_VIDEO) < 0) {
    printf("SDL could not init! SDL_Error: %s\n", SDL_GetError());
    return 1;
  }

  SDL_Window *window =
      SDL_CreateWindow("Galaga", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
                       SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
  if (window == NULL) {
    printf("Window could not be created. SDL_Error: %s\n", SDL_GetError());
    SDL_Quit();
    return 1;
  }

  SDL_Renderer *renderer =
      SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

  bool running = true;
  SDL_Event event;

  while (running) {
    while (SDL_PollEvent(&event)) {
      printf("Event: %d\n", event.type);
      if (event.type == SDL_QUIT) {
        running = false;
      }
      if (event.type == SDL_WINDOWEVENT &&
          event.window.event == SDL_WINDOWEVENT_CLOSE) {
        running = false;
      }
      if (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_ESCAPE) {
        running = false;
      }
    }

    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
    SDL_RenderClear(renderer);
    SDL_RenderPresent(renderer);
  }

  SDL_DestroyRenderer(renderer);
  SDL_DestroyWindow(window);
  SDL_Quit();
  return 0;
}