🏖️ Small C99 2D game engine with a focus on prototyping.
 
 
 
 
 
 
Go to file
Dominik Madarász 276f85dee8 Implement world time single-stepping 2021-10-27 01:28:18 +02:00
art various things 2021-08-25 23:36:20 +02:00
cmake gfx: experimental 3d rendering 2021-08-11 19:38:24 +02:00
code Implement world time single-stepping 2021-10-27 01:28:18 +02:00
docs small remark on ent streaming 2021-05-08 15:08:05 +02:00
flecs-dash/etc deps: add flecs-dash 2021-01-18 17:40:47 +01:00
.editorconfig code: added base 2021-01-10 18:42:01 +02:00
.gitignore chore: packaging script + cleanup 2021-07-18 20:37:51 +02:00
CMakeLists.txt chore: reorganize source files 2021-07-28 11:49:09 +02:00
LICENSE meta: license 2021-01-18 15:51:17 +01:00
README.md Implement networking layer 2021-09-08 16:12:38 +02:00
project.4coder delete entities w/o fadeout if current view isn't active 2021-05-10 11:58:59 +02:00
run_client.bat Implement networking layer 2021-09-08 16:12:38 +02:00
run_client_remote.bat Implement networking layer 2021-09-08 16:12:38 +02:00
run_server.bat Small world fixes 2021-09-08 17:34:30 +02:00

README.md

eco2d

discord

Small C99 2D game engine with a focus on prototyping.
Brought to you by @zaklaus, @inlife and contributors

Introduction

zpl.eco2d is a small framework/game engine made out of curiosity. It attempts to bridge several libraries to create a playable sandbox with ease of extensibility and with performance in mind. The goal is not to make a generic 2D game engine but to build a game prototype that anyone can use to build various experiments.

The game runs on top of raylib technologies and makes use of the zpl ecosystem alongside the cwpack library for data serialization. The game logic and lifecycle are maintained using flecs library and its suite of tools that help us improve the development efficiency.

It was built with networked game sessions in mind from the ground up and therefore provided two significant ways to play the game:

  • Networked game (UDP) - networked sessions benefit from the use of enet library.
  • Local Only sessions - Data is streamed via local buffers.

In both cases, the game engine does not differentiate between these two options and makes the concept of Server <>client infrastructure entirely abstract. As a result, gameplay logic is only tied to living entities, where the entity might represent a networked client / local controller.

All data is transferred via packets fully automated by our serialization rule system, which uses the cwpack library in the background.

Data is streamed in or out using the librg library, thanks to which all clients only receive data relevant to their location.

On top of that, the game client can also spin up multiple client heads and cycle between them, which allows us to easily debug new features locally without having to start the Server physically.

In the abstract sense, we call the Server the game master hosting all gameplay rules and features, while the Client represents a terminal sending key inputs and receiving data to render.

Major things to do

  • More believable world generation.
  • Improved rendering - the current world structure does not allow for layered blocks, but it's something worth looking into.
  • UI and visual effects

Media

image image

Build the project

We use CMake to generate project files and manage builds. You can do the following on the command line to create and build this project:

git clone https://github.com/zpl-c/eco2d.git
cd eco2d
cmake -S . -B build
cmake --build build

Run the following command to see all the options:

Windows:
build\Debug\eco2d.exe -?

Linux:
build\eco2d.exe -?

License

zpl.eco2d code is licensed under the BSD 3-Clause license, as seen here.

Assets under the art folder are released into Public Domain unless otherwise stated.

Third-party vendors are licensed according to their respective authors.