Procedural 2D World Framework. TerraFlux2D is a modular, multiplayer-ready framework for creating infinite procedural 2D worlds in Unity. Deterministic generation, chunk streaming, a lobby with numeric room codes, 4 seasons, and persistent decorations — all included and ready to extend.
Infinite worlds via 3-layer Perlin Noise (height, temperature, moisture). Same seed always produces the identical world.
World split into square chunks. Generated server-side and streamed to clients. Only nearby chunks are kept in memory.
Plains, Forest, Desert, Swamp, Winter, Beach, Ocean — each with unique tiles, trees, rocks and decoration spawn rules.
Deterministic trees, rocks and flowers per chunk. Destroyed objects persist permanently and never respawn after deletion.
Spring, Summer, Autumn, Winter — synced over network with smooth tile transitions. Season state saved per world.
Auto-save every 5 min. Saves metadata, destroyed decorations and season as human-readable JSON files.
6-digit numeric room codes. Host creates, friends join by code — no IP address required. Ready-state system included.
Server-authoritative world gen and chunk streaming. Seed synced to all clients on join. Supports host and dedicated server.
WorldGenerator.cs · ChunkLoader.cs · ChunkNetworkManager.cs · ChunkDecorator.cs · ChunkRenderer.cs · BiomeData.cs
WorldManager.cs · SaveManager.cs · DecorationSaveManager.cs · SampleSceneBootstrap.cs · AutoSaveWorld.cs
MainMenuController.cs · WorldItemUI.cs · RoomCodeRegistry.cs
LobbyManager.cs · LobbyPlayer.cs · LobbyUI.cs · LobbyPlayerRow.cs
PlayerMovement.cs · CameraFollow.cs · YDepth.cs
TreeHealth.cs · RockHealth.cs · PlantHealth.cs
| Dependency | Version |
|---|---|
| Unity | 6.0 or newer |
| Mirror | Latest (not included) |
| Input System | 1.7+ (Unity package) |
| Render Pipeline | Built-in (2D) |
Create BiomeData ScriptableObject, assign tiles & prefabs, add to WorldGenerator.
Adjust spawn chances in BiomeData. Set max per chunk in ChunkDecorator.
Change seasonDuration in SeasonManager (in seconds).
Modify GenerateRoomCode() in MainMenuController.cs.
Set chunkSize in WorldGenerator. Larger = fewer chunks, more tiles each.
Unity Asset Store EULA.
Sprites by Anokolisa — CC0 1.0 Universal. Public domain. Free for commercial use.
TerraFlux2D is a foundation framework, not a complete game. It is designed to be extended and integrated into your own projects.
TerraFlux2D · CywerStudio · v1.0