maxilevi/project-hedra at pre-ai · GitHub



Project Hedra is an bold open-world, low-poly RPG. Choose your class, discover countless procedurally generated worlds, unlock completely different abilities and full procedurally generated quests.

More screenshots at (Screenshots)

I began this challenge after I was in highschool (round 15 yo) with a view to find out how OpenGL labored.

The scope creep rapidly arrived and after a number of years it was a fullfledged 3D recreation and recreation engine. The codebase has round 100k LOC and the sport has firstclass help for Linux and Windows.

The million traces of code usually are not in useless. The recreation and engine are each stuffed with options 🙂

  • Beatiful procedurally generated worlds
  • Quests and executives
  • 100+ gadgets with rarities system
  • Skills and ability tree system with N+ abilities
  • 4 completely different courses with 2 specializations every ()
  • Procedurally positioned buildings generated dynamically
  • Fishing, crafting, and many others
  • Trading and NPCs
  • Companions and pets
  • Beatiful soundtrack
  • Navigation, maps
  • Different dimensions
  • More stuff I do not recall 🙂
  • Fully fledged renderer utilizing fashionable OpenGL
  • Skinned mesh rendering
  • Support for loading and taking part in generic animations
  • Collada (.dae) parser
  • Static mesh rendering
  • Screen house reflections
  • Screen house ambient occlusion
  • Bloom, FXAA & MSAA
  • Modding help
  • CI for mechanically deploying to a Steam beta department
  • Localization help
  • Sound help utilizing OpenAL
  • Python scripting help
  • Module system for loading knowledge oriented objects
  • Steam integration
  • Fully fledged UI & controls system (dropdowns, buttons, and many others.) written from uncooked OpenGL
  • Dynamic shader system for reloading throughout runtime
  • Frustum culling, occlusion culling,
  • Mesh simplification for runtime degree of element (LOD)
  • Skybox help
  • Shadows
  • 3D trails renderering help
  • Particle system utilizing object instancing in opengl
  • bulletphysics integration
  • Chunk system for infinite worlds help
  • .ply parsing help
  • Dynamic meshing help utilizing MarchingCubes
  • Custom implementation of fundamental C# primitives and allocators (like Lists) for supporting stack allotted lists and minimizing the automated runtime allocations (and thus the GC).
  • 1000+ plus check instances
  • Framework for mocking recreation parts and doing integration testing on video games
  • Image and asset compression for sooner loading and smaller dimension
  • Entity part system
  • More stuff I do not recall 🙂
  • WorldRenderer.cs. Renders all the global community in simply 3 (truly it is dependent upon how partitioned is the info buffer, however it was designed to be in 3) draw calls (water, terrain, instanced) utilizing glMultiDrawElements.

  • Block.cs. Core part of the global community. Read extra at https://maxilevi.com/blog/procedural-meshing-hedra

  • Fishing.py. Written in Python as a mod script utilizing IronPython, immediately interacts with the C# API.

  • NativeArray.cs Implementation of an array primitive utilizing a customized allocator. The similar challenge offers heap primarily based allocators in addition to stac primarily based ones utilizing stackalloc. The thought was to attenuate the automated heap allocations (and thus avoiding the GC) throughout the recreation frames.

  • The global community is totally procedurally generated, there is no such thing as a global community save file. Only the participant contents are saved and the global community seed. The relaxation is created at runtime.
  • The global community is voxel primarily based however an isosurface extraction algorithm known as Marching Cubes is utilized to extract an implicit continous floor from the discrete voxels.
  • The identify “Hedra” comes from tetrahedra which is the form used within the unique iso floor extraction algorithm I carried out Marching Tetrahedra
  • The recreation solely helps loading .PLY and .DAE fashions, each that are in plaintext and the fashions haven’t any textures. Therefore when you put this into perspective, this implies I wrote a bunch of textual content that reads textual content and creates interactive photos from this. I feel that is fairly cool.

image
image
image
image

TODO add extra

The recreation is a mod to a base engine. The thought of architecturing this manner was to pressure myself to take care of the mod API updated, subsequently encouraging entry to make mods.

Basically all the recreation. This consists of AI logic, parts, global community technology, module programs, object placement and many different stuff.

The core components of the engine, this defines all of the abstractions to the global community. It handles rendering, sound, completely different base programs in addition to the overall windowing, recreation loop and platform options. The break up was not finished firstly so some stuff may nonetheless be exterior.

Core primitives used within the engine. This consists of heap and stack allocators, customized implementations of lists and arrays in addition to wrappers to tips that could native and another helpful primitives

Test suite that

Command line device to compress the sport belongings into handy binary recordsdata. Combines photos, fashions, sound recordsdata, shaders right into a single binary file with a construction designed for quick knowledge retrieval.

Once upong a time Hedra used to help multiplayer. It labored by doing UDP Hole Punching and having shoppers talk P2P, this server was in control of that. You may additionally see some networking remnants within the Engine code.

The construct course of is fairly simple.

  1. Checkout all of the submodules
  2. Run the construct depedencies scripts
  3. Compile the C# resolution

You can verify the GitHub actions workflows for some examples on Linux and Windows.



Source link