All Projects → kudoochui → kudosServer

kudoochui / kudosServer

Licence: MIT license
基于kudos游戏开发框架开发的脚手架。

Programming Languages

javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to kudosServer

mmo-arch
Base Architecture for creating scalable games using microservices through Angular, Phaser, NestJS, NATS, and MySQL
Stars: ✭ 25 (-24.24%)
Mutual labels:  game-server, game-dev
mcos
A game server, being written from scratch, for a very old and long dead game
Stars: ✭ 31 (-6.06%)
Mutual labels:  game-server
spunkybot
Multi-platform administration and RCON tool for Urban Terror
Stars: ✭ 19 (-42.42%)
Mutual labels:  game-server
intellij-autohotkey
AutoHotkey plugin for the Jetbrain's IntelliJ platform
Stars: ✭ 30 (-9.09%)
Mutual labels:  goland
05 TestingGrounds
A Hunger-Games inspired FPS with large outdoor terrains. Advanced AI, basic networking, pickups, skeletal meshes, checkpoints and more. (ref: TG_URC) http://gdev.tv/urcgithub
Stars: ✭ 121 (+266.67%)
Mutual labels:  game-dev
Gibbed.Borderlands
Tools & code for use with Borderlands.
Stars: ✭ 44 (+33.33%)
Mutual labels:  game-dev
JetBrains-scheme
JetBrains主题,更完美的高亮。支持 IntelliJ IDEA、phpstorm、goland、webstorm
Stars: ✭ 25 (-24.24%)
Mutual labels:  goland
osgc
Open Source Game Collection - mini games created with xygine and SFML!
Stars: ✭ 17 (-48.48%)
Mutual labels:  game-dev
ualbion
A remake of the 1995 RPG Albion (requires data from an install of the original game)
Stars: ✭ 87 (+163.64%)
Mutual labels:  game-dev
minigame-rust
A simple game made in Rust that runs on desktop and mobile
Stars: ✭ 118 (+257.58%)
Mutual labels:  game-dev
tomb mates
t.me/memes4js
Stars: ✭ 40 (+21.21%)
Mutual labels:  game-dev
cl-liballegro
Common Lisp bindings and interface to the Allegro 5 game programming library
Stars: ✭ 44 (+33.33%)
Mutual labels:  game-dev
jetbrains-theme
🎨 A modern, productivity-increaser theme for all JetBrains IDEs
Stars: ✭ 108 (+227.27%)
Mutual labels:  goland
harmony-ecs
A small archetypal ECS focused on compatibility and performance
Stars: ✭ 33 (+0%)
Mutual labels:  game-dev
jwEngine
A cross-platform C++<->lua server quick solution
Stars: ✭ 226 (+584.85%)
Mutual labels:  game-server
valheim-k8s
valheim game-server on kubernetes
Stars: ✭ 74 (+124.24%)
Mutual labels:  game-server
Squad
Dockerfile for automated build of a Squad gameserver: https://hub.docker.com/r/cm2network/squad/
Stars: ✭ 21 (-36.36%)
Mutual labels:  game-server
gamedex
👾 The code for my game dev + computer graphics experiments on YouTube.
Stars: ✭ 165 (+400%)
Mutual labels:  game-dev
debugger
Debugging helper for Go
Stars: ✭ 54 (+63.64%)
Mutual labels:  goland
Gibbed.JustCause4
Tools & code for use with Just Cause 4.
Stars: ✭ 20 (-39.39%)
Mutual labels:  game-dev

kudosServer

基于kudos游戏开发框架开发的脚手架。

安装

###1. 下载

git clone https://github.com/kudoochui/kudosServer.git

###2. 启动注册中心 安装consul

consul agent --dev

###3. 运行游戏

go build app/main.go
./main

###4. 切换服务器 这里有两组服务器,gate、user一组是使用的pomelo连接器(connector),它支持的是websocket的pomelo通信协议。gatepbg与world是另一组支持 protobuf连接器(connector)的服务器。它同时支持websocket与tcp,使用的是protobuf数据压缩协议。

4.1 pomelo服务器组对应的客户端是bin/clientPomelo

4.2 protobuf服务器组对应客户端: websocket对应的是bin/client tcp对应的是bin/goclient

go run main.go

4.3 从pomelo服务器组切换到protobuf服务器组 默认是pomelo服务器组。做以下修改切换到protobuf服务器上来

4.3.1 打开main.go上的注释

    //_ "github.com/kudoochui/kudosServer/app/gate"
    //_ "github.com/kudoochui/kudosServer/app/user"
    _ "github.com/kudoochui/kudosServer/app/gatebp"
	_ "github.com/kudoochui/kudosServer/app/world"

...

    //切换到使用protobuf, 默认使用json
	codecService.SetCodecType(codecService.TYPE_CODEC_PROTOBUF)
...

4.3.2 打开config.go上的注释

	//ServersConfig, _ = conf.NewAppConfig("servers.json")				// pomelo server
	ServersConfig, _ = conf.NewAppConfig("pbservers.json")		// pb server

4.3.3 完成

4.4 websocket切换成tcp 找到gateServer.go

conn := protobuf.NewConnector(
		//protobuf.WSAddr(wsAddr),
		protobuf.TCPAddr(wsAddr),
		)

切换。

目录介绍

/app
    |-  gate                gate服务节点:网络前端
        |- gate.go  
        |- msgHandler.go    注册路由和服务
        |- remoteAritch.go  Aritch服务:一些基础运算
    |-  gatebp              gate服务节点:使用的是pb连接器
    |-  user                user服务节点:后端服务
        |- msg              protobuf消息目录
        |- msgHandler.go    注册路由和服务
        |- remoteHello.go  Hello服务示例
        |- remoteHi.go      Hi服务
        |- remoteRoom.go    房间服务:加入、离开,群发消息
        |- userServer.go  
    |-  world                pb连接对应的后台服务
    main.go                 入口
/bin
    |-  client              protobuf网页测试客户端
    |-  clientPomelo        网页测试客户端,浏览器直接打开,点Test Game Server运行
    |-  conf                游戏配置
    |-  goclient            protobuf tcp连接测试
/config
    |-  config.go           配置文件初始化

分布式部署

//启动一个连接服
./main -type gate -id gate-1
//再启动一个
./main -type gate -id gate-2
//启动一个后端服务
./main -type user -id user-1

可部署在不同服务器上,在servers.json中配置好ip和端口即可。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].