A distributed game server made with Golang
At first, I just want to learn Golang.I started to think about which is the best way? Because the concurrency mechanisms of Golang is very powerful, I choose online game to verify if I can use Golang to make a efficient game server.For me, this is the first time I make this such hard project. I have to learn Unity, Golang, C# At a time. I am glad that I still have full passion to this project and I never give up.
In the branch master, I use ODE to simulate the physics on server.It is the most safe way to keep game fair.However, I found the memory server use is too much for me, Because I don't have money to maintance the server. So I started to design a way to let client validate packet and simulate physics separatly to reduce the heavy load on the server. I just complete the entities can attack each others so far. I will start to design aftewards:
Server : Two Way to run server:
go run main.go --type=agent
on your local machine (Must on Where you install Kops)go run main.go --type=standalone
on your local machineClient :
If you want to make your own game by modifying this project, I am pleasured. You can throught these step to make it work.