Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

OpenCiv

> DevOps
Open source

An open source civilization-like game made for the web browser.

194 stars0 likes0 views
WebsiteGitHub

About

An open source civilization-like game made for the web browser.

OpenCiv

About

OpenCiv is a love letter to turn-based strategy games inspired by Sid Meier's Civilization. The game mainly focuses on Civ 5 features and strives to improve on certain aspects that were lacking in the series.

The main objective of this project is to allow players who enjoy Civilization games to play it directly on a web browser.

How do I build and run this?

  1. Install either 'Docker' or 'Node.js with npm installed'.

  2. Clone the repo at: https://github.com/RyanGrieb/OpenCiv.git

    3. Using docker

    Ensure Docker is installed, then run: docker compose up -d

    4. Using your local machine

    Install dependencies and start the application: npm run install-all npm start

Once running, open your browser and go to http://localhost:1234 to play.

How do I play this?

Currently, the project is being rewritten so no playable version is available without building the project.

How do I run tests?

  1. From the root directory of the repository, run npm run install-all
  2. Navigate to the server directory cd server
  3. Execute the test command npm run test

Development workflows

  • Typecheck before pushing — cd client or cd server, then npx tsc -p tsconfig.typecheck.json --noEmit. This is the same check CI runs.
  • Start the server with game options — from server/, npm start -- --no-allowBarbarians --numCityStates=0 sets game options at launch instead of toggling them in the client's UI. npm start -- --help lists every option with its default and range. The same overrides can be passed as GAME_OPTIONS="allowBarbarians=false,numCityStates=0" when argv is awkward (root npm start, docker compose up).
  • Format the repo — npm run format (Prettier, run from the root).
  • Add or edit a sprite — drop a .png under client/assets/sprites//.png, then run npm run generate-sprites from the root and commit the regenerated client/src/generated/SpriteManifest.ts.
  • Generate API docs — npm run generate-docs (Typedoc for both projects, output in documentation/).

See CLAUDE.md for more on the project's architecture and conventions.

Keybinds

ARROW KEYS or LEFT-CLICK DRAG - Camera Movement

SCROLL - Zoom In/Out

LEFT-CLICK Unit RIGHT-CLICK Tile - Unit Movement

SPACEBAR - Skip turns

ESC - View settings

Special thanks to the following:

Contributors - Will Pewitt

Artists

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript4x4x-strategy-gamecivcivilization

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理