A downloadable game template for Windows

Download NowName your own price

Godot marching cubes

This is a demo of multiplayer marching cubes game in godot.

Features

  • Procedural world generation with biomes
  • Blending different materials
  • Water
  • Day night cycle
  • Multiplayer
  • Voxel placing and removing

Testing

  • To run the project open it in godot and run it, two windows will open.
  • In one window you can enter singleplayer, the other is to test multiplayer.
  • Connect to the singleplayer world using port 5000.

Adding new voxels

  • Create a new class that extends Voxel under the "voxel" folder
  • Give it a unique ID and register it in "Main.cs"
  • If you're using textures add the uniforms in "terrain.gdshader" and assign the textures in node "Mesh" that is inside "chunk.tscn"
  • Add it into "terrain.gdshader" under getVoxelColor like so: Open code snippet

Adding new biome

  • Create a new class that extends Biome under the "world_generator/biome" folder
  • Optional: You can call base({your base height}, {your height variation})
  • Implement the GetVoxel method
  • Add your biome to GetBiome in the "WorldGenerator" class

Adding new surface mesh

  • Save the geometry as a ".res" file under "voxel/surface_mesh"
  • Save the texture as ".png" in the same place
  • In "Main.cs" load your mesh and texture
  • Instantiate the surface mesh material (res://shaders/surface_mesh.tres) and assign your texture to the parameter "color" Open code snippet

Optimizing performance for older hardware

You can play with the in-game settings, lower mesh count and render distance.

Or:

In "world/Chunk.cs" -> Generate(bool selfOnly) I smooth the geometry by subdividing, this is optional. Remove these lines:

Open code snippet

Published 12 days ago
StatusReleased
CategoryAssets
Authoriiarielsl
Tags3D, Godot, Multiplayer, Open World, sourcecode, Voxel
Code licenseMIT License
Asset licenseCreative Commons Zero v1.0 Universal
Average sessionA few seconds

Download

Download NowName your own price

Click download now to get access to the following files:

godot-marching-cubes-main.zip 60 MB
compiled.zip 176 MB

Leave a comment

Log in with itch.io to leave a comment.