Skip to content

Repository files navigation

civterm

A Civ game in your terminal

Splash screen

Repo info

  • Made with Zed Made with OpenCode Licence
  • Language Repo size
  • Last commit Build status Tests

Setup

Run make setup once after cloning to install the pre-commit hook (it runs make build — fmt, clippy, build, and all tests — before every commit):

make setup

Skip the hook for a single commit with git commit --no-verify.

Movement keys

Move your selected unit with the keys clustered around the j home key — laid out here as they appear on the keyboard (the arrow keys work too). j re-centres the camera on the selected unit.

y
u
N
i
h
W
j
centre
k
E
n
m
S
,

What this is about

  • A bit of fun, recreating what I remember from my early teen years in the mid 90s of the MacOS version of Civilization
  • I don't touch the code - I summon it from OpenCode's Big Pickle LLM within the Zed text editor
  • Coded in rust (I don't know rust)
  • Written as a TUI (I've never written a TUI and I've never used Ratatui)

Screenshots of progress...

We have units!

Flashing unit

We can found new cities!

City

We can drag the map around!

Dragging the map

We can see what's happening in cities!

City view

Cities can now make units and improvements!

City with units and improvements

We can sail the seven seas!

Trireme

We can irrigate, mine, and build roads on tiles!

Settler work

Civilizations can be conquered!

Civilizations can be conquered

Inspiration

/me On a nostalgia binge, running an emulator...

  • Son: Woah dad, that's so cool!
  • Me: Yeah, this was the best game ever. I wasted most of my teen years playing it.
  • Son: What game is it?
  • Me: Civilization 1
  • Son: What did you play it on? Was it on the Nintendo Switch?
  • Me: Pfft. I used to play it on my beloved Apple Macintosh LC-475. The greatest machine ever. This thing here is just an emulator and I can't save the game :/
  • Me: ...hmm...
  • Me: Mabye I could...
  • Son: What?
  • Me: Maybe I should rewrite the game with AI...
  • Me: ...and I could make it run in the terminal!
  • Son: What's the terminal?
  • Me: I have failed you.

About

A Civ game in your terminal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages