class

PointClickEngine::Core::EngineComponents::GameBuilder

Inherits Reference < Object

Builder pattern for simplified game initialization Reduces boilerplate and provides sensible defaults

Constructors

new(width : Int32 = 1024, height : Int32 = 768, title : String = "Adventure Game")
Source

Instance methods

build

Build the configured game

Source
engine
Source
engine=(engine : Engine)
Source
game_state_manager
Source
game_state_manager=(game_state_manager : GameStateManager)
Source
quest_manager
Source
quest_manager=(quest_manager : QuestManager)
Source
with_audio(music : Hash(String, String) | Nil = nil, sounds : Hash(String, String) | Nil = nil) : self

Configure audio with a hash of name => path

Source
with_dialogs(pattern : String) : self

Add dialog files

Source
with_features(*features : Symbol) : self

Enable specific features

Source
with_player(name : String = "Player", sprite_path : String = "assets/sprites/player.png", frame_width : Int32 = 56, frame_height : Int32 = 56, columns : Int32 = 8, rows : Int32 = 4) : self

Configure player with sensible defaults

Source
with_quests(pattern : String) : self

Add quest files

Source
with_scenes(pattern : String) : self

Add scenes from a directory or specific files

Source