Coob's first devlog
So right off the bat, this isn't intended to be a minecraft clone, just that block worlds are simple enough to create the open world experience.
I like rust, it seems to be a promising programming language. Its robust language development was derived from previous languages that caused painstaking technical debt; and the ecosystem has grown mature over the years.
Entity - Component - System
Our sandbox game will be written with bevy, a feature-rich data-driven framework in rust that uses the ECS architecture. ECS is just an approach where composition is the pattern rather than inheritance, basically no more vague look ups of tightly coupled behavior and entity state for every class it derived from.
You'd attach components (like Transform, Velocity, etc) to an entity (which is just an ID) and add a system to transform your components (in this case, doing physics) for you. No more attaching individual scripts for a specific entity when you can just query for the relevant components.
Components are also stored contiguously, which is cache-friendly and can be fast as heck so that's always a plus.
Bevy
Bevy's ECS is only a small but critical part of the framework. It also abstracts a lot of features that you'd expect from a game engine like Input events and Window properties.
use bevy::prelude::*; pub fn move_forward( time: Res<Time>, key_in: Res<Input<KeyCode>>, mut player: Query<&mut Transform, With<Player>>, ) { if key_in.pressed(KeyCode::W) { let mut player = player.single_mut(); player.translation.z += time.delta_seconds(); } }
This benign code shows how to move a Player farther from the screen by pressing W.
This is suprisingly simple and modular. Everytime I add a new behavior, it can just exist in another system.