Skip to content

judah4/MMO-Dragon-Game-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMO Dragon Game Framework

Proof of concept networking entities and load balancing with distributed server workers.

Warning

Slowly and surely improving but probably not ready for a big game yet. Under heavy development.

Tech

Features

  • Central server that handles message passing between the client and server workers.
  • An entity data store. Entities are the dynamic objects in the server. Entities have a list of data including position, type, and any game data needed.
  • MessagePack for message passing to the client and server.
  • Example Unity3d client and server.

Future Work

  • Better area entity checkouts.
  • Multiple server workers for distributed processing.

Getting Started

  1. Open the Unity Project at Workers/UnityMmo.
  2. Open the scene Scenes/SampleScene.unity.
  3. Run the sever from the tool bar Dragon GF/Run Server (Local).

Server and Clients setup

Watch the video

Important Links!

https://github.com/neuecc/MessagePack-CSharp#aot-code-generation-support-for-unityxamarin

Setting up MessagePack Codegen

-i ../packages/games.cookiedragon.mmogf.core/MmogfMessages -o ../packages/games.cookiedragon.mmogf.core/Scripts/Generated -r MmogfCoreResolver

and

-i MmogfMessages -o Scripts/Generated

Docker Build

Build Server build in the Builds/Linux folder.
Run in the main folder.

Game Build

docker build -f Docker/Worker/Dockerfile -t judah4/dragongf-testgame:v0.1.2 -t judah4/dragongf-testgame:latest .  

Example build file for the test game.

Run On Docker

docker compose -f Docker/Compose/docker-compose.yml up -d  

Push

docker push judah4/dragongf-testgame:latest  
docker push judah4/dragongf-testgame:v0.1.2  

Agones and Kubernetes

kubectl create -f Agones/dragongf-gameserver.yaml

Core Build

Run in the main folder.

Main Server Build

docker build -f Docker/MainServer/Dockerfile -t judah4/dragongf:v0.1.2 -t judah4/dragongf:latest .

Only required for core dev.

Push

docker push judah4/dragongf:latest  
docker push judah4/dragongf:v0.1.2