Coder Social home page Coder Social logo

nikibobi / godot-agones Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 8.0 24 KB

Agones SDK implementation in Godot engine with GDNative C++ bindings

License: MIT License

Python 25.77% C++ 71.86% Dockerfile 2.37%
godot agones kubernetes game-development multiplayer docker dedicated-gameservers

godot-agones's Introduction

Godot plugin for Agones

Clone with submodules

git clone --recurse-submodules https://github.com/nikibobi/godot-agones.git

Download Agones libs

First you need to download and extract the lib/ folder to example/bin/x11/lib/ and include/ folder to include/

Compile

with Scons

To compile the library itself you need to have scons installed. Then to build just type scons and it will use these defaults

scons platform=linux bits=64 target=debug project=example/

Since we will be running the server in a container you shouldn't change those parameters. You can pass project to your game's path and it will put the compiled library there.

by hand

If you prefer not to use scons you can use these commands (or use them to make a proper Makefile)

g++ -o src/gdlibrary.os -c -fPIC -g -O3 -std=c++14 -fPIC -I. -Isrc -Iinclude -Igodot_headers -Igodot-cpp/include -Igodot-cpp/include/core src/gdlibrary.cpp

g++ -o src/agones.os -c -fPIC -g -O3 -std=c++14 -fPIC -I. -Isrc -Iinclude -Igodot_headers -Igodot-cpp/include -Igodot-cpp/include/core src/agones.cpp

g++ -o example/bin/x11/libagones.so -shared src/gdlibrary.os src/agones.os -Lgodot-cpp/bin -Lexample/bin/x11/lib -lgodot-cpp.linux.64 -lagonessdk -lgrpc++_unsecure -lgrpc -lprotobuf

Export example

Next you need to export your game to server platform in example/export/ folder.

Build Docker image

I will asume you already have Docker installed. After the game is exported you can build an image from it.

docker build -t <image> .

docker push <image>

Install Agones

Next you have to install Agones to your kubernetes cluster.

Create a game server

Next use kubectl to create a single game server instance

kubectl apply -f k8s/gameserver.yaml

And check the results with

watch kubectl describe gameserver

until it's state becomes ready and it gets ip and port asigned.

You can read more detailed guides:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.