Skip to content

minotaur is a development framework mainly used for game server minotaur 一个主要用于游戏服务器的开发框架

License

Notifications You must be signed in to change notification settings

baijinping/minotaur

 
 

Repository files navigation

Minotaur

Go doc

Minotaur 是一个基于Golang 1.20 编写的服务端开发支持库,其中采用了大量泛型设计,用于游戏服务器开发。

目录结构概况

mindmap
  root((Minotaur))
    /configuration 配置管理功能
    /game 游戏通用功能
      /builtin 游戏通用功能内置实现
    /notify 通知功能接口定义
    /planner 策划相关工具目录
      /pce 配置导表功能实现
    /report 数据埋点及上报功能
    /server 网络服务器支持
      /cross 内置跨服功能实现
      /router 内置路由器功能实现
    /utils 工具结构函数目录
Loading

Server 架构预览

server-gdi.jpg

安装

注意:依赖于 Go 1.20 +

运行以下 Go 命令来安装软件包:minotaur

$ go get -u github.com/kercylan98/minotaur

用法

本地文档

可使用 godoc 搭建本地文档服务器

安装 godoc

git clone golang.org/x/tools
cd tools/cmd
go install ...

使用 godoc 启动本地文档服务器

godoc -http=:9998 -play

Windows

.\local-doc.bat

Linux or MacOS

chmod 777 ./local-doc.sh
./local-doc.sh

文档地址

简单示例

创建一个基于Websocket的回响服务器。

package main

import (
	"github.com/kercylan98/minotaur/server"
)

func main() {
	srv := server.New(server.NetworkWebsocket)
	srv.RegConnectionReceivePacketEvent(func(srv *server.Server, conn *server.Conn, packet server.Packet) {
		conn.Write(packet)
	})
	if err := srv.Run(":9999"); err != nil {
		panic(err)
	}
}

访问 WebSocket 在线测试 进行验证。

Websocket地址: ws:https://127.0.0.1:9999

持续更新的示例项目

参与贡献

请参考 CONTRIBUTING.md 贡献指南。

JetBrains OS licenses

Minotaur had been being developed with GoLand IDE under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.

About

minotaur is a development framework mainly used for game server minotaur 一个主要用于游戏服务器的开发框架

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%