hi, this time i added loading screen feature so we see when the loading process while level data is loaded and cached.
i also added the feature to load new maps on runtime via cvar, so i could check other maps while the core engine i initialize and cached so i wont need to stop and run the project every time i want to check other/new map.
this was mainly an engine redesign process so everything related to level map could be released and initialized on demand.
the loading screen i based on my gui system so its just a matter of designing the loading script and load it and update the variable and call triggers when needed.
here is some of the code in the loading gui script:
rect 235,431,( "gui::map_loading" * 405 ),26
this window i the loading progress bar we see while we wait for the level to start, notice the 'gui::map_loading' variable in the rect definition of the window 'p_load_bar', this variable used to control the visibility of window 'load_bar'.
because i have parent/child design, the parent window also scissor his child, that means the child windows can be visible only inside their parent rect.
when i'm loading level/map data i'm setting this variable to the right value [0..1] and when i'm finished i'm triggering the event 'FinishedLoading' that changed the text near the loading to
'click to continue'
also i added script file per map, so i could define map related parameters such as the loading image. thumb image etc.
when i need to load specific map i'm checking if the map has a script file, if so i'm getting the image that i need to load and set it as 'gui::loading_bkgnd' in the loading gui, here is the loadimg window declared inside the script:
the window is responsible to display the loading background image.
here is a screenshot of one of my test levels: