Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spaghiajoeojo/godot-masterserver
A simple php master server for godot engine
https://github.com/spaghiajoeojo/godot-masterserver
Last synced: about 1 month ago
JSON representation
A simple php master server for godot engine
- Host: GitHub
- URL: https://github.com/spaghiajoeojo/godot-masterserver
- Owner: spaghiajoeojo
- License: mit
- Created: 2015-05-31T21:59:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-04T21:36:13.000Z (over 9 years ago)
- Last Synced: 2023-03-02T04:46:43.136Z (over 1 year ago)
- Language: PHP
- Size: 742 KB
- Stars: 12
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# godot-masterserver
A simple php master server for godot engine# Server setup
You have to create a new database (I use mysql but you can use what you want with few changes):TABLE : games
FIELDS:
- ip char(15) unique
- name char(35)
- timestamp int(11)Upload masterserver.php in your server.
# Usage
######Load MasterServer.gd
```
var MasterServer = preload("MasterServer.gd")
```######Create a new instance
```
var ms = MasterServer.new("SERVER_URL",2560)
```######Add your match to database
```
ms.add_game("MyMatch")
```######Alternatively you can specify another ip
```
ms.add_game("235.52.12.54","MyMatch2")
```######List all the game running at the moment
```
var games = ms.get_games()
for game in games:
print("Game: "+game["Name"])
print("IP: "+game["IP"])
print()
```######Delete a game previously created by ip
```
ms.del_game_by_ip("235.52.12.54")
```######or by name
```
ms.del_game_by_name("MyMatch")
```