Skip to content

thtg88/game-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Server

This Go program simulates a naïve game server, where random players of different levels join a server for a random amount of time, through clients.

Additionally, it provides gRPC and TCP socket wrappers, as a way to test networking, Protobuf, gRPC, TCP sockets, and Go channels capabilities.

Requirements

Go v1.20, you can get it using gvm with:

gvm install go1.20

Development

You can test the program locally without any remote calls with:

go run cmd/local-game-simulation/main.go

Otherwise you can test a client-server setup by running the server in one terminal with:

go run cmd/remote-server/main.go

And any other number of clients in different terminal windows with:

go run cmd/remote-client/main.go

Additionally a command to spawn 10,000 clients against the server is available with:

go run cmd/remote-client-spawn/main.go

Be careful though, as this is quite resource-intensive and, if you over-do it, you may run out of available TCP ports on your machine :D

About

A naïve game server implementation in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published