When my son, an early teen, was writing games with Pygame, I recalled I had to implement the scene-change code for him by myself.
Now he's using jQuery to write some simple games. Can anyone help us learn how to change scenes in jQuery games? The use case is like this:
In Scene 1, the blue team and the red team had a shootout. Say the blue team won with five team members left. These five must move onto a new scene. The new scene suggests a new background, the absence of all the red team, not even their dead bodies etc.
Do we have to do this at atomic, very low level?
Is there a high-level concept, API call etc., that we are missing?
Added:
In Pygame, scene2, scene3, scene44 etc are each a different file.
From scene1, I call scene2 like this:
sprites_to_live_on = sprite1, sprite2, soldiers_still_alive, ..
background_for_scene2 = "/a/b/c/bkground123.png"
scene2.start(sprites_to_live_on, background_for_scene2)
Each sprite carries over their power, health, weapons etc into the next scene automatically.