Profile
Back to NewsBack
GitHub Trending 2 min
Reader Mode
RyanGrieb/OpenCiv: An open source civilization-like game made for the web browser.

RyanGrieb/OpenCiv: An open source civilization-like game made for the web browser.

9 hours ago

OpenCiv !tile_city

!example workflow Lines of Code</a> Discord</a>

!OpenCiv in game

OpenCiv is a turn-based strategy game inspired by Sid Meier's Civilization, focused on Civ 5's mechanics. It runs in your web browser, so there's nothing to install to play once a server is running.

The game is under active development. There's no public server yet, so for now you run your own (below). Expect missing features and rough edges.

Playing

Start a game

You need either Docker or Node.js (which includes npm).

git clone https://github.com/RyanGrieb/OpenCiv.git
cd OpenCiv

With Docker:

docker compose up -d

With Node.js:

npm run install-all
npm start

Then open http://localhost:1234 in your browser.

Play with friends

The person running the server shares their address. Everyone else opens the game at http://:1234, clicks Join Game and connects. The join screen also accepts an explicit host:port when the server runs on a non-default port. Players need to be on the same network, or the host needs to forward ports 1234 (the game page) and 2000 (the game server).

Game options

The host can change options in the lobby before starting:

| Option | Default | What it does | | --- | --- | --- | | Map size | Medium | Duel, Tiny, Small, Medium, Large, Huge, or custom dimensions under advanced options. | | City-states | 6 | How many city-states are placed on the map. | | Barbarians | On | Whether barbarian camps spawn. | | Wrap map | On | Connects the east and west edges so the world is a cylinder. | | Reveal map | Off | Turns off fog of war (meant for debugging). |

Controls

| Input | Action | | --- | --- | | W A S D / arrow keys / left-click drag | Move the camera | | Mouse wheel / = and - | Zoom in and out | | Left-click a unit, then right-click a tile | Move the unit | | Left-click a city | Open the city screen | | Next Turn button | End your turn | | Esc | Settings |

Community

Come say hi, report bugs or suggest features on Discord, or open an issue on GitHub.

Want to contribute? See DEVELOPMENT.md.

Credits

Contributors: Will Pewitt

Artists

| Artist | Contribution | | --- | --- | | lucasyoung988 | Commissioned game art | | brysia | Commissioned game art | | pratamacam | Commissioned game art | | CharlesGabriel | Message boxes | | BatzelChaos | Shield icon |

License

Chat with me