C++ sandbox project built with Flecs v4, ENet and raylib.
  • C++ 84.3%
  • Zig 13.1%
  • C 2.6%
Find a file
2026-05-24 09:12:00 +01:00
.github/workflows Remove unused matrix values from cmake.yml 2025-05-13 10:00:40 +01:00
.vscode Add launch configs for linux 2025-09-27 14:43:52 +01:00
src Move zig utils to zig/ 2026-05-24 08:54:19 +01:00
vcpkg@56bb241160 Update vcpkg 2026-05-22 19:14:27 +01:00
zig Move zig utils to zig/ 2026-05-24 08:54:19 +01:00
.clang-format Implement running as server/client/monolith 2025-05-11 20:36:57 +01:00
.editorconfig Migrate from CMake to Zig 2026-05-22 16:00:06 +01:00
.gitignore Update .gitignore 2026-05-22 19:58:22 +01:00
.gitmodules Add vcpkg as submodule 2025-05-12 22:37:27 +01:00
build.zig Use consistent link order 2026-05-24 09:12:00 +01:00
build.zig.zon Refactor build code: add shared utils and don't define modules as packages 2026-05-23 10:23:01 +01:00
LICENSE Initial commit 2025-04-29 21:49:14 +01:00
neovim.json Replace GNS with ENet 2025-09-13 12:48:50 +01:00
README.md Update README.md 2026-05-23 10:30:03 +01:00
vcpkg-configuration.json Switch to vcpkg for dependency management 2025-05-03 20:53:43 +01:00
vcpkg.json Migrate from CMake to Zig 2026-05-22 16:00:06 +01:00

flecs-city

This is a C++ sandbox project for exploring Flecs v4 and raylib (as well as other libraries that I'll inevitably add as it grows). The long term goal is to develop a basic city simulation with vehicles. It won't necessarily be a game, but will contain game-like systems and features. I'll probably also use it to implement other things that I want to explore in the context of Flecs, such as networking.

Requirements

  • Zig
  • vcpkg (included as a submodule)
  • Windows only: a compatible MinGW toolchain (I recommend winget install MartinStorsjo.LLVM-MinGW.UCRT)

Setup

  1. Bootstrap vcpkg with ./vcpkg/bootstrap-vcpkg.sh (./vcpkg/bootstrap-vcpkg.bat on Windows).
  2. Install dependencies with ./vcpkg/vcpkg install (./vcpkg/vcpkg.exe install --triplet=x64-mingw-dynamic on Windows).

Building

Run zig build.

Running

Run zig build run. Supported args (pass after --):

  • -m[mode], --mode=[mode]: Mode to run in (monolith|server|client). Defaults to monolith.
  • -l[listen], --listen=[listen]: Port to listen on (if mode is Server). Defaults to 6420.
  • -c[connect], --connect=[connect]: Address to connect to (if mode is Client). Defaults to 127.0.0.1:6420.