You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Idea:
After pre_start, but before start the scene can add more "in-scene" stages to the progress-bar.
I think the pre_start function can be used for this, and maybe using yield to advance the progress bar (coroutines style) or by emitting signals.
I guess that in order to have proper progress-bar the number of "in-scene" stages need to be known before the scene is loaded, which is tricky, a simple solution is to pass it in the params, but I hope there is a more elegant solution.
Example use case:
The gameplay.tscn scene generates procedural level in the pre_start func
funcstart_button_pressed():
Game.change_scene("res://gameplay.tscn",
{ "show_progress_bar": true,
"in_scene_stages": 5# tell the progess bar to reserve 5 extra stages
})
# in gameplay.gdfuncpre_start(params):
generate_maze()
yield() # advance stage... or use signal and wait for idle frame?generate_tiles()
yield()
generate_treasure()
yield()
generate_monsters()
yield()
generate_doors()
funcstart():
play_start_game_sound()
The text was updated successfully, but these errors were encountered:
Idea:
After
pre_start
, but beforestart
the scene can add more "in-scene" stages to the progress-bar.I think the pre_start function can be used for this, and maybe using
yield
to advance the progress bar (coroutines style) or by emitting signals.I guess that in order to have proper progress-bar the number of "in-scene" stages need to be known before the scene is loaded, which is tricky, a simple solution is to pass it in the params, but I hope there is a more elegant solution.
Example use case:
The gameplay.tscn scene generates procedural level in the pre_start func
The text was updated successfully, but these errors were encountered: