版本更新日志
版本频率、版本规则
版本频率
每月会发 1 ~ 2 个版本,通常在大版本内升级总是兼容的,如 21.1 升级到任意 21.x 的高版本。
版本规则
- x 表示当前使用的 JDK LTS 版本
- y 表示 ioGame 新特性、新功能、新模块、bugfix 相关
version: 21.xx
2025
2025-06-17 - v21.28
https://github.com/iohao/ioGame/releases/tag/21.28
版本更新汇总
- feat(room): The room supports convenient operations. 房间支持便捷操作。
- Deprecated RoomStatusEnum. 废弃 RoomStatusEnum。
- feat(room): The room supports convenient broadcastRange. 房间支持便捷广播。
- docs(all): Update documentation link (https://iohao.github.io/game). 更新代码中的使用文档链接。
- #451 Refactor the usage documentation to use the new access address: https://iohao.github.io/game/ . 重构使用文档,并使用新地址。
[other updates]
<netty.version>4.1.122.Final</netty.version>
2025-05-09 - v21.27
https://github.com/iohao/ioGame/releases/tag/21.27
版本更新汇总
feat(generate-code): #449 Supports GDScript GenerateCode About examples: https://github.com/iohao/ioGameSdkGDScriptExampleGodot
public final class GenerateTest {
// setting root path
static String rootPath = "/Users/join/gitme/ioGame-sdk/";
public static void main(String[] args) {
// CHINA or US
Locale.setDefault(Locale.CHINA);
// Load the business framework of each gameLogicServer
// cn: 加载游戏逻辑服的业务框架
yourListLogic().forEach(BrokerClientStartup::createBarSkeleton);
/*
* Generate actions, broadcasts, and error codes.
* cn: 生成 action、广播、错误码
*/
// ----- About generating GDScript code -----
generateCodeGDScriptGodot();
// Added an enumeration error code class to generate error code related information
IoGameDocumentHelper.addErrorCodeClass(YourGameCodeEnum.class);
// Generate document
IoGameDocumentHelper.generateDocument();
}
private static void generateCodeGDScriptGodot() {
var documentGenerate = new GDScriptDocumentGenerate();
// By default, it will be generated in the target/code directory
// cn: 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
String path = rootPath + "ioGameSdkGDScriptExampleGodot/gen/code";
documentGenerate.setPath(path);
IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}
}
2025-04-30 - v21.26
https://github.com/iohao/ioGame/releases/tag/21.26
版本更新汇总
- refactor(Code generation): Code generation supports importing multiple .proto files,代码生成支持多个 .proto 文件
- refactor(i18n): #376
supports importing multiple .proto files
public interface SdkProtoFile {
String fileName = "common.proto";
String filePackage = "common";
String fileName2 = "common2.proto";
String filePackage2 = "common2";
}
@ToString
@ProtobufClass
@FieldDefaults(level = AccessLevel.PUBLIC)
@ProtoFileMerge(fileName = SdkProtoFile.fileName, filePackage = SdkProtoFile.filePackage)
public final class LoginVerifyMessage {
/** jwt */
String jwt;
}
@ToString
@ProtobufClass
@FieldDefaults(level = AccessLevel.PUBLIC)
@ProtoFileMerge(fileName = SdkProtoFile.fileName2, filePackage = SdkProtoFile.filePackage2)
public final class BulletMessage {
/** id */
int bulletId;
/** bullet name */
String name;
}
2025-03-20 - v21.25
https://github.com/iohao/ioGame/releases/tag/21.25
版本更新汇总
- fix(broker): DefaultWithElementSelector
- refactor(net): enhance ResponseCollectItemMessage,增强 ResponseCollectItemMessage。
- refactor(core): FlowContext add the createResponseMessage method,FlowContext 新增方法 createResponseMessage。
2025-02-12 - v21.24
https://github.com/iohao/ioGame/releases/tag/21.24
版本更新汇总
- refactor(client): Client support boxing and unboxing,模拟客户端请求参数支持装箱、拆箱。
- refactor(core): FlowContextKit add ofFlowContext method,新增方法 ofFlowContext
- refactor(room): room add getPlayerBySeat method,房间新增方法 getPlayerBySeat
- fix(core): #425 When there is a method with the same name as the action, the
actionMethodIndex
is not obtained correctly. action 存在同名方法的情况时,没有获取正确的 actionMethodIndex- refactor(core): MethodParser add parseData method
Client support boxing and unboxing
// my client,support:int、long、boolean、String、List
public final class MyInputCommandRegion extends AbstractInputCommandRegion {
@Override
public void initInputCommand() {
this.inputCommandCreate.cmd = 1;
// Client support boxing and unboxing
ofCommand(2).setTitle("enterRoom").setRequestData(() -> {
// enterRoom
long roomId = 2;
return roomId;
});
// or
ofCommand(2).setTitle("enterRoom").setRequestData(() -> {
// enterRoom
return LongValue.of(2);
});
}
}
@ActionController(1)
public final class MyAction {
@ActionMethod(2)
public void enterRoom(long roomId) {
}
}
2025-01-08 - v21.23
https://github.com/iohao/ioGame/releases/tag/21.23
版本更新汇总
- perf(room): OperationHandler 增加 processVerify 方法,用于控制是否执行 process 方法,并弃用 verify 方法,由 processVerify 代替。
- perf(core): 优化 BoolValue,减少对象的创建
- perf(net-core): 增强 BrokerClientItem的invokeModuleMessage 和 invokeModuleCollectMessage 方法,返回值不会为 null,并增加错误信息的提示。
- fix(generate-code): action_method_void.txt
- perf(doc): GameCode 支持单参数构造方法
- perf(kit): #412
- perf(room): Player 增加 isRobot 方法,Room 增加区分真实玩家和机器人玩家的方法。
- refactor(proto): #414 枚举支持自定义值
- perf(room): room 增加 hasSeat、isRealPlayer 方法
- refactor(kit): RandomKit 增加 randomLong 方法
- refactor(core): 由于 FlowContext 方法名 setUserId 有歧义,弃用方法名。
- 弃用 FlowContext setUserId 方法,由 bindingUserId 代替。
- 弃用 FlowContext setUserIdAndGetResult 方法,由 bindingUserIdAndGetResult 代替。
- refactor(core): broadcastMe 增加提示:使用此方法前请先绑定 UserId,请参阅 FlowContext.bindingUserId。
- perf(proto): 并行生成 .proto 文件
- refactor(proto): ProtoGenerateFile 支持添加多个 proto 包
- refactor(kit): TaskKit 支持设置 Timer
- refactor(room): 弃用 OperationHandler verify 方法,由 processVerify 代替。
- refactor(room): 增强 Operation 相关,添加 OperationCode 接口支持。
2024
2024-12-02 - v21.22
https://github.com/iohao/ioGame/releases/tag/21.22
版本更新汇总
2024-11-15 - v21.20
https://github.com/iohao/ioGame/releases/tag/21.20
版本更新汇总
- feat(GenerateDoc): 添加 DocumentMethod 注解,Action 支持通过注释生成文档方法名称。
- 广播打印增强,通过 FlowContext 广播也可获取代码行。
- feat(GenerateCode): #328 添加代码生成 CsharpDocumentGenerate,可为 Unity、Godot 生成可交互代码。
2024-10-28 - v21.19
https://github.com/iohao/ioGame/releases/tag/21.19
版本更新汇总
- [core] FlowContext provides the setUserId method to simplify the login operation.
- [broker] Added RingElementSelector load balancing implementation and set it as default to replace RandomElementSelector
- [core] #386 Action supports constructor injection with parameters in Spring
- Simplify the implementation class of ActionParserListener related to ProtoDataCodec. and #386
- perf(i18n): #376 cmd check tips
- refactor(external): simplify and improve externalCache
2024-10-09 - v21.18
https://github.com/iohao/ioGame/releases/tag/21.18
版本更新汇总
2024-09-25 - v21.17
https://github.com/iohao/ioGame/releases/tag/21.17
版本更新汇总
- [core] 简化 TraceIdSupplier 默认实现
- [core] FlowContext 提供用户(玩家)所关联的用户线程执行器信息及虚拟线程执行器信息方法
2024-09-09 - v21.16
https://github.com/iohao/ioGame/releases/tag/21.16
版本更新汇总
2024-08-26 - v21.15
https://github.com/iohao/ioGame/releases/tag/21.15
版本更新汇总
2024-08-08 - v21.14
https://github.com/iohao/ioGame/releases/tag/21.14
版本更新汇总
- [code quality] 提升代码质量,see ioGame - Qodana Cloud
- [javadoc] 增强相关模块的 javadoc :业务框架、压测与模拟客户端请求、领域事件、Room
- [core] #346 业务框架 InOutManager 提供扩展点
- [core] #344 登录时,如果 FlowContext 存在 userId 就不请求游戏对外服
- [broker] fixed #342 非集群环境下,Broker 断开重启后,逻辑服没有将其重新加入到 BrokerClientManager 中所引发的 NPE。
2024-07-24 - v21.13
https://github.com/iohao/ioGame/releases/tag/21.13
版本更新汇总
- [external] #334 顶号操作 bug,有概率触发并发问题
- [core] FlowContext 新增 createRequestCollectExternalMessage 方法
- [javadoc] 源码 javadoc 增强
2024-07-08 - v21.12
https://github.com/iohao/ioGame/releases/tag/21.12
版本更新汇总
当前版本,为之后生成联调代码做了充分的准备。
2024-06-21 - v21.10
https://github.com/iohao/ioGame/releases/tag/21.10
版本更新汇总
- [core] #315 ResponseMessage 增加协议碎片便捷获取,简化跨服调用时的使用
- [core] ActionCommand 增加 containAnnotation、getAnnotation 方法,简化获取 action 相关注解信息的使用。
- [kit] [动态属性] 增加 ifNull 方法,如果动态属性值为 null,则执行给定的操作,否则不执行任何操作。执行给定操作后将得到一个返回值,该返回值会设置到动态属性中。
- [kit] TimeKit 增加 nowLocalDate 方法,可减少 LocalDate 对象的创建;优化 currentTimeMillis 方法的时间更新策略。同时,优化 nowLocalDate、currentTimeMillis 方法,不使用时将不会占用相关资源。
- [EventBus] 分布式事件总线增加 EventBusRunner 接口。EventBus 接口化,方便开发者自定义扩展。fix 订阅者使用自身所关联的 EventBus 处理相关事件。
2024-06-03 - v21.9
https://github.com/iohao/ioGame/releases/tag/21.9
版本更新汇总
- [core] #294 增加范围内的广播接口 RangeBroadcaster,业务参数支持基础类型(协议碎片)的简化使用
- [core-对接文档] #293 广播文档构建器支持对参数的单独描述
- [light-game-room] #297 模拟系统创建房间,RoomCreateContext 的使用
- [light-game-room] #298 模拟系统创建房间,GameFlowContext 的使用
- [core] #301 FlowContext 更新元信息后,需要立即生效(跨服调用时)
- [内置 kit] 开放 TaskListener 接口
- 为 SimpleRoom aggregationContext 属性提供默认值,移除 RoomCreateContext 接口的 getAggregationContext 方法,以免产生误导。
2024-05-19 - v21.8
https://github.com/iohao/ioGame/releases/tag/21.8
版本更新汇总
2024-05-11 - v21.7
https://github.com/iohao/ioGame/releases/tag/21.7
版本更新汇总
- [core] #112 protobuf 协议类添加检测,通过 action 构建时的监听器实现
- [core] #272 业务框架 - 提供 action 构建时的监听回调
- [core] #274 优化、提速 - 预生成 jprotobuf 协议类的代理,通过 action 构建时的监听器实现
- [broker] fix #277 、#280 偶现 BrokerClientType 为空
- [external] #271 游戏对外服 - 内置与可选 handler - log 相关的打印(触发异常、断开连接时)
- [room] 简化命名: AbstractPlayer --> Player、AbstractRoom --> Room
- 其他优化:预先生成游戏对外服统一协议的代理类及内置的协议碎片相关代理类,优化 action 参数解析
2024-04-23 - v21.6
https://github.com/iohao/ioGame/releases/tag/21.6
版本更新汇总
2024-04-16 - v21.5
https://github.com/iohao/ioGame/releases/tag/21.5
版本更新汇总
- 增强 ClassScanner 类
- 优化模拟客户端
- #258 文档生成,兼容 gradle 编译路径
- enhance jprotobuf,临时解决打包后不能在 linux java21 环境运行的问题,see https://github.com/jhunters/jprotobuf/issues/211
- 生成 .proto 时,在最后打印文件路径
- #255 关于 Proto 生成排除属性问题
2024-03-28 - v21.4
https://github.com/iohao/ioGame/releases/tag/21.4
版本更新汇总
- #253 CreateRoomInfo.createUserId int --> long
- 优化默认创建策略、ExecutorRegionKit,SimpleThreadExecutorRegion 默认使用全局单例,减少对象的创建。
- proto 文档生成时,默认指定为 StandardCharsets.UTF_8
- 玩家下线时,使用自身所关联的线程处理。
2024-03-11 - v21.3
https://github.com/iohao/ioGame/releases/tag/21.3
版本更新汇总
- #250 游戏对外服 - 自定义编解码 - WebSocketMicroBootstrapFlow
2024-03-11 - v21.1
https://github.com/iohao/ioGame/releases/tag/21.1
在 ioGame21 中,该版本做了数百项优化及史诗级增强。
- 文档方面。
- 线程管理域方面的开放与统一、减少线程池上下文切换。
- FlowContext 得到了史诗级的增强。
- 新增通讯方式 - 分布式事件总线。
- 游戏对外服方面增强。
- 全链路调用日志跟踪。
- 各逻辑服之间通信阻塞部分,改为使用虚拟线程,避免阻塞业务线程,从而使得框架的吞吐量得到了巨大的提升。