Crate feo_oop_engine
source · [−]Expand description
Feo OOP Engine is an object oriented game engine.
procedural macros: feo-oop-engine-proc-macros
Compatibility
OS | Compatible |
---|---|
Windows | Issue id:1 |
Linux | Yes |
OSX | Yes |
See issue #1 for Windows
Description
The FeO OOP engine is a library I created to help me learn about 3D engines. This project is composed of two parts. feo-math, the math boilerplate; and the feo-oop-engine. The engine is built on the vulkano framework. This program is designed to facilitate 3D application development. Please note however that this program has its own unique workflow. Features of the engine include scripts, object oriented programming (or OOP for short), textures, materials, lights, game objects, and obj and mtl processing.
Example
Building the Scene
First create a new scene.
use feo_oop_engine::scene::Scene;
let scene = Scene::new(None);
This is where all of your game-objects will directly or indirectly exist on.
Initialize the Engine With the Scene
To create an engine use the FeoEngine::init(scene, specify_hardware)
. This will create a feo_engine object.
use feo_oop_engine::FeoEngine;
let mut engine = FeoEngine::init(scene, Some(1));
Build Objects
To build objects use the ::new()
constructor for the object you wish to build. You might want to build a light and a camera to be able to see the scene.
use feo_oop_engine::scene::game_object::obj::Obj;
let obj = Obj::from_obj(
Some("cube"),
"assets/standard-assets/models/shapes/cube.obj",
None,
None,
None,
None,
true,
engine.globals.clone(),
None
);
Pass Objects to Scene
Use the add_child()
function to add the object you created to the scene within the engine.
use feo_oop_engine::registration::relation::Parent;
engine.scene.write().unwrap().add_child(obj.unwrap());
Running the Engine
When all the game_objects have been created you can use the run() function of feo_engine to start the engine.
engine.run()
Modules
Components used by game objects.
Engine events and user defined events container.
Everything used to render
Constructs for identifying GameObjects
A construct within which a world can exist.
Scripting constructs
GLSL Shaders
Macros
Structs
The Engine