Code Monkey home page Code Monkey logo

osuve's Introduction

Open Source Unity GPL v3 Contributions Welcome Docs Discord

This game engine is an early prototype, expect things to break, if they're not already broken!

OSUVE is my take on a voxel engine, made open-source to the world to put to shame all paid voxel engines so that others may benefit from the knowledge that is accumulated here, and perhaps contribute some of their own. I will be continually working on this until it becomes a working product. (After all, I have plans to make a game with it!)

Show me the eye candy! 🍬

These images are likely to be outdated due to the current fast pace of changes.

Generation Caves Surface Surface CTM

Getting Started ⏩

Lucky for you, all you need to get this up and running is the latest copy of Unity—if it wasn't already obvious 😛

License 🔏

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

This may change in the future.

Acknowledgments 🎉

Pixel Perfection by XSSheep

High Speed Priority Queue for C# by BlueRaja

UnityVertexColors by Henri Kähkönen

KinoFog by Keijiro Takahashi

osuve's People

Contributors

chailotl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osuve's Issues

Biome generation

There is a distinct lack of biomedical generation.

This can be remedied using a few layers of perlin/simplex noise across the x/z plane to determine biomes. Temperature and humidity are two that Minecraft uses, but it need not be limited to only these; height is another that can be used as well, among others.

Bonus points for y-based underground biomes.

Instability at high (+6) view ranges

The chunk system seems to destabilize at high (+6) view ranges, where a large portion of chunks do not render. Forceable rendering of them sometimes causes an error in Unity:
Error

Better chunk management

Chunks are currently loaded in a 3D loop fashion from one corner to the other.

This is inefficient as focused should be put around the player and their point-of-view of the world.

Use Unity's built-in Vector3Int

Somehow I had missed that Unity already has a Vector3Int (and Vector2Int), so things will be changed to use those instead of my own Int3 implementation.

Surface terrain generation optimization

There are some givens about how the terrain generates, thus certain assumptions can be made that can drastically improve perlin/simplex generation; e.g. the surface always generates above y=0.

Perhaps some of these values may be stored in their corresponding columns?

Empty chunks should have an air flag

Currently empty chunks use up the same amount of memory as a chunk with any configuration of blocks.

This is wasteful as there are many many chunks that contain only air from the ground level up.

Better default terrain generation

The current terrain generation is very modest, with only the caves sufficient, if albeit too spacious and extensive.

More terrain features such as mountains, hills, plains, cliffs, overarches, and valleys should be considered and implemented.

Randomized/natural textures

Textures are currently unrandomized which causes it to look repetitive.

By using randomly rotated (and flipped?) UV’s for some textures, as well as alternate textures, terrain will look more natural.

Lighting system

A lighting system is due, even if a simple lit/unlit sunlight.

A propagation-based cached lighting system is proposed, where light propagates from light sources and around objects, and is cached for performance. Blocks that are exposed to sky are given special sunlight lighting.

Bonus points for dynamic light sources that will likely be a second lighting layer on top of the static lighting layer.

Better SSAO

The current system is realtime screenspace ambient occlusion—on top of it being the stock Unity SSAO—which has a rather large hit on performance.

Consideration of cached vertex-based ambient occlusion may improve performance and quality.

Structure generation

Only perlin/simplex noise functions are used to generate the world.

A proposed pseudo-random metadata system to generate small structures that may span at most a few chunks, such as trees and small houses. In short, a loaded but non-rendered chunk may be selected to generate a structure, such that when any relevant nearby chunks begin to generate, they properly generate the blocks of the structures inter-chunks.

Update mesh when destroying block

Hi, I'm updating chunk meshes, when I'm destroying a block. But block in border chunk won't update, but border chunk are calling the GenerateMesh function.

Do you have any idea why is this not working ?

Column system

Due to the decision of using a cubic chunk system over Minecraft's columnar chunk system, a new set of pros and cons have been presented. Among those include determining whether a block is exposed to the sun given the infiniteness in height.

A proposed "column system" similar to the chunk system where each x/z grid is given a column that store important data, such as the y position of the highest block in each local x/z coordinate so as to assist with sunlight lighting. Each column will encompass all chunks along the y axis per x/z grid.

Region system

Similar to the column system, there may be useful data that may be applied to a larger cube of chunks, such as Minecraft's regional difficulty. Perhaps entities may be stored per region as well, rather than per chunk.

Additionally it may be useful to store chunks in regions to optimize disk storage in a tree-esque way.

Dynamic atlas

The current atlas system hardcodes the blocks.

A dynamic atlas would be able to load blocks and textures from disk easily, and be able to load worlds flawlessly. Because of the fluidity of this system, each world will need to have a text file that contains the link between byte/int ID and block name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.