Godot 源码结构

4.5.1 2025-10-15

Godot 是一款 C++ 编写的开源游戏引擎,支持 Windows, MacOS, Linux, Android, Web 平台。

官网 https://godotengine.org/

仓库 https://github.com/godotengine/godot

目录结构

  • code 核心代码,object基类,map, list集合,string字符串,variant变体类,等核心基础类
  • doc 类文档,国际化po文件
  • drivers 驱动,directX3D, OpenGLES,sdl等等
  • editor 编辑器,Godot在自己的引擎基础上开发的编辑器
  • main 程序入口
  • misc 其他工具
  • modules 功能模块,比如physics物理引擎,gdscript脚本,等独立功能模块
  • platform 平台相关代码,Android, ios, LinuxBSD, MacOS, VisionOS, Web, Windows
  • scene 游戏相关的代码,因为Godot把每个游戏中的逻辑单元称为场景(scene)
  • servers 后台服务,比如physics物理服务,rendering渲染服务
  • tests 测试
  • thirdparty 第三方依赖,比如freetype字体之类

架构图

https://docs.godotengine.org/zh-cn/4.5/engine_details/architecture/godot_architecture_diagram.html

编译

https://docs.godotengine.org/zh-cn/4.5/engine_details/development/compiling/index.html