How trewrightserves/homegames works
HomeGames Voxel is a browser-based multiplayer voxel game for a home LAN. A player opens the hosted client, joins through the network client, and receives world state; the client renders the world and handles movement and interaction, while the server coordinates multiplayer state and gameplay requests. The README documents chunked terrain, block editing, chat commands, and multiplayer sync; sampled server code also indicates inventory, crafting, entities, quests, and appearance features. The server is a substantial monolith, so these are logical responsibilities at one source path; unsampled wiring is omitted.
Main entry points: main.js Client coordinator · Network.js Socket client · server.js HTTP and game server · Inventory.js Inventory and crafting UI
Components 14
Browser Client
- Client coordinator
public/js/main.js - Voxel renderer
public/js/render/Render.js - Input and controls
public/js/player/Player.js
World Simulation
- Movement physics
public/js/physics/Physics.js - Chunk world
public/js/world/World.js - Authoritative world
server.js
Multiplayer Services
- Socket client
public/js/network/Network.js - HTTP and game server
server.js - Player sync and commands
server.js
Player Features
- Chat console
public/js/chat/Chat.js - Inventory and crafting UI
public/js/player/Inventory.js - Item registry
public/js/data/ItemRegistry.js - Items, entities, quests
server.js
Other components
- LAN player
Connections 21
- LAN player → Client coordinator: opens client
- Client coordinator → Input and controls: creates controls
- Client coordinator → Chunk world: creates world
- Client coordinator → Movement physics: creates physics
- Client coordinator → Voxel renderer: creates renderer
- Client coordinator → Socket client: creates client
- Client coordinator → Chat console: creates console
- Client coordinator → Inventory and crafting UI: creates UI
- Movement physics → Chunk world: checks collisions
- Voxel renderer → Chunk world: renders chunks
- Inventory and crafting UI → Item registry: reads item data
- Client coordinator → Item registry: maps hotbar items
- Socket client → HTTP and game server: exchanges socket events
- HTTP and game server → Authoritative world: generates and reads chunks
- HTTP and game server → Player sync and commands: handles player updates and commands
- HTTP and game server → Items, entities, quests: handles crafting and interactions
- Chat console → Client coordinator: submits chat
- Inventory and crafting UI → Socket client: sends craft requests
- Authoritative world → Socket client: sends world state
- Player sync and commands → Socket client: sends player and command events
- Items, entities, quests → Socket client: sends gameplay events