feat(game): 添加基础游戏引擎和渲染模块
- 新增游戏引擎核心模块,包括初始化和运行逻辑 - 实现基本的渲染功能,支持控制台输出 - 添加物理引擎基础,包括碰撞检测 - 集成日志系统,用于调试和信息输出 - 创建窗口和输入管理模块
This commit is contained in:
27
game_engine/physics/ge_collison.h
Normal file
27
game_engine/physics/ge_collison.h
Normal 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);
|
||||
Reference in New Issue
Block a user