An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/0x00b/gogsf

gogsf is a distributed game server engine. gogsf adopts a Space-Entity framework for game server programming. Entities can migrate between spaces by calling `EnterSpace`. Entities can call each other using EntityID which is a global unique identifier for each entity. Entites can be used to represent game objects like players, monsters, NPCs, etc. gogsf server contains multiple processes. There should be at least 3 processes: 1 dispatcher + 1 gate + 1 game. The gate process is responsable for handling game client connections. Currently, gate supports multiple transmission protocol including TCP, KCP or WebSocket. It also support data compression and encryption. The game process is where game logic actually runs. A Space will always reside in one game process where it is created. Entities can migrate between multiple game processes by entering spaces on other game processes. gogsf server can scale arbitrarily by running more process. gogsf package is dedicated to provide gogsf game engine APIs for developers. Most of time developers should use functions exported by gogsf package to manipulate spaces and entities. Developers can also use public methods of Space and Entity. gogsf does not provide a game executable. Developers have to build their own game program. A common game program looks like bellow: Basically, you need to register space type, service types and entity types and then start the endless loop of game logic. Use gogsf.CreateSpace* functions to create spaces. Use gogsf.CreateEntity* functions to create entities. Use gogsf.LoadEntity* functions to load entities from database. Use gogsf.Call* functions to do RPC among entities Each entity type should override function DescribeEntityType to declare its expected behavior and all attributes, just like bellow. Function SetPersistent can be used to make entities persistent. Persistent entities' attributes will be marshalled and saved on Entity Storage (e.g. MongoDB) every configurable minutes. Entities use attributes to store related data. Attributes can be synchronized to clients automatically. An entity's "AllClient" attributes will be synchronized to all clients of entities where this entity is in its AOI range. "Client" attributes wil be synchronized to own clients of entities. "Persistent" attributes will be saved on entity storage when entities are saved periodically. When entity is migrated from one game process to another, all attributes are marshalled and sent to the target game where the entity will be reconstructed using attribute data. gogsf uses `gogsf.ini` as the default config file. Use '-configfile <path>' to use specified config file for processes.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/0x00b/gogsf
License: Apache-2.0
Latest release: over 2 years ago
First release: over 2 years ago
Namespace: github.com/0x00b
Last synced: about 1 month ago

    Loading...
    Readme
    Loading...