Skip to content

EricApostal/block-mechanics

Repository files navigation

Block Mechanics

NOTE: This is a DEMO! It's a proof of concept I want to really want to work on. Check out the limitations section of this document for more information on why this isn't ideal yet.

An open-sourced voxel engine built for Roblox.

The demo can be played here!

About

Block Mechanics (not the final name) is a demo of what is possible as far as voxels go in Roblox. There are multiple iterations of this project.

Current Structure

Diagram

image

How it works

Currently, chunk loading is handled on a web server. While this isn't completely ideal, it works for what I need. Earlier iterations of this project saw me doing fully custom 3D Perlin noise chunk generation, however, this was relatively limited. By using a webserver, I'm able to offload the heavy computations to more suitable platforms, but I can also use more sophisticated projects to do so.

This does introduce inherent latency, however, due to the nature of chunk loading it's very possible to extend the radius of the requested chunks, and run a caching routine, since most of the latency occurs in transit. For the sake of copyright, I'm using minetest, an open-sourced Voxel Engine game. I made a mod for Minetest that utilizes HTTP Long-Polling to connect to a locally hosted Flask webserver. More information on that project can be found here. In case you are wondering, this is possible via an official Minecraft server, however I am unsure of how copyright law applies. If that's a project you would like to try, I'd recommend giving LeviLamina a go.

Limitations

Like all voxel engine projects on Roblox, there is frame lag. This is largely due to overhead in instancing, and the lack of full meshing control (for now). While mutable meshing is coming at some point, instances alone cause lots of lag. This project mostly solves these issues by introducing the block cache. Since much of the lag is caused at Instance.new, instances are created ahead of time and use optimized APIs to bulk move blocks into position.

About

Voxel Engine for Roblox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages