Skip to content

Latest commit

 

History

History
124 lines (95 loc) · 5.15 KB

README.md

File metadata and controls

124 lines (95 loc) · 5.15 KB

Korpi

client build client tests documentation Discord GitHub last commit (branch)

Cave generation screenshot

Korpi is a voxel* engine written in C#, that uses OpenGL as the rendering backend.

This project is still searching for its own identity :)

I also post development updates to YouTube every once in a while: https://youtube.com/@devlogs

Table of Contents

Project goals

The long-term goal of this project is to eventually develop into its own game, with player-hosted servers and official modding support.

Personal goals

This is my first-ever custom game engine. I haven't dabbled with OpenGL before, nor have I worked on a proper game project without an engine or a framework.

My main goal with this project is to get familiar with OpenGL and the ins and outs of engine/tool development.

Project status

A non-exhaustive list of currently implemented features. Updated every once in a while.

The implementation details of the listed features can be found in the technical documentation.

  • Rendering pipeline
    • Multithreaded chunk meshing
    • Ambient occlusion
    • Frustum culling
    • Internal face culling
    • Weighted-Blended Order-Independent Transparency
    • Block texturing (animated texture support!)
    • Block face shading
    • ImGui integration
    • Dynamic skybox
  • Data management
    • Palette-based block compression
    • World Chunking
      • Multithreaded chunk generation
      • Cubic chunks (UPDATE)
      • Chunk loading/unloading (world streaming)
      • Seamless chunk borders
    • Mod support
      • Adding new blocks/textures with YAML
  • Threading
    • Custom priority-based thread pool
    • Custom job system
    • Multithreaded world generation (<1ms for 32^3 chunk)
    • Multithreaded chunk meshing (<1ms for 32^3 chunk)
  • Physics
    • Raycasting
  • World generation
    • Simplex noise-based terrain heightmap generation
    • Cave generation
  • Gameplay
    • ECS-based player character, with free cam mode
  • Misc
    • JSON-based settings/config system
    • Shader hot reloading
    • Log4net integration
    • Self-profiling with DotTrace
    • Custom ImGui-based profiler
    • Autogenerated API documentation
    • Automated testing
    • Debug drawing library

Documentation

Technical documentation and additional information about the implementation of Korpi can be found in the official documentation.

The full API Documentation is available on the official API documentation or inline from your favourite IDE.

Cloning the source

To clone the source of Korpi for development purposes, you just need to clone the git repo and open Korpi.sln in your favourite IDE.

git clone https://github.com/japsuu/Korpi   # Download source code from git
cd korpi   # Enter the source directory
# open Korpi.sln

Lessons learned

  • I can do it! :)
  • Don't be afraid to try out new things (looking at you, shader development)
  • Trying to keep hundreds of millions of voxels in memory at the same time is troublesome
  • Writing unit tests is usually worth the extra effort
  • Multithreading isn't as hard as people claim it to be
  • Premature optimization is the root of all evil. Rather ship an unoptimized game than no game at all.
  • Engine development is really fun!

Credits

  • xMrVizzy (Faithful 32x texture pack, used as programmer-art for some of the block textures)
  • Westbeam (Space Skybox cc0, used as programmer-art for the night skybox)
  • Spiney (Cloudy Skyboxes cc-by 3.0, used as programmer-art for the day skybox)

Terms

You may freely read the source, learn from it, and use it as a basis for mods of the game Korpi. All contributions are of course welcome!

In case of doubt, just ask the Korpi development team! :-)

Make sure to read the licence.