Skip to content

Commit

Permalink
🐳 21.22
Browse files Browse the repository at this point in the history
  • Loading branch information
iohao committed Dec 2, 2024
1 parent 4c38501 commit afd7da9
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 73 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| SpringBootExample | [ioGame 综合示例 (yuque.com)](https://www.yuque.com/iohao/game/ruaqza) |
| ioGameWeb2Game | [web 转游戏 - 示例理解篇 (yuque.com)](https://www.yuque.com/iohao/game/gpzmc8vadn4vl70z) |
| fxglSimpleGame | [fxgl-ioGame-移动同步 (yuque.com)](https://www.yuque.com/iohao/game/bolt) |
| SdkExample | [代码生成(yuque.com)](https://www.yuque.com/iohao/game/irth38),该项目是与 ioGame SDK(C# Sdk、Ts Sdk) 相关的联调演示,服务器提供了 `action、广播、错误码` 等相关内容用于交互演示。 |



Expand All @@ -17,14 +18,3 @@
[ioGame 网络游戏服务器框架文档 (yuque.com)](https://www.yuque.com/iohao/game)



|| 当前最新版本 | 描述 |
| --------- | ------------------------------------------------------------ | --------------- |
| ioGame | ![img](https://img.shields.io/maven-central/v/com.iohao.game/ioGame?color=bule&label=ioGame&logo=ioGame) | ioGame |
| ioGameSDK | ![img](https://img.shields.io/maven-central/v/com.iohao.game.sdk/java-sdk?color=bule&label=ioGameSDK&logo=ioGameSDK) | ioGame java SDK |





其他
17 changes: 10 additions & 7 deletions SdkExample/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,16 @@ Ts SDK 除了能用在游戏引擎外,还能用在各种现代的前端框架

以下这些 demo 已经与本项目调通,前端代码`action、广播、错误码` 等,由 ioGame 生成。前端开发者在通信的交互上本地方法调用一般丝滑,让前端开发者将更多的精力放在真正的业务,而不是编写这些模板式的交互代码上。

| Github | 语言 | 描述 |
| ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| [ioGameSdkCsharpExampleGodot](https://github.com/iohao/ioGameSdkCsharpExampleGodot) | C# |[Godot](https://godotengine.org/) 互通的一个示例。<br />Godot、Protobuf、Netty、ioGame、C#、Csharp、WebSocket |
| [ioGameSdkCsharpExampleUnity](https://github.com/iohao/ioGameSdkCsharpExampleUnity) | C# |[Unity](https://unity.com/) 互通的一个示例。<br />Unity、Protobuf、Netty、ioGame、C#、Csharp、WebSocket |
| [ioGameSdkTsExampleCocos](https://github.com/iohao/ioGameSdkTsExampleCocos) | Ts |[Cocos Creator](https://www.cocos.com/) 互通的一个示例。<br />CocosCreator、Protobuf、Netty、ioGame、TypeScript、WebSocket |
| [ioGameSdkTsExampleVue](https://github.com/iohao/ioGameSdkTsExampleVue) | Ts |[Vue](https://github.com/vuejs/) 互通的一个示例。<br />Vue、Protobuf、Netty、ioGame、TypeScript、webSocket |
| [ioGameSdkTsExampleHtml](https://github.com/iohao/ioGameSdkTsExampleHtml) | Ts |[webpack](https://github.com/webpack/webpack) 互通的一个示例。<br />(webpack: html + ts)、Protobuf、Netty、ioGame、TypeScript、WebSocket |
| Github | 描述 |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [ioGameSdkC#ExampleGodot](https://github.com/iohao/ioGameSdkCsharpExampleGodot) |[Godot](https://godotengine.org/) 互通的一个示例。 Godot、Protobuf、Netty、ioGame、C#、Csharp、WebSocket |
| [ioGameSdkC#ExampleUnity](https://github.com/iohao/ioGameSdkCsharpExampleUnity) |[Unity](https://unity.com/) 互通的一个示例。 Unity、Protobuf、Netty、ioGame、C#、Csharp、WebSocket |
| [ioGameSdkTsExampleCocos](https://github.com/iohao/ioGameSdkTsExampleCocos) |[Cocos Creator](https://www.cocos.com/) 互通的一个示例。 CocosCreator、Protobuf、Netty、ioGame、TypeScript、WebSocket |
| [ioGameSdkTsExampleVue](https://github.com/iohao/ioGameSdkTsExampleVue) |[Vue](https://github.com/vuejs/) 互通的一个示例。 Vue、Protobuf、Netty、ioGame、TypeScript、WebSocket |
| [ioGameSdkTsExampleAngular](https://github.com/iohao/ioGameSdkTsExampleAngular) |[Angular](https://github.com/angular/angular) 互通的一个示例。 Angular、Protobuf、Netty、ioGame、TypeScript、WebSocket |
| [ioGameSdkTsExampleHtml](https://github.com/iohao/ioGameSdkTsExampleHtml) |[webpack](https://github.com/webpack/webpack) 互通的一个示例。 (webpack: html + ts)、Protobuf、Netty、ioGame、TypeScript、WebSocket |

---



Expand Down
9 changes: 1 addition & 8 deletions SdkExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>1.0-SNAPSHOT</version>
<properties>
<!-- 项目版本 -->
<ioGame.version>21.20</ioGame.version>
<ioGame.version>21.22</ioGame.version>

<!-- jdk 版本 -->
<java.version>21</java.version>
Expand Down Expand Up @@ -78,13 +78,6 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<!-- generate sdk code -->
<!-- <dependency>-->
<!-- <groupId>com.iohao.game</groupId>-->
<!-- <artifactId>generate-sdk</artifactId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- </dependency>-->
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static void extractedAccess() {
accessAuthenticationHook.setVerifyIdentity(true);
// Ignore cmd: These ignored routes can be accessed without the need to loginVerify
accessAuthenticationHook.addIgnoreAuthCmd(SdkCmd.cmd, SdkCmd.loginVerify);
accessAuthenticationHook.addIgnoreAuthCmd(SdkCmd.cmd);

/*
* Notice:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
import com.iohao.game.widget.light.protobuf.ProtoFileMerge;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.FieldDefaults;

Expand All @@ -31,6 +33,8 @@
* @date 2024-11-01
*/
@ToString
@Setter
@Getter
@ProtobufClass
@FieldDefaults(level = AccessLevel.PUBLIC)
@ProtoFileMerge(fileName = SdkProtoFile.fileName, filePackage = SdkProtoFile.filePackage)
Expand Down
102 changes: 59 additions & 43 deletions SdkExample/src/test/java/com/iohao/example/sdk/GenerateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.iohao.game.action.skeleton.core.doc.CsharpDocumentGenerate;
import com.iohao.game.action.skeleton.core.doc.DocumentAccessAuthentication;
import com.iohao.game.action.skeleton.core.doc.IoGameDocumentHelper;
import com.iohao.game.action.skeleton.core.doc.TypeScriptDocumentGenerate;
import com.iohao.game.bolt.broker.client.BrokerClientStartup;
import com.iohao.game.external.core.config.ExternalGlobalConfig;
import com.iohao.game.widget.light.protobuf.kit.GenerateFileKit;
Expand Down Expand Up @@ -60,11 +61,12 @@ public static void main(String[] args) {

// About generating TypeScript code
// generateCodeVue();
// generateCodeAngular();
// generateCodeHtml();
// generateCocosCreator();
generateCocosCreator();

// About generating C# code
generateCodeCsharpGodot();
// generateCodeCsharpGodot();
// generateCodeCsharpUnity();

// Added an enumeration error code class to generate error code related information
Expand Down Expand Up @@ -118,45 +120,59 @@ private static void generateCodeCsharpGodot() {
IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}

// private static void generateCodeVue() {
// var documentGenerate = new TypeScriptDocumentGenerate();
//
// // 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// // By default, it will be generated in the target/code directory
// String path = rootPath + "ioGameSdkTsExampleVue/src/assets/gen/code";
// documentGenerate.setPath(path);
//
// // Your .proto path: Set the import path of common_pb in Vue.
// documentGenerate.setProtoImportPath("../common_pb");
//
// IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
// }
//
// private static void generateCodeHtml() {
// var documentGenerate = new TypeScriptDocumentGenerate();
//
// // 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// // By default, it will be generated in the target/code directory
// String path = rootPath + "ioGameSdkTsExampleHtml/src/assets/gen/code";
// documentGenerate.setPath(path);
//
// // Your .proto path: Set the import path of common_pb in Vue.
// documentGenerate.setProtoImportPath("../common_pb");
//
// IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
// }
//
// private static void generateCocosCreator() {
// var documentGenerate = new TypeScriptDocumentGenerate();
//
// // 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// // By default, it will be generated in the target/code directory
// String path = rootPath + "ioGameSdkTsExampleCocos/assets/scripts/gen/code";
// documentGenerate.setPath(path);
//
// // Your .proto path: Set the import path of common_pb in CocosCreator
// documentGenerate.setProtoImportPath("db://assets/scripts/gen/common_pb");
//
// IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
// }
private static void generateCodeVue() {
var documentGenerate = new TypeScriptDocumentGenerate();

// 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// By default, it will be generated in the target/code directory
String path = rootPath + "ioGameSdkTsExampleVue/src/assets/gen/code";
documentGenerate.setPath(path);

// Your .proto path: Set the import path of common_pb in Vue.
documentGenerate.setProtoImportPath("../common_pb");

IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}

private static void generateCodeHtml() {
var documentGenerate = new TypeScriptDocumentGenerate();

// 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// By default, it will be generated in the target/code directory
String path = rootPath + "ioGameSdkTsExampleHtml/src/assets/gen/code";
documentGenerate.setPath(path);

// Your .proto path: Set the import path of common_pb in Vue.
documentGenerate.setProtoImportPath("../common_pb");

IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}

private static void generateCocosCreator() {
var documentGenerate = new TypeScriptDocumentGenerate();

// 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// By default, it will be generated in the target/code directory
String path = rootPath + "ioGameSdkTsExampleCocos/assets/scripts/gen/code";
documentGenerate.setPath(path);

// Your .proto path: Set the import path of common_pb in CocosCreator
documentGenerate.setProtoImportPath("db://assets/scripts/gen/common_pb");

IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}

private static void generateCodeAngular() {
var documentGenerate = new TypeScriptDocumentGenerate();

// 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中
// By default, it will be generated in the target/code directory
String path = rootPath + "ioGameSdkTsExampleAngular/src/assets/gen/code";
documentGenerate.setPath(path);

// Your .proto path: Set the import path of common_pb in Vue.
documentGenerate.setProtoImportPath("../common_pb");

IoGameDocumentHelper.addDocumentGenerate(documentGenerate);
}
}
2 changes: 1 addition & 1 deletion SimpleExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!--统一管理版本 的一个父 pom-->
<properties>
<!-- 项目版本 -->
<ioGame.version>21.20</ioGame.version>
<ioGame.version>21.22</ioGame.version>
<!-- https://mvnrepository.com/artifact/com.iohao.game.sdk/java-sdk -->
<ioGameSDK.version>21.2</ioGameSDK.version>
<!-- jdk 版本 -->
Expand Down
2 changes: 1 addition & 1 deletion SpringBootExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 将xxx 替换成最新的 ioGame 版本 -->
<ioGame.version>21.20</ioGame.version>
<ioGame.version>21.22</ioGame.version>

<lombok.version>1.18.34</lombok.version>
<!-- Java 实体映射工具 https://mvnrepository.com/artifact/org.mapstruct/mapstruct https://mapstruct.org/documentation/reference-guide/ -->
Expand Down
2 changes: 1 addition & 1 deletion fxglSimpleGame/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<logback.version>1.4.14</logback.version>

<lombok.version>1.18.34</lombok.version>
<ioGame.version>21.20</ioGame.version>
<ioGame.version>21.22</ioGame.version>
<!-- https://mvnrepository.com/artifact/com.iohao.game.sdk/java-sdk -->
<ioGameSDK.version>21.2</ioGameSDK.version>

Expand Down
2 changes: 1 addition & 1 deletion ioGameWeb2Game/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<description>ioGame web2game example</description>
<properties>
<java.version>21</java.version>
<ioGame.version>21.20</ioGame.version>
<ioGame.version>21.22</ioGame.version>
</properties>
<dependencies>
<dependency>
Expand Down

0 comments on commit afd7da9

Please sign in to comment.