[WIP] Voxel World Engine (Minecraft-like world generation)

Sharing my WIP voxel engine in Cocos Creator v3.8.1. Still very early and buggy, but sharing in case people want to use something from it.

If you want to collaborate and know how to fix some of the bugs the help is very appreciated as well! :smile:

voxel-gifs

things that I’m aiming to do:

  • fix some vertices direction bugs
  • fix the collider position of the mesh
  • change from static to dynamic meshes
  • dig mechanic
  • biomes
4 Likes

Added a few performance fixes and proper water mesh material, still need to fix the collision and add the world reference to the chunk to fill a few faces Next steps:

  • Add service workers to generate the world faster
  • Add biomes layer generation
  • Add dynamic mesh for dig mechanics

ezgif-4-1a694d2ffa

1 Like

good :grinning:

Added today:

  • Octave perlin noise
  • Biomes data structure and components organization using the chain of responsibility pattern
  • Domain Warping settings for more natural landscapes

Next steps:

  • Dig mechanics
  • Generate the world with service workers
  • Add more biomes

Any help or collaboration here is super welcome, I have no idea how to deal with dynamic meshes in Cocos yet :rofl: :sweat_smile:

1 Like

Was a bit tired of messing around with meshes, so today I took some time to just play around with the character movement FPS perspective.

ezgif-4-7005fee2b3

A bit without time to code in the holiday season with in-laws at home ( :sweat_smile: ) But today I am playing around plotting more chunks on the fly based on player position

ezgif-4-be3a78cd38

1 Like

Very Good!

1 Like

Added support for Web Workers, so generation now runs in parallel without blocking the main thread as also added dig and build mechanics.

I was not able to make it run using WebGPU for some reason. Seems to be a bug from Cocos Creator itself (v3.8.8)

Here is the repo: GitHub - feliperyba/cocoscraft: Simple Voxel world engine and Minecraft-like playability made with Cocos Creator v3.8.1 and TypeScript

voxel-gifs

1 Like