1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
#![allow(dead_code)]
mod blob;
mod brain;
mod componet;
mod consts;
mod contorl;
mod graphics;
mod io;
mod mutate;
mod physics;
#[macro_use]
mod logger;
use bevy::prelude::*;
use brain::resource::BevyBlockNeurons;
use contorl::contorl::BlobContorlPlugin;
use graphics::*;
use io::evoio::EvoIOPlugin;
use mutate::mutate::MutatePlugin;
use physics::physical_world::PhysiWorldPlugin;
// TODO: Headless mode causing panic
// TODO: Not all cores are fully tuilized
/// Main function to start the simulation (which is a bevy app)
fn main() {
    App::new()
        .add_plugins((
            // defualt
            DefaultPlugins,
            // // set thread count
            // DefaultPlugins.set(
            //     TaskPoolPlugin{
            //         task_pool_options: TaskPoolOptions::with_num_threads(THREAD_COUNT)
            //     }
            // ),
            // // no renderer
            // DefaultPlugins.set(RenderPlugin {
            //     wgpu_settings: WgpuSettings {
            //         backends: None,
            //         ..default()
            //     }
            // }),
            // custom
            PhysiWorldPlugin,  // init physical world
            EvoGraphicsPlugin, // vsync and camera
            EvoIOPlugin,       // import and export
            MutatePlugin,      // mutation contorl
            BlobContorlPlugin, // update blob each frame
        ))
        .init_resource::<BevyBlockNeurons>()
        .run();
}