slontia / lgtbot Goto Github PK
View Code? Open in Web Editor NEW聊天室游戏裁判机器人,将聊天室打造成游戏竞技平台
License: GNU Lesser General Public License v2.1
聊天室游戏裁判机器人,将聊天室打造成游戏竞技平台
License: GNU Lesser General Public License v2.1
目前每次玩家获取战绩,都要遍历一遍所有的 match 信息,再求和,效率比较低,可以定期将玩家分数统计汇总到 user 表中
如果有,则不退出进程。同时也可以选择禁止新的游戏开启,等待当前已有游戏结束后再退出进程。
几种方法:
#新游戏 <游戏名称> 强制
如平均和牌巡数、各个番型数量等等
主要难点在于机器人和游戏之间的通信机制
试玩游戏依然不应当对分数造成任何影响,同时不应当影响等级分变动的幅度
可以考虑将试玩游戏的记录放到单独一张表中
重新载入动态库,不重启机器人
需要调研在有游戏正在进行的情况下,释放动态库,会不会引发内存问题
初步考虑core暴露数据接口,将RocksDB嵌入到lgtbot-coolq,lgtbot-coolq将数据写入到RocksDB
RocksDB是嵌入式数据库,灵活度更高,但是在windows环境下编译很恶心
游戏进行中时,场外旁观的玩家可以通过一些方式与bot互动。例如,Nerduel、wordle等游戏中,场外玩家如果提前猜到某个玩家的目标,可以向裁判场外提交。
期望实现方式:框架提供游戏进行中场外玩家向bot私聊或@发送信息时的回调接口。
目前在game层做timer逻辑,如果time up导致game over,会出现内存释放冲突的问题。将timer上调至match层还有个好处是可以将逻辑和request的逻辑统一,这样可以简化锁逻辑等
对于零和分与头名分,取最近 6 个月或最近 1000 次比赛的分数;对于等级分,最近 3 个月没有参加过游戏的玩家不计入排行
显示作者、最大人数等信息
如果所有用户都被淘汰,且有机器人在场,此时计时器会重新计时,但是玩家已经无法执行操作了,导致要等很久,游戏才会结束。
几种解决方案:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.