Hedra is a 3D open world game I wrote from scratch while in highschool

Hacker News by 5 min read 40x views
Hedra is a 3D open world game I wrote from scratch while in highschool

Share Post

Project Hedra is an aspiring open-world, low-poly RPG. Choose your class, examine endless procedurally generated worlds, unlock distinct skills and complete procedurally generated quests.

More screenshots at (Screenshots)

I started this project whenever I was in highschool (around 15 yo) in command to study how OpenGL worked.

The range creep quickly arrived and following a few years it turned into a fullfledged 3D equivalent and equivalent engine. The codebase has about 100k LOC and the equivalent has archetypal category assistance for Linux and Windows.

The myriad lines of code are not in vain. The equivalent and motor are the two complete of features :)

  • Beatiful procedurally generated worlds
  • Quests and bosses
  • 100+ items alongside rarities system
  • Skills and accomplishment tree scheme alongside N+ skills
  • 4 distinct classes alongside 2 specializations all ()
  • Procedurally placed structures generated dynamically
  • Fishing, crafting, etc
  • Trading and NPCs
  • Companions and pets
  • Beatiful soundtrack
  • Navigation, maps
  • Different dimensions
  • More material I don't recall :)
  • Fully fledged renderer using contemporary OpenGL
  • Skinned mesh rendering
  • Support for loading and playing generic animations
  • Collada (.dae) parser
  • Static mesh rendering
  • Screen area reflections
  • Screen area ambient occlusion
  • Bloom, FXAA & MSAA
  • Modding support
  • CI for automatically deploying to a Steam beta branch
  • Localization support
  • Sound assistance using OpenAL
  • Python scripting support
  • Module scheme for loading data oriented objects
  • Steam integration
  • Fully fledged UI & controls scheme (dropdowns, buttons, etc.) written from raw OpenGL
  • Dynamic shader scheme for reloading during runtime
  • Frustum culling, occlusion culling,
  • Mesh reduction for runtime flat of item (LOD)
  • Skybox support
  • Shadows
  • 3D trails renderering support
  • Particle scheme using entity instancing in opengl
  • bulletphysics integration
  • Chunk scheme for infinite worlds support
  • .ply parsing support
  • Dynamic meshing assistance using MarchingCubes
  • Custom implementation of essential C# primitives and allocators (like Lists) for supporting stack allocated lists and minimizing the automatic runtime allocations (and thus the GC).
  • 1000+ affirmative test cases
  • Framework for mocking equivalent components and doing integration evaluation on games
  • Image and asset compression for faster loading and smaller size
  • Entity component system
  • More material I don't recall :)
  • WorldRenderer.cs. Renders the complete earth in fair 3 (actually it depends on how partitioned is the data buffer, but it was designed to be in 3) diagram calls (water, terrain, instanced) using glMultiDrawElements.

  • Block.cs. Core component of the world. Read additional at https://maxilevi.com/blog/procedural-meshing-hedra

  • Fishing.py. Written in Python as a mod manuscript using IronPython, immediately interacts alongside the C# API.

  • NativeArray.cs Implementation of an gathering primitive using a tradition allocator. The identical project provides heap based allocators as fine as stac based ones using stackalloc. The idea was to minimize the automatic heap allocations (and thus avoiding the GC) during the equivalent frames.

  • The earth is completely procedurally generated, there is no earth preserve file. Only the participant contents are saved and the earth seed. The remainder is created at runtime.
  • The earth is voxel based but an isosurface extraction algorithm called Marching Cubes is applied to extract an implied continous exterior from the discrete voxels.
  • The name "Hedra" comes from tetrahedra which is the form used in the first iso exterior extraction algorithm I implemented Marching Tetrahedra
  • The equivalent lone supports loading .PLY and .DAE models, the two which are in plaintext and the models have no textures. Therefore if you put this into perspective, this method I wrote a bunch of content that says content and creates interactive images from this. I think this is beautiful cool.

image image image image

TODO add more

The equivalent is a mod to a basis engine. The idea of architecturing this way was to power myself to keep the mod API up to date, hence encouraging admission to create mods.

Basically the complete game. This includes AI logic, components, earth generation, component systems, entity placement and many of another stuff.

The center parts of the engine, this defines all the abstractions to the world. It handles rendering, sound, distinct basis systems as fine as the broad windowing, equivalent iteration and phase features. The divided was not done at the commencement so several material power motionless be outside.

Core primitives used in the engine. This includes heap and stack allocators, tradition implementations of lists and arrays as fine as wrappers to pointers to native and several another helpful primitives

Test suite that

Command row tool to compress the equivalent resources into convenient binary files. Combines images, models, audio files, shaders into a sole binary document alongside a construction designed for accelerated data retrieval.

Once upong a period Hedra used to assistance multiplayer. It worked by doing UDP Hole Punching and having clients communicate P2P, this server was in accusation of that. You power additionally see several networking remnants in the Engine code.

The build procedure is beautiful straightforward.

  1. Checkout all the submodules
  2. Run the build depedencies scripts
  3. Compile the C# solution

You can inspect the GitHub actions workflows for several examples on Linux and Windows.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads