hewiefreeman / GopherGameServer

:trophy: Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
https://hewiefreeman.github.io/GopherGameServer
Apache License 2.0
178 stars 21 forks source link
api chat chat-room contributions-welcome friending game-server go golang good-first-issue gopher-game-server help-wanted javascript json multiplayer real-time server voice voice-chat voip websocket


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.

:star: Main features

(*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

(*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


:video_game: Client APIs

:file_folder: 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

:books: Usage

:bookmark: Wiki Home

Table of Contents

1) Getting Started

:scroll: 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

:milky_way: 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 :star:!

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.