Tired of politics? Same — so I made an RPG about it

Instead of just doom-scrolling through election coverage, I decided to channel the rage into code. Made a terminal RPG (yes, the scary black screen) where you're an independent candidate — no party, no campaign funding, no political godfather — trying to reach the presidency the hard way.

You cross 6 regions of Brazil fighting lobbyists, social media bots, corrupt local fixers, and a sensationalist journalist (art imitating life, I know). The final boss is, obviously, a slippery career politician.

100% written in C, no frills, for a college assignment I took way more seriously than I should have. Has turn-based combat, inventory, equipment, a 3-slot save system, and themed maps for each region (the Amazon has a winding river, the drylands are appropriately miserable).

Link for anyone who wants to run it (or just roast my code): https://github.com/aKynoS2/corrida\\\_ao\\\_planalto

Fair warning: no donation call-to-action, no actual campaign flyers. Just genuine academic suffering.

reddit.com
u/AkinoElw — 4 days ago

Devlog: building a terminal RPG in C from scratch — no engine, no libs, just me and printf

Context: a college project (Algorithms 2) that turned into a full terminal RPG in pure C. No Unity, no Godot, nothing but the standard library and a questionable amount of coffee.

Some design decisions that might interest fellow masochists:

- Rendering: instead of calling printf per cell (which chokes the terminal), I build the whole frame into a 32KB buffer and print it once, grouping ANSI color codes so I'm not repeating escape sequences for no reason.

- Camera/viewport: fixed 40×20 viewport following the player with edge clamping — old-school, like Game Boy Zelda except with # instead of walls.

- Persistence: 3 binary save slots with manual serialization, because CELULA **grid is a pointer-to-pointer and fwrite-ing it directly gives you a nice "looks fine" followed by a crash on load.

- Data-driven map transitions: exits between regions (6 maps, bidirectional connections) are read from metadata in the map's .txt file, not hardcoded — good morning to anyone who's debugged hardcoded map transitions in a past life.

Theme: Brazilian 2026 elections, because why not mix political trauma with programming trauma.

Repo: https://github.com/aKynoS2/corrida\_ao\_planalto

If you're into terminal games / old-school roguelikes, take a look and send constructive criticism my way.

reddit.com
u/AkinoElw — 4 days ago
▲ 0 r/brdev

Cansado de política? Eu também — então fiz um RPG sobre isso

Em vez de só sofrer com as eleições de 2026, decidi canalizar a raiva em forma de código. Fiz um RPG de terminal (sim, aquela telinha preta assustadora) onde você é um candidato independente sem partido, sem fundo eleitoral e sem padrinho político, tentando chegar à presidência na raça.

Você atravessa as 6 regiões do Brasil enfrentando lobistas, bots de rede social, cabo eleitoral corrompido e um jornalista sensacionalista (a vida imitando a arte, eu sei). O chefão final é, obviamente, um político veterano cheio de manha.

É 100% feito em C, sem frescura, pra um trabalho de faculdade que eu decidi levar mais a sério do que devia. Tem combate por turnos, inventário, equipamentos, sistema de save em 3 slots e mapas temáticos pra cada região (a Amazônia tem rio sinuoso, a Caatinga é seca de doer).

Link pra quem quiser rodar (ou só zoar meu código): https://github.com/aKynoS2/corrida\_ao\_planalto

Avisando: não tem call to action de doação nem santinho de verdade. Só sofrimento acadêmico genuíno.

reddit.com
u/AkinoElw — 4 days ago

Built a terminal RPG in pure C to escape Java — now I have a working election system and segfault scars

Was taking Algorithms 2 in college and, instead of doing just "average calculator #47", I decided to masochize myself a bit more: a full terminal RPG, in ANSI C, no external libs, no engine, no mercy.

Theme: Brazil, 2026 elections, you're an independent candidate crossing the country's 6 regions toward the capital, fighting lobbyists, social media bots, and a veteran career politician as the final boss (because of course there had to be one).

Fun stuff that happened along the way:

- Dynamic grid with CELULA **grid because a fixed [20][20] array can't handle my ego or my 60×25 map

- Manual save serialization because fwrite-ing a struct with a pointer saves the memory address, not the data (yes, I learned this the hard way)

- Single 32KB frame buffer so I'm not calling printf 800 times per tick and frying the terminal

- Symbol lookup table instead of an if/else chain that would've ended up longer than my patience

Feedback from people who've suffered more than me is welcome. Especially about mapa.c, which still has hardcoded dimensions waiting for a refactor I swear I'll get to.

github.com
u/AkinoElw — 4 days ago

Devlog: building a terminal RPG in C from scratch — no engine, no libs, just me and printf

Context: a college project (Algorithms 2) that turned into a full terminal RPG in pure C. No Unity, no Godot, nothing but the standard library and a questionable amount of coffee.

Some design decisions that might interest fellow masochists:

- Rendering: instead of calling printf per cell (which chokes the terminal), I build the whole frame into a 32KB buffer and print it once, grouping ANSI color codes so I'm not repeating escape sequences for no reason.

- Camera/viewport: fixed 40×20 viewport following the player with edge clamping — old-school, like Game Boy Zelda except with # instead of walls.

- Persistence: 3 binary save slots with manual serialization, because CELULA **grid is a pointer-to-pointer and fwrite-ing it directly gives you a nice "looks fine" followed by a crash on load.

- Data-driven map transitions: exits between regions (6 maps, bidirectional connections) are read from metadata in the map's .txt file, not hardcoded — good morning to anyone who's debugged hardcoded map transitions in a past life.

Theme: Brazilian 2026 elections, because why not mix political trauma with programming trauma.

Repo: https://github.com/aKynoS2/corrida\_ao\_planalto

If you're into terminal games / old-school roguelikes, take a look and send constructive criticism my way.

reddit.com
u/AkinoElw — 4 days ago

Looking for some interested people

Hey guys, im just starting my first real projects and really wanna some people to talk about that process together.

​

It can be someone starting, more experienced devs, anyone that wanna talk about that things, help, or just curious to see whats happenning here.

​

Now im working with C, creating a terminal game. Just starting it, a simple RPG-like game with a Brazil Elections theme.

​

Timezone: GMT-3 / Availability: Just all day by chat

reddit.com
u/AkinoElw — 24 days ago

iwtl true programming logic?

What's the best way to learn true programming logic?

​

I'm doing some college projects and just realized that i really need to master logic (for my own good).

Do you have any tips, websites, project ideas for me to practice?

Currently i'm only working with C, but open to learn new languages, although people said me C is good to learn true logic.

reddit.com
u/AkinoElw — 24 days ago

What's the best way to learn true programming logic?

I'm doing some college projects and just realized that i really need to master logic (for my own good).

​

Do you have any tips, websites, project ideas for me to practice?

​

Currently i'm only working with C, but open to learn new languages, although people said me C is good to learn true logic.

reddit.com
u/AkinoElw — 24 days ago

Building a terminal RPG in C as a college project — sharing progress after 3 weeks

Three weeks into my Algorithms & Programming 2 course and I've been building a terminal RPG in C as the semester project. Sharing here because I've learned more debugging this than from any lecture so far.

**The game:** You're an independent presidential candidate in Brazil. No party, no money. You fight political enemies (lobbyists, bots, corrupt politicians) across 6 regions on your way to Brasília. HP is your reputation. XP is votes.

**What I've built:**

* 2D map as a matrix of structs, WASD movement, wall collision * Turn-based combat with XP and level scaling * Enemy catalog in a header file — spawns copy from it so the original is never modified * Inventory system with `adicionar_item()`, `mostrar_inventario()`, `usar_item()` — all in `personagem.c` * Chests that drop random items * Viewport camera centered on the player with border clamping * Unicode support via `char simbolo[5]` instead of plain `char`

**Things that bit me:**

* `char` can't hold Unicode — spent a session debugging overflow warnings from trying to stuff 3-byte UTF-8 characters into a 1-byte field * Uninitialized `num_itens` — the inventory "worked" but was indexing into garbage memory * `rand()` without `srand()` — same enemy every single run until I added `srand(time(NULL))`

Still lots to do: multiple regions, save/load with fwrite/fread, and a few systems I'm saving for after the core is solid (scandal flags, recruitable allies).

GitHub if anyone wants to look at the code: https://github.com/aKynoS2/corrida_ao_planalto

Happy to answer questions or hear what I should do differently.

u/AkinoElw — 24 days ago