feat(game): 添加基础游戏引擎和渲染模块

- 新增游戏引擎核心模块,包括初始化和运行逻辑
- 实现基本的渲染功能,支持控制台输出
- 添加物理引擎基础,包括碰撞检测
- 集成日志系统,用于调试和信息输出
- 创建窗口和输入管理模块
This commit is contained in:
ZZY
2025-06-24 02:16:01 +08:00
commit 5ce660e3a6
30 changed files with 2056 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
// // 在 ge_common.h 中定义通用碰撞类型
// typedef enum ge_collision_type {
// GE_COLLISION_TYPE_BOX, // 实体间碰撞
// GE_COLLISION_TYPE_TILEMAP // 实体与瓦片地图碰撞
// } ge_collision_type_t;
// // 通用碰撞数据结构
// typedef struct {
// ge_collision_type_t type;
// void* entityA; // 主要实体(通常是被检测的实体)
// void* entityB; // 对于BOX碰撞这是另一个实体对于TILEMAP这是瓦片地图
// ge_vector2i_t collision_point;
// union {
// struct {
// int tile_x;
// int tile_y;
// } tilemap_data; // 瓦片地图碰撞特有数据
// struct {
// // 可以添加实体间碰撞特有数据
// } box_data;
// } specific;
// } ge_collision_event_t;
// // 碰撞回调函数类型
// typedef void (*ge_collision_callback_t)(ge_collision_event_t* event);