Skip to content

๐Ÿ† Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!

License

Notifications You must be signed in to change notification settings

hewiefreeman/GopherGameServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Gopher Game Server provides a flexible and diverse set of tools that greatly ease developments of any type of online multiplayer game, or real-time application. GGS does all the heavy lifting for you, ensuring you never need to worry about synchronizing or data type conversions.

Moreover, Gopher has a built-in, fully customizable SQL client authentication mechanism that creates and manages users' accounts for you. It even ties in a friending tool, so users can befriend and invite one another to groups, check each other's status, and more. All components are easily configurable and customizable for any specific project's needs.

โญ Main features

  • Super easy APIs for server, database, and client coding
  • Chat, private messaging, and voice chat
  • Customizable client authentication (*1)
  • Built-in friending mechanism (*1)
  • Supports multiple connections on the same User
  • Server saves state on shut-down and restores on reboot (*2)

(*1) A MySQL (or similar SQL) database is required for the authentication/friending feature, but is an optional (like most) feature that can be enabled or disabled to use your own implementations.

(*2) When updating and restarting your server, you might need to be able to recover any rooms that were in the middle of a game. This enables you to do so with minimal effort.

Upcoming features

  • Distributed load balancer and server coordinator
  • Distributed server broadcasts
  • GUI for administrating and monitoring servers
  • Integration with GopherDB when stable (*1)

(*1) MySQL isn't very scalable on it's own, and the SQL implementation for storing friend info is probably not the most efficient. Hence, it is recommended to put the friends table into a separate database cluster. GopherDB, on the other hand, is a very promising database project that will greatly increase server efficiency, and could possibly even outperform MySQL overall. It has a built-in authentication table type, which takes a substantial load off the game servers, and further secures your users' private information. It also supports nested values which are deep-validated through table schemas, so you can store complex information using a wide variety of data types and rules. You can follow the project and get more info with the link above!

Change Log

CHANGE_LOG.md


๐ŸŽฎ Client APIs

If you want to make a client API in an unsupported language and want to know where to start and/or have any questions, feel free to open a new issue!

๐Ÿ“ Installing

Gopher Game Server requires at least Go v1.8+ (and MySQL v5.7+ for the authentication and friending features).

First, install the dependencies:

go get github.com/gorilla/websocket
go get github.com/go-sql-driver/mysql
go get golang.org/x/crypto/bcrypt

Then install the server:

go get github.com/hewiefreeman/GopherGameServer

๐Ÿ“š Usage

๐Ÿ”– Wiki Home

Table of Contents

  1. Getting Started
  2. Rooms
  3. Users
  4. Custom Client Actions
  5. Saving & Restoring
  6. SQL Features

๐Ÿ“œ Documentation

Package gopher - Main server package for startup and settings

Package core - Package for all User and Room functionality

Package actions - Package for making custom client actions

Package database - Package for customizing your database

๐ŸŒŒ Contributions

Contributions are open and welcomed! Help is needed for everything from documentation, cleaning up code, performance enhancements, client APIs and more. Don't forget to show your support with a โญ!

If you want to make a client API in an unsupported language and want to know where to start and/or have any questions, feel free to open a new issue!

Please read the following articles before submitting any contributions or filing an Issue:


GopherGameServer and all of it's contents Copyright 2022 Dominique Debergue
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.