The ioGame C# SDK provides a simple wrapper for interaction between the Netty, WebSocket, Protobuf, C#, and ioGame game servers.
The files such as action, broadcast, error codes
, etc., in the ./Assets/Scripts/Gen/Code
directory are generated by ioGame. Code generation can significantly reduce the workload for client developers.
C# SDK + Code Generation = a variety of advantages
Advantages of SDK Code Generation
- Helps client-side developers reduce significant workload by eliminating the need to write a large amount of template code.
- Clear and semantically precise. The generated interaction code clearly defines parameter types and return types.
- Ensures parameter type safety and clarity in interface methods, effectively avoiding security risks and reducing basic errors during integration.
- Reduces communication costs between the server and client during integration; the code serves as documentation. The generated integration code includes documentation and usage examples, and the examples on the methods will guide you on how to use them, making it zero-learning-cost even for beginners.
- Helps client-side developers abstract away the interaction with the server, allowing them to focus more on the core business logic.
- Reduces the cognitive load during integration. The code is simple to use, similar to local method calls.
- Abandons the traditional protocol-based approach in favor of an interface-method-based integration approach.
see https://github.com/iohao/ioGameExamples/tree/main/SdkExample
Run SdkApplication.java
Unity Version: 6000.x
see compile-proto.sh
Remember, you don't need to write any interaction files (actions, broadcasts, error codes
). These are generated by the ioGame server. You only need to focus on the actual business logic.