← BACK TO WORK
Voxelworld, a game project by Matt Martnick (2025)

Voxelworld

Game Dev · 2025

A voxel sandbox in Unity 6 where machine-learning agents plant and grow vegetation in response to soil, water and the player's terrain edits.

Concept

The Unity Voxelworld and Machine Learning project is designed to create an interactive virtual environment that dynamically responds to player interactions through intelligent, growth-oriented vegetation systems. The core idea involves developing machine learning-driven agents capable of analyzing and reacting to environmental factors like soil fertility and proximity to water. Players can actively shape the virtual landscape by directly manipulating terrain and resource placement, thus influencing how the vegetation spreads and develops within the environment.

Process log

At the project's outset, significant effort was dedicated to defining its scope and foundational elements. This phase involved careful planning and the selection of key technologies and tools, particularly Unity and Unity ML-Agents. Establishing these parameters early was crucial, as they determined the methods for asset creation and the initial direction for machine learning model development.
Voxelworld — process, February 16, 2025
Substantial progress through a specialized Unity course on world-generation systems: a basic procedural voxel terrain capable of identifying distinct blocks such as dirt, grass, and water. An overhead view replaced the first-person perspective, providing clearer visibility for observing vegetation growth patterns and better strategic layout.
WATCH CLIP ↗
Integration of machine learning agents with Unity began. Configuring the Python environment proved more complex than anticipated, and early training encountered erratic behaviors from Unity's physics system. Still, a breakthrough: an agent reliably navigating toward optimal planting locations adjacent to water, refined with penalties for lingering or becoming submerged.
WATCH CLIP ↗
Complexity increased, uncovering a persistent offset error in positional scoring that caused agents to plant vegetation incorrectly around rocky terrain. Despite this, major advancements in training the models to avoid waterlogged terrain — roughly 80 to 100 training iterations significantly optimized agent behavior.
WATCH CLIP ↗
Players gained direct control over environmental modifications: placing and removing blocks with mouse interactions, a scrollable block inventory, and targeting highlights. Dynamic water spreading, switchable first/third-person perspectives, detailed textures and sprite animations rounded out the interactive layer, with save/load systems under consideration.
Voxelworld — process, April 19, 2025

Obstacles

Integrating Unity with the Python environment for ML-Agents posed significant setup difficulties early on. Complications with Unity's physics system resulted in unpredictable agent behavior, and the persistent positional-scoring offset consistently affected environmental evaluations and planting accuracy. Balancing rewards and penalties in agent training proved complex, particularly around water — challenges that required ongoing iterative testing.

Where it stands

Machine learning agents demonstrate effective, largely accurate navigation toward optimal vegetation sites despite the minor offset issue. Enhanced interactivity, improved textures, dynamic water simulation, and character animations mark considerable progress toward an engaging, responsive virtual environment.

ROLE — Creative Direction · Design · EngineeringTOOLS — Unity 6 · C# · UI Toolkit