I'm coming from unity, this is my first bevy project.
I have some questions regarding structure. and how to do things in a standard way.
I developed each functionality separately but I don't know if I should tend toward something more monolythic like in OOP.
The verbosity of the Resources feels like friction toward using it so in some systems I use queries each frame instead of storing something like I'd do in oop.
I also tend to use .unwrap() everywhere, should I not and use another syntax instead?
Also how would you separate that into separate files ?
would you make a plugin so to regroup all resources inserts and systems ?
And any advice on anything else.
(except for the way I generated each tile individualy instad of using a texture because I'm going to use that)
use bevy::math::U8Vec2;
use bevy::prelude::*;
use bevy::window::{PresentMode, PrimaryWindow};
fn main(){
App::new()
.insert_resource(BoardIndex(U8Vec2 { x: (0), y: (0) }))
.insert_resource(DnDHoldState(false))
.insert_resource(MouseWorldPosition(Vec3{x:0.0,y:0.0,z:0.0}))
.insert_resource(HeldPiece(None))
.add_systems(Startup, setup)
.add_systems(Update, click_state_position)
.add_systems(Update, follow_mouse)
.add_plugins(DefaultPlugins.set(WindowPlugin{
primary_window : Some(Window {
present_mode : PresentMode::Immediate,
..default()
}),
..default()
}))
.run();
}
#[derive(Resource)]
struct BoardIndex(U8Vec2);
#[derive(Resource)]
struct DnDHoldState(bool);
#[derive(Resource)]