gdrs is a tool that allows you to modify Geometry Dash levels from within rust.
The end goal is a library that can streamline the process of creating Geometry Dash levels programmatically.
The ideal usage is as follows: (note that this is not yet implemented)
use gdrs::Level;
fn main() {
let mut level = Level::with_file("CCLocalLevels.dat").level("example level").unwrap();
level.get_objects().iter_mut().for_each(|obj| {
obj.x += 10.0;
});
level.save("CCLocalLevels.dat").unwrap();
}
or, if you want gdrs to find the file for you:
use gdrs::Level;
fn main() {
// Theroetically, in the far future, this will be able to link to the game directly, and be able to modify levels in real time.
// This though, requires knowledge about hooking into the game, which I don't have.
let mut level = Level::from_game("example level").unwrap();
level.get_objects().iter_mut().for_each(|obj| {
obj.x += 10.0;
});
level.save_to_game().unwrap();
}