In some games mostly mobile games the main menu is the game’s level in the background so when you tap on the screen the HUD is changing and you are starting to play the game, so my question is this:
Is it the game level in the background and when you tap on the screen and start playing is the only thing that is changing the HUD or you are loading the level?(In my opinion changing the HUD sounds more reasonable)
It probably depends, but if it works then I’d have the level loaded and ready but paused in the background until the game is started and the menu is hidden/unloaded.
ok so if this is the case how does the character doing some animations and such?
because
msg.post("#game", "set_time_step", {factor = 0, mode = 1})
is pausing the character’s animations and stuff
Surely this must depend on the game? For some games it might be sufficient to have a boolean paused = true
somewhere that you check and if it’s true you don’t activate any AI or spawn enemies or whatevere. For other games it might work to set the timestep to zero. And for some none of it works and you just have to fake it and add level background and a player character with an idle animation. There simply is no generic way of solving this.