赫德拉计划(Project Hedra)是一个雄心勃勃的开放世界,低波力RPG. 选择你的班级,探索无尽的程序生成世界,解锁不同的技能,完成程序生成的追求。
更多截图( 屏幕截图)
以了解OpenGL是如何工作的。
瞄准镜蠕动迅速到达,几年后它变成了一个完整的3D游戏和游戏引擎。 代码库拥有约100k LOC,游戏拥有首级支持Linux和Windows.
百万行的密码不是徒劳的。 游戏和引擎都充满了特征:)
- 在程序上创造的美好世界
- 查询和老板
- 100多个有稀释系统的物品
- 具有N+技能的技能和技能树系统
- 4个不同班级,各2个专业()
- 按程序设置的结构动态生成
- 捕鱼、工艺等
- 贸易和国家生产者
- 同伴和宠物
- 优雅的音轨
- 导航、地图
- 不同层面
- 更多我不记得的东西:)
- 使用现代 OpenGL 的全版渲染器
- 皮肤网状渲染
- 支持加载和播放通用动画
- 科拉达(.dae)
- 静态网状渲染
- 屏幕空间反射
- 屏幕空间环境隔离
- Bloom, FXAA & MSAA 公司
- 供货支助
- 自动部署到Steam β分支的CI
- 本地化支助
- 使用 OpenAL 声音支持
- Python 脚本支持
- 用于装载数据对象的模块系统
- 蒸汽集成
- 从原始的 OpenGL 中写入完整的 UI 控制系统( 滴下、 按钮等)
- 运行期间重新装入的动态遮蔽系统
- 挤压、挤压、挤压
- 详细运行时间的网格简化(LOD)
- 天盒支持
- 阴影
- 立体跟踪支持
- 利用物体在打开gl中沉淀的粒子系统
- 弹物理学一体化
- 无限世界支持的春克系统
- 解析支持
- 使用 MarchingCube 的动态计量支持
- 自定义执行基本C#原始数据和分配器(如列表),用于支持堆栈分配列表,并尽量减少自动运行时间分配(从而减少GC)。
- 1 000多个试验病例
- 模拟游戏组件和在游戏中进行集成测试的框架
- 图像和资产压缩,以更快地加载和缩小尺寸
- 实体构成部分系统
- 更多我不记得的东西:)
- WorldRender.cs. - 对 - WorldRender. 在仅3中渲染整个世界(实际上这取决于数据缓冲是如何分割的,但是它被设计为在3中)使用glMultiDrawElements的绘图调用(水,地形,实例).
- Block.cs(英语:Block.cs. 世界的核心组成部分。 更多信息:https://maxilevi.com/blog/procedular-meshing-hedra
- 钓鱼。 在Python中写成使用IronPython的mod脚本,直接与C#API互动。
- 本地Array.cs 使用自定义分配器执行阵列原始。 同一项目提供堆积式分配器以及使用堆积器的堆积式分配器。 想法是在游戏帧中尽量减少自动堆积分配(从而避免GC).
- 这个世界是完全程序生成的,没有世界保存文件。 只有玩家内容被保存和世界种子。 其余在运行时创建。
- 世界以阴道为主,但采用了异位提取算法,称为“3月立方体”,从离散的阴道提取一个隐含的平面。
- "Hedra"这个名字来源于四面体,是原始的异色表面提取算法中使用的形状。
- 游戏只支持加载.PLY 和.DAE 两种模式,两种模式都是在简写中,而且模型没有纹理。 因此,如果你把这一点放在一个角度上,这意味着我写了一堆文本来读取文本,并从中创建交互式图像。 我觉得这很酷
TODO 添加更多内容
游戏为mod至基引擎。 设计这种方式的想法是强迫自己保持Mod API的更新,因此鼓励访问来制作mods.
基本上整个游戏。 这包括AI逻辑,组件,世界生成,模块系统,对象放置和其他很多东西。
引擎的核心部分,这定义了所有对世界的抽象。 它处理渲染,声音,不同的基础系统以及一般的窗口,游戏循环和平台功能。 一开始没有分钱所以有些东西可能还在外面
发动机中使用的核心原始物。 这包括堆栈和堆栈分配器、列表和阵列的自定义执行,以及指向原生和其他一些有用的原始物的包装
测试套件
命令行工具将游戏资产压缩为方便的二进制文件。 将图像,模型,声音文件,荫影组合成一个单一的二进制文件,其结构为快速数据检索设计。
曾经赫德拉曾经支持过多人游戏。 它通过做UDP Hole Punching和让客户端沟通P2P来工作,这个服务器负责这个。 你可能会看到引擎代码中的一些网络残余。
建设过程相当简单。
- 检查所有的子模块
- 运行构建的节奏脚本
- 汇编 C# 解决方案
您可以检查 GitHub 动作工作流程,以查看 Linux 和 Windows 上的一些示例。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Project Hedra is an ambitious open-world, low-poly RPG. Choose your class, explore endless procedurally generated worlds, unlock different skills and complete procedurally generated quests.
More screenshots at (Screenshots)
I started this project when I was in highschool (around 15 yo) in order to learn how OpenGL worked.
The scope creep quickly arrived and after a few years it turned into a fullfledged 3D game and game engine. The codebase has around 100k LOC and the game has first class support for Linux and Windows.
The million lines of code are not in vain. The game and engine are both full of features :)
- Beatiful procedurally generated worlds
- Quests and bosses
- 100+ items with rarities system
- Skills and skill tree system with N+ skills
- 4 different classes with 2 specializations each ()
- Procedurally placed structures generated dynamically
- Fishing, crafting, etc
- Trading and NPCs
- Companions and pets
- Beatiful soundtrack
- Navigation, maps
- Different dimensions
- More stuff I don't recall :)
- Fully fledged renderer using modern OpenGL
- Skinned mesh rendering
- Support for loading and playing generic animations
- Collada (.dae) parser
- Static mesh rendering
- Screen space reflections
- Screen space ambient occlusion
- Bloom, FXAA & MSAA
- Modding support
- CI for automatically deploying to a Steam beta branch
- Localization support
- Sound support using OpenAL
- Python scripting support
- Module system for loading data oriented objects
- Steam integration
- Fully fledged UI & controls system (dropdowns, buttons, etc.) written from raw OpenGL
- Dynamic shader system for reloading during runtime
- Frustum culling, occlusion culling,
- Mesh simplification for runtime level of detail (LOD)
- Skybox support
- Shadows
- 3D trails renderering support
- Particle system using object instancing in opengl
- bulletphysics integration
- Chunk system for infinite worlds support
- .ply parsing support
- Dynamic meshing support using MarchingCubes
- Custom implementation of basic C# primitives and allocators (like Lists) for supporting stack allocated lists and minimizing the automatic runtime allocations (and thus the GC).
- 1000+ plus test cases
- Framework for mocking game components and doing integration testing on games
- Image and asset compression for faster loading and smaller size
- Entity component system
- More stuff I don't recall :)
- WorldRenderer.cs. Renders the entire world in just 3 (actually it depends on how partitioned is the data buffer, but it was designed to be in 3) draw calls (water, terrain, instanced) using glMultiDrawElements.
- Block.cs. Core component of the world. Read more at https://maxilevi.com/blog/procedural-meshing-hedra
- Fishing.py. Written in Python as a mod script using IronPython, directly interacts with the C# API.
- NativeArray.cs Implementation of an array primitive using a custom allocator. The same project provides heap based allocators as well as stac based ones using stackalloc. The idea was to minimize the automatic heap allocations (and thus avoiding the GC) during the game frames.
- The world is fully procedurally generated, there is no world save file. Only the player contents are saved and the world seed. The rest is created at runtime.
- The world is voxel based but an isosurface extraction algorithm called Marching Cubes is applied to extract an implicit continous surface from the discrete voxels.
- The name "Hedra" comes from tetrahedra which is the shape used in the original iso surface extraction algorithm I implemented Marching Tetrahedra
- The game only supports loading .PLY and .DAE models, both which are in plaintext and the models have no textures. Therefore if you put this into perspective, this means I wrote a bunch of text that reads text and creates interactive images from this. I think this is pretty cool.
TODO add more
The game is a mod to a base engine. The idea of architecturing this way was to force myself to maintain the mod API up to date, therefore encouraging access to make mods.
Basically the entire game. This includes AI logic, components, world generation, module systems, object placement and lots of other stuff.
The core parts of the engine, this defines all the abstractions to the world. It handles rendering, sound, different base systems as well as the general windowing, game loop and platform features. The split was not done at the start so some stuff might still be outside.
Core primitives used in the engine. This includes heap and stack allocators, custom implementations of lists and arrays as well as wrappers to pointers to native and some other useful primitives
Test suite that
Command line tool to compress the game assets into convenient binary files. Combines images, models, sound files, shaders into a single binary file with a structure designed for fast data retrieval.
Once upong a time Hedra used to support multiplayer. It worked by doing UDP Hole Punching and having clients communicate P2P, this server was in charge of that. You might also see some networking remnants in the Engine code.
The build process is pretty straightforward.
- Checkout all the submodules
- Run the build depedencies scripts
- Compile the C# solution
You can check the GitHub actions workflows for some examples on Linux and Windows.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.