在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:xiaonanln/goworld开源软件地址:https://github.com/xiaonanln/goworld开源编程语言:Go 99.9%开源软件介绍:GoWorldScalable Distributed Game Server Engine with Hot Reload in Golang 中文资料游戏服务端开源引擎GoWorld教程1.安装和运行
Features
ArchitectureIntroductionGoWorld server adopts an entity framework, in which entities represent all players, monsters, NPCs. Entities in the same space can visit each other directly by calling methods or access attributes. Entities in different spaces can call each over using RPC. A GoWorld server consists of one dispatcher, one or more games and one or more gates. The gates are responsible for handling client connections and receive/send packets from/to clients. The games manages all entities and runs all game logic. The dispatcher is responsible for redirecting packets among games and between games and gates. The game processes are hot-swappable.
We can swap a game by sending Installing GoWorldGoWorld requries Go 1.11+ to install. go get github.com/xiaonanln/goworld/cmd/... Manage GoWorld ServersUse command Build Example Chatroom Server: $ goworld build examples/chatroom_demo Start Example Chatroom Server: (dispatcher -> game -> gate) $ goworld start examples/chatroom_demo Stop Game Server (gate -> game -> dispatcher): $ goworld stop examples/chatroom_demo Reload Game Servers: $ goworld reload examples/chatroom_demo Reload will reboot game processes with the current executable while preserving all game server states. However, it does not work on Windows. List Server Processes: $ goworld status examples/chatroom_demo
> 1 dispatcher running, 1/1 gates running, 1/1 games (examples/chatroom_demo) running
> 2763 dispatcher /home/ubuntu/go/src/github.com/xiaonanln/goworld/components/dispatcher/dispatcher -dispid 1
> 2770 chatroom_demo /home/ubuntu/go/src/github.com/xiaonanln/goworld/examples/chatroom_demo/chatroom_demo -gid 1
> 2779 gate /home/ubuntu/go/src/github.com/xiaonanln/goworld/components/gate/gate -gid 1 DemosChatroom DemoThe chatroom demo is a simple implementation of chatroom server and client. It illustrates how GoWorld can also be used for games which don't divide players by spaces. The chatroom demo provides following features:
Build Server: goworld build examples/chatroom_demo Run Server: goworld start examples/chatroom_demo Chatroom Demo Client: Chatroom demo client implements the client-server protocol in Javascript. Unity DemoUnity Demo is a simple multiple player monster shooting game to show how spaces and entities of GoWorld can be used to create multiple player online games.
Developing features:
Build Server: goworld build examples/unity_demo Run Server: goworld start examples/unity_demo Unity Demo Client: Unity demo client implements the client-server protocol in C#. The client for unity demo is hosted at https://github.com/xiaonanln/goworld-unity-demo. The project was created and built in Unity 2017.1. You can try the demo by downloading GoWorldUnityDemo.zip. The demo connects to a goworld server on Huawei Cloud instance. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论