📄️ Create the Server
The Voxelize server handles terrain generation, meshing, and physics in parallel threads. This keeps the client fast.
📄️ Register Blocks
A voxel world has millions of blocks. Each block type needs properties - is it solid? transparent? what shape?
📄️ Create a World
A server can have multiple worlds. This tutorial creates one world called "tutorial".
📄️ World Configuration
Configure world boundaries, time cycles, physics, and performance settings.
📄️ Chunk Generation
Populate empty chunks with terrain using chunk stages. Each chunk goes through all stages in sequence.
📄️ Create the Client
The client connects to the server, joins a world, and renders it with ThreeJS.
📄️ Handle the Network
The network manager connects to the server over WebSockets and handles all game data.
📄️ Initialize the World
After connecting, the world receives an INIT packet with server config. Call world.initialize() to process it.
📄️ Apply Textures
Right now blocks show question marks because we haven't applied textures yet.
📄️ Player Control
RigidControls handles walking, running, jumping, flying, and collision detection. It wraps ThreeJS's PointerLockControls.
📄️ Debug UI
Voxelize includes a built-in debug panel. For more control, use lil-gui.
📄️ Update Voxels
Modify voxels by raycasting to find which block the player is looking at.
📄️ Perspectives and Visuals
Switch between first, second, and third person views. Add a character model and lighting effects.
📄️ Multiplayer
Add real-time multiplayer with the Peers class. It syncs player positions over WebSockets and renders their characters.