project-hedra README

The project's README from github.com/maxilevi/project-hedra. As one markdown file: README.md.

Project Hedra

All code at the pre-ai tag and in its earlier history was written before AI-assisted development.

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)

Timeline/Context

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.

Features

The million lines of code are not in vain. The game and engine are both full of features :)

Game Features

Engine Features

Interesting bits

Interesting facts

Screenshots

image image image image

TODO add more

Code Structure

Overall Architecture

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.

Hedra

Basically the entire game. This includes AI logic, components, world generation, module systems, object placement and lots of other stuff.

Hedra.Engine

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.

Framework

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

HedraTests

Test suite that

Asset Builder

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.

Server

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.

How to build

The build process is pretty straightforward.

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

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

project-hedra (maxilevi/project-hedra)

entity-component-system
Searching Database…

What is this?Project Hedra is a 3D open-world, low-poly action RPG (and the custom game engine behind it) that the author wrote from scratch starting in high school, with procedurally generated worlds, quests, classes, skills and a full voxel renderer. The whole codebase is around 100k lines of C#.
Is this just a playable game or also a reusable game engine?It is architected as a game that is literally a mod on top of a separate base engine ('Hedra.Engine'), so engine code (rendering, sound, windowing) is split from game-specific code (AI, world generation, items), but the engine was purpose-built for this game rather than published as a standalone SDK.
How do I build and run it?There is no installer or binary release; you build from source by checking out all git submodules, running the build dependency scripts, and then compiling the C# solution. The GitHub Actions workflows show working build steps for both Linux and Windows.
What do I need installed to compile it?You need the .NET/C# toolchain to compile the solution, plus the project's git submodules (which include its Bullet Physics integration) and whatever third-party libraries the build dependency scripts pull in.
Any catches before I try this?There's no ready-made release, so you must build it yourself through submodules and scripts. Multiplayer support (UDP hole-punching P2P) existed at one point but appears to have been dropped, with only networking remnants left in the engine, and the screenshots section is marked as a TODO.
Does it run on Windows and Linux?Yes, the game has first-class support for both Linux and Windows; macOS is not mentioned.
Why is the project called 'Hedra'?The name comes from 'tetrahedra', the shape used in the original isosurface extraction algorithm the author implemented (Marching Tetrahedra) before switching to Marching Cubes.
If there's no world save file, how does the game remember the world?The world is fully procedurally generated at runtime from a seed; only the player's data and that seed are saved, not the terrain itself, so the whole map is rebuilt deterministically each time.
What's the coolest technical detail in the code?WorldRenderer.cs renders the entire voxel world in roughly 3 draw calls (water, terrain, instanced objects) using glMultiDrawElements, and voxel chunks are converted into smooth surfaces at runtime with the Marching Cubes algorithm.
Can I write mods for the game?Yes, the engine has a module system and modding support, and mods can be scripted in Python via IronPython that calls directly into the C# API, as seen in the bundled Fishing.py script.
Creator
maxilevi
Size
112.5 MB
Stars
191
Updated
CommitOct 22
Age
7y
Commits · 90 Days