{"id":22746154,"url":"https://github.com/meteorgx/actor-spring-boot-example","last_synced_at":"2025-03-30T05:20:28.623Z","repository":{"id":218855800,"uuid":"747537752","full_name":"MeteorGX/actor-spring-boot-example","owner":"MeteorGX","description":"WebSocket Actor Example","archived":false,"fork":false,"pushed_at":"2024-03-27T18:24:47.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T07:26:58.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MeteorGX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-24T06:04:43.000Z","updated_at":"2024-01-24T06:11:20.000Z","dependencies_parsed_at":"2024-12-11T02:11:55.564Z","dependency_job_id":"af82a1e1-09e5-4cc7-806e-53a1f2653d19","html_url":"https://github.com/MeteorGX/actor-spring-boot-example","commit_stats":null,"previous_names":["meteorgx/actor-spring-boot-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeteorGX%2Factor-spring-boot-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeteorGX%2Factor-spring-boot-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeteorGX%2Factor-spring-boot-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeteorGX%2Factor-spring-boot-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeteorGX","download_url":"https://codeload.github.com/MeteorGX/actor-spring-boot-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246278452,"owners_count":20751765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T02:11:45.297Z","updated_at":"2025-03-30T05:20:28.604Z","avatar_url":"https://github.com/MeteorGX.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# H5游戏服务端\n\n基于 [actor-spring-boot-starter](https://github.com/MeteorGX/actor-spring-boot-starter) 设计的 WebSocket 服务端\n\n游戏客户端则是基于 [actor-spring-boot-client](https://github.com/MeteorGX/actor-spring-boot-client) 开发,\n这里仅仅做H5网络游戏开发设计的思维流程.\n\n\u003e\n具体开发思维可以参考 [H5服务端开发思考](https://www.meteorcat.net/tags/h5%E6%B8%B8%E6%88%8F%E6%9C%8D%E5%8A%A1%E7%AB%AF/)\n\n## SDK对接\n\n常规来说商业游戏会接入第三方授权账号体系, 甚至于自己本身都有带的账号密码登录体系, 这里最好抽离出来和服务器列表|公告列表单独做系统服务.\n\n\u003e 第三方账号验证体系不要加在游戏服务端, 有时候第三方SDK会频繁更新需要重启或者断点日志等情况\n\n最基本账号密码登录授权 UML 流程如下:\n\n![UML](sdk.drawio.png)\n\n这里已经采用 `python` 编写好协议同步工具:\n\n```shell\n# 将策划配置的 CSV 表转化为通用 JSON 格式提供给服务端和客户端使用\n.\\tools\\csv2json.py -i .\\table\\ -o .\\target\\ -e gbk\n```\n\n\u003e 需要注意: 加载配置表的功能写成热更新处理, 因为上线过程最常见策划配置奖励临时需要修改\n\n## 协议对接\n\n注意通讯协议并不是服务端独有, 通讯协议是 `服务端和客户端` 共同维护处理, 授权流程 UML 如下:\n\n![UML](game.drawio.png)\n\n这里已经采用 `python` 编写好协议同步工具:\n\n```shell\n# 将内部协议 JSON 转化成支持 Java/Python/Lua/C# 等格式文件\n# 客户端和服务端可以直接转化并取用\n.\\tools\\protocol.py -i .\\protocol\\ -o .\\target\\\n```\n\n\u003e 协议最好独立版本库让客户端和服务端一起维护, 可以直接建立 GIT|SVN 库来另外同步\n\n## 策划对接\n\n\u003e 注意: 策划基本上不接触代码的, 所以尽可能避免让其接触命令行处理, 最多让其用 `Python` 处理.\n\n能够界面化处理的事情不要用命令行处理, 策划大部分只需要关注游戏数值配置, 所以 Excel 才是策划和程序对接手段.\n\n一般来说策划和程序开会确定版本要求功能, 常规来说会得出以下结果:\n\n- 版本号和版本上线时间: 假设上线所需一周则需要调用美术|程序|外包等流程保证开发不会突然停滞\n- 需要上线的功能: 一般需要准备上线的游戏玩法和活动等信息, 用于协调美术和客户端游玩逻辑\n- 需要配置的策划表: 设计定义出玩法收益数值表和奖励配置表, 用于给客户端和服务端读取加载\n\n了解这些信息之后就可以准备游戏开发的设计流程:\n\n![UML](design.drawio.png)\n\n\u003e 策划配置表基本是另外处理版本库, 常规都是 SVN 提交上同步分发给客户端和服务端处理\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorgx%2Factor-spring-boot-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteorgx%2Factor-spring-boot-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorgx%2Factor-spring-boot-example/lists"}