All Projects → zpl-c → Librg

zpl-c / Librg

Licence: bsd-3-clause
🚀 Making multi-player gamedev simpler since 2017

Programming Languages

c
50402 projects - #5 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Librg

Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (-87.95%)
Mutual labels:  sync, game, gamedev, multiplayer, networking
Game Networking Resources
A Curated List of Game Network Programming Resources
Stars: ✭ 4,208 (+417.59%)
Mutual labels:  replication, gamedev, multiplayer, network, networking
Enet
⚡️ ENet reliable UDP networking library
Stars: ✭ 202 (-75.15%)
Mutual labels:  gamedev, lightweight, network, networking
Flopnite Ue4
A remake of the popular battle royale game, Fortnite, made in Unreal Engine 4 and integrated with Amazon GameLift
Stars: ✭ 250 (-69.25%)
Mutual labels:  replication, game, multiplayer, networking
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: ✭ 181 (-77.74%)
Mutual labels:  library, network, networking
Gameproject3
游戏服务器框架,网络层分别用SocketAPI、Boost Asio、Libuv三种方式实现, 框架内使用共享内存,无锁队列,对象池,内存池来提高服务器性能。还包含一个不断完善的Unity 3D客户端,客户端含大量完整资源,坐骑,宠物,伙伴,装备, 这些均己实现上阵和穿戴, 并可进入副本战斗,多人玩法也己实现, 持续开发中。
Stars: ✭ 655 (-19.43%)
Mutual labels:  game, gamedev, multiplayer
Lance
Multiplayer game server based on Node.JS
Stars: ✭ 1,161 (+42.8%)
Mutual labels:  gamedev, multiplayer, networking
Nano
Lightweight, facility, high performance golang based game server framework
Stars: ✭ 1,888 (+132.23%)
Mutual labels:  game, lightweight, networking
Reldens
Reldens - You can make it - Open Source MMORPG Platform
Stars: ✭ 130 (-84.01%)
Mutual labels:  game, gamedev, multiplayer
Kaetram Open
An open-source 2D HTML5 adventure based off BrowserQuest (BQ).
Stars: ✭ 138 (-83.03%)
Mutual labels:  game, gamedev, multiplayer
Cute headers
Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
Stars: ✭ 3,274 (+302.71%)
Mutual labels:  game, library, networking
Ruffles
Lightweight and fully managed reliable UDP library.
Stars: ✭ 131 (-83.89%)
Mutual labels:  library, network, networking
Macfinder
An iOS Library that helps you find the MAC Address of a specific IP
Stars: ✭ 57 (-92.99%)
Mutual labels:  library, network, networking
Openspades
Compatible client of Ace of Spades 0.75
Stars: ✭ 769 (-5.41%)
Mutual labels:  game, multiplayer, network
Pnet
High level Java network library
Stars: ✭ 49 (-93.97%)
Mutual labels:  library, network, networking
Pydark
PyDark is a 2D and Online Multiplayer video game framework written on-top of Python and PyGame.
Stars: ✭ 201 (-75.28%)
Mutual labels:  game, multiplayer, networking
Lambdahack
Haskell game engine library for roguelike dungeon crawlers; please offer feedback, e.g., after trying out the sample game with the web frontend at
Stars: ✭ 439 (-46%)
Mutual labels:  game, gamedev, library
Open Builder
Open "Minecraft-like" game with multiplayer support and Lua scripting support for the both client and server
Stars: ✭ 569 (-30.01%)
Mutual labels:  game, multiplayer, networking
Grassmarlin
Provides situational awareness of Industrial Control Systems (ICS) and Supervisory Control and Data Acquisition (SCADA) networks in support of network security assessments. #nsacyber
Stars: ✭ 621 (-23.62%)
Mutual labels:  network, networking
Handright
A lightweight Python library for simulating Chinese handwriting
Stars: ✭ 634 (-22.02%)
Mutual labels:  library, lightweight
librg
build status version discord license

Making multi-player gamedev simpler since 2017. Single-header cross-platform world replication in pure C99.
Built with love using zpl • Brought to you by @inlife, @zaklaus and other contributors

Introduction

librg is a lightweight library that serves as a middleware between data-transferring libraries (networking, file-streaming, etc.) and core application/game logic.

Main responsibilities of the library include:

  • entity tracking (tracks which entity belongs to what world, and what states do they have)
  • owner tracking (tracks which participant owns what entity)
  • area of interest management (controls what can and cannot be seen a participant)
  • world replication (re-creates a limited representation in a destination world of what is considered visible to a participant in the source world)

The library was born to solve complexities of setting up and managing the flow of multi-player games and dedicated game servers. It came a long way of stripping out things that were non-essential, slowly sculpting into its current form, which you are able to see and use today.

Features

  • cross-platform support
  • lightweight, single-header
  • supports 2d/3d worlds of various sizes
  • compile- and run-time configurable
  • written in C99 (portability reasons)
  • no external dependencies
  • built-in unit test coverage

F.A.Q.

  1. Is this a networking library?

    • Not really, no. It is intended to be used with netwoking in mind, but it does not have any networking capabilities on its own.
  2. Can I use any networking library with it?

    • Yes. All you need is an ability to read data to and from the buffer, and most libraries do support that. Theoretically it can be anything as low level as pure UDP, and up to Websocket/WebRTC.
  3. The repository contains a bunch of *.h and *.c files, and yet you suggest it is a single-header library, how is that possible?

    • The library is spread into multiple files so it is easier to work with it while developing, however each time a new release is created, a "bundled" version of the header file is created and pushed directly to the releases page.
  4. Does librg offer an entity system?

    • No, the library does not manage nor actually create its own entities, it rather expects you to provide your own entity/object handle to attach some internal data onto it, which in context of the library is called "tracking".
  5. How do I pack data, do you provide methods for that?

    • No, the library does not provide any data-packing/serialization methods. It's recommended you use some existing library for that (protobuf, flatbuffers, msgpack, etc.), or make your own implementation.
  6. I see you mention chunks, does it mean my game/app should be chunk-based?

    • No. Chunks are only used internally, to artificially divide the space of the world on statically sized squares/cubes so that querying would work efficiently. Even if your game does use chunks, their amount/sizes/offsets are not required to much and be the same.

Documentation

To read detailed documentation about the library, see examples and quick start guide, please visit our documentation page.

Additionally you can check code/apps folder for actual code examples.

Illustration

Here is a simple illustration that attempts to describe how the library works on a simple 2d world of 4x4 chunks. For a 3d world of bigger size everything would work in a very similar way, just in 3 dimensions.

librg illustration
(click on the image to view full-size)

Migration

If you've used the library before version v6.0.0, it is recommended to read the migration guide located here.

Support

We are testing the library for various platforms. This table provides some sort of description for compatibility. If you have tested it, and your result is different from the one in the table, please feel free to describe the issue in the issues.

Platform / Result Windows macOS Linux iOS Android Raspberry Pi OpenBSD FreeBSD Emscripten
clang clang gcc, clang gcc, clang gcc, clang
msvc, mingw gcc, clang gcc, clang emcc

Legend:

  • ❔ - Library was not tested on this platform/compiler yet
  • ✅ - Library successfully compiles and all tests are executed properly

Development

If you wish to contribute, add new feature, optimizations, or overall improvements, here are the instructions on how to do that:

  1. Clone the repo, f.e.: git clone https://github.com/zpl-c/librg.git
  2. Run make to build all projects, and verify everything works
  3. Develop a feature, add tests for it in code/tests/
  4. And eventually run make test again to check

In case you are working from Windows, and/or are not able to use make, you can also use built-in cmake config file to generate a Visual Studio solution, to do that:

  1. mkdir build
  2. cd build
  3. cmake ../misc -G"Visual Studio 16 2019" (or any configuration you have)
  4. cmake --open . (opens VS with the solution)
  5. And repeat steps from above
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].