Distributing computation of different game elements in separate machines to remove computation load from the game rendering machine. All game element computations are done in the server in a distributed manner. Client machines connect to server to begin game, and then communicate with Kafka servers to get game element informations.
Distributed-Game-Framework requires Go >= 1.14 and a running Kafka >= 2.12 server.
go get -v -d -x github.com/veandco/go-sdl2/{sdl,img,mix,ttf}
go get -v -d -x github.com/segmentio/kafka-go
- Start kafka server prefereable on port
9092
. - Start server -
go run server.go --kafkaAddress localhost:9092
- In a new terminal start first client -
go run client.go --clientAddress 127.0.0.1:5000
- In another new terminal start second client -
go run client.go --clientAddress 127.0.0.1:5001
- Game starts once bootstrap is completed (5-7 seconds).