abstract class Prism::Engine
- Prism::Engine
- RenderLoop::Engine
- Reference
- Object
Overview
The main engine to run the game. You can implement your game engine by inheriting this class and adding your logic.
Direct Known Subclasses
Defined in:
prism/engine.crInstance Method Summary
-
#add_entity(entity : Crash::Entity)
Adds an entity to the entity engine
-
#add_system(system : Crash::System, priority : Int32)
Adds a system to the entity engine
-
#flush
Flush the GL buffers and resize the viewport to match the window size
- #get_open_gl_version
-
#init
Games should implement this to start their game logic TODO: this init should be defined in the game engine abstract class
-
#render
Renders the game
-
#startup
Starts up the engine.
-
#tick(tick : RenderLoop::Tick, input : RenderLoop::Input)
Process inputs This will pass time and input to the engine systems.
Instance Method Detail
Games should implement this to start their game logic
TODO this init should be defined in the game engine abstract class
Starts up the engine.
TODO we don't need to define this here. Let the implementations do it.
Process inputs This will pass time and input to the engine systems.