class

PointClickEngine::Core::Engine

Inherits Reference < Object

Main game engine class that coordinates all game systems.

Constructors

instance

Singleton accessor

Source
new(window_width : Int32, window_height : Int32, window_title : String, resource_manager : IResourceLoader | Nil = nil, input_manager : IInputManager | Nil = nil, render_manager : IRenderManager | Nil = nil, skip_singleton : Bool = false)

Creates a new game engine instance with optional DI overrides Use skip_singleton: true for testing to allow multiple engine instances

Source

Class methods

debug_mode
Source
debug_mode=(value : Bool)
Source
instance=(engine : Engine | Nil)
Source
instance?
Source
reset_instance

Reset instance for testing purposes

Source

Instance methods

action_overlay_manager
Source
action_overlay_manager=(action_overlay_manager : Actions::ActionOverlayManager)
Source
active_game_area_rect
Source
active_script_runner
Source
add_scene(scene : Scenes::Scene)
Source
auto_save_interval

Auto-save functionality

Source
auto_save_interval=(auto_save_interval : Float32)

Auto-save functionality

Source
auto_save_timer
Source
auto_save_timer=(auto_save_timer : Float32)
Source
camera

Get camera from renderer for compatibility

Source
change_scene(scene_name : String, activation_options : SceneManager::ActivationOptions = SceneManager::ActivationOptions.new)

Scene management

Source
change_scene_with_transition(scene_name : String, transition_type : String = "fade", duration : Float32 = 1.0_f32, player_position : RL::Vector2 | Nil = nil, activation_options : SceneManager::ActivationOptions = SceneManager::ActivationOptions.new)

Convenience method for scene transitions

Source
current_frame_context
Source
current_scene

Current scene reference

Source
current_scene=(current_scene : Scenes::Scene | Nil)

Current scene reference

Source
dialog_manager
Source
display_manager
Source
effect_manager
Source
effect_manager=(effect_manager : Graphics::EffectManager)
Source
enable_auto_save(interval : Float32)
Source
enable_verb_input

Enable verb input system

Source
engine_ready?
Source
event_bus
Source
fullscreen
Source
fullscreen=(value : Bool)
Source
game_state_manager
Source
game_state_manager=(game_state_manager : GameStateManager | Nil)
Source
gameplay_cursor_active?
Source
gameplay_input_active?
Source
global_script_runner
Source
hotspot_highlight_enabled?
Source
init

Initializes the engine and all subsystems

Source
input_handler
Source
input_manager
Source
input_manager=(input_manager : InputManager)
Source
inventory
Source
inventory=(inventory : Inventory::InventorySystem)
Source
item_registry
Source
item_registry=(item_registry : Inventory::ItemRegistry)
Source
load_game(slot_name : String = "autosave") : Bool
Source
on_update
Source
on_update=(callback : Proc(Float32, Nil) | Nil)
Source
pause_game

Window management

Source
paused?
Source
player

Convenience accessors

Source
player=(value : Characters::Character | Nil)
Source
player_control_enabled

Player control (disabled during action sequences)

Source
player_control_enabled=(player_control_enabled : Bool)

Player control (disabled during action sequences)

Source
quest_manager
Source
quest_manager=(quest_manager : QuestManager | Nil)
Source
reference_height
Source
reference_height=(reference_height : Int32)
Source
reference_resolution
Source
reference_width
Source
reference_width=(reference_width : Int32)
Source
render_manager
Source
render_manager=(render_manager : RenderManager)
Source
renderer

Get renderer from system manager

Source
resource_manager
Source
resource_manager=(resource_manager : ResourceManager)
Source
resume_game
Source
return_to_menu
Source
run

Main game loop

Source
run_script(path : String)

Run an action sequence from YAML file

Source
run_script(runner : Actions::ActionRunner)

Run an action sequence from an ActionRunner

Source
running
Source
running=(running : Bool)
Source
save_game(slot_name : String = "autosave") : Bool

Save/Load functionality

Source
scene_manager
Source
scenes
Source
script_engine
Source
script_running?

Check if an action sequence is running

Source
set_window_size(width : Int32, height : Int32)
Source
shader_system
Source
show_fps
Source
show_fps=(value : Bool)
Source
show_main_menu
Source
skip_script

Skip current action sequence

Source
start_game
Source
start_new_game

Start a new game

Source
stop

Stops the game loop

Source
stop_script

Stop current action sequence

Source
system_manager

Component managers - direct access for users

Source
system_manager=(system_manager : EngineComponents::SystemManager)

Component managers - direct access for users

Source
target_fps
Source
target_fps=(target_fps : Int32)
Source
timer_manager
Source
timer_manager=(timer_manager : TimerManager)
Source
toggle_fullscreen
Source
toggle_hotspot_highlight
Source
toggle_pause_menu
Source
transformed_mouse_position
Source
update(dt : Float32)

Updates all game systems

Source
verb_input_system
Source
window_height
Source
window_height=(window_height : Int32)
Source
window_title
Source
window_title=(window_title : String)
Source
window_width

Core properties

Source
window_width=(window_width : Int32)

Core properties

Source