GSDL::Game
Inherits GSDL::Loadable < Reference < Object
Constants
DefaultBackgroundColor = Color::Black
Constructors
instance
Sourcenew(title : Nil | String = "", width : Int32 | Nil = 800, height : Int32 | Nil = 600, logical_width : Int32 = 0, logical_height : Int32 = 0, resizable = false, fullscreen = false, maximized = false, minimized = false, borderless = false, always_on_top = false, high_pixel_density : Bool = false, renderer_type : Symbol | Nil = nil, window_flags : Array(SDL3::Window::Flags) | Nil = nil)
SourceClass methods
camera
Sourcecenter_x
Sourcecenter_y
Sourcedraw
Sourcefps
Sourceheight
Sourceloader
Sourceorg_name
TODO: this should be overriden by consumers for save directory locations communicate this somehow, or make abstract
paused?
Sourcepop
Sourcepush(scene : Scene, data : SwitchData | Nil = nil)
Sourcequit!
Sourcereplace(scene : Scene, data : SwitchData | Nil = nil)
Sourcescene
Sourcesize
Sourceswitch(scene : Scene, data : SwitchData | Nil = nil)
Sourceswitch_async(scene_class : T.class, data : SwitchData | Nil = nil) forall T
Sourcetitle
Sourcetitle_name
TODO: this should be overriden by consumers for save directory locations communicate this somehow, or make abstract
width
Sourcewindow_height
Sourcewindow_size
Sourcewindow_width
SourceInstance methods
background_color
Sourcecenter_x
Sourcecenter_y
Sourceclear_screen
Sourcedestroy
Sourcedraw
Sourceexit?
Sourcefps_counter
Sourceheight
Sourcehigh_pixel_density?
Sourcejoystick_threshold
Sourceloader
Sourcelogical_height
Sourcemouse_cursor_visible
Sourcepaused?
Sourceperformance_monitoring_enabled
Enable or disable performance monitoring and metric collection.
performance_monitoring_enabled=(performance_monitoring_enabled : Bool)
Enable or disable performance monitoring and metric collection.
pop
Sourcepush(scene : Scene, data : SwitchData | Nil = nil)
Sourcequit!
Sourceregister_event_handler(handler : EventHandler)
Sourcereplace(scene : Scene, data : SwitchData | Nil = nil)
Sourcerun
Sourcescene
Sourcesize
Sourceswitch(scene : Scene, data : SwitchData | Nil = nil)
Sourceswitch_async(scene_class : T.class, data : SwitchData | Nil = nil) forall T
Sourcetarget_fps
If nil, the frame rate is uncapped (limited only by vsync if enabled). If set to an Integer (e.g., 60), the game loop will delay to match this FPS.
If nil, the frame rate is uncapped (limited only by vsync if enabled). If set to an Integer (e.g., 60), the game loop will delay to match this FPS.
title
Sourcetoggle_pause
Sourceunregister_event_handler(handler : EventHandler)
Sourcevsync
Sourcewidth
Sourcewindow
Sourcewindow_height
Sourcewindow_size
Sourcewindow_width
Source