Hi! Today I have a (noob's) conceptual question concerning
different scenes in LÖVE-games and what to do with the
GOOi-code for the scenes.
Here is a fragment of an android game which should illustrate my question.
1)
Trapped on Planet Evil our hero is steering his ship through a narrow tunnel.
(Don't touch the walls! It will reduce your energy! Avoid those sinister energy bubbles!
Three contacts and you are dead meat.)
If
AUTO = autopilot is disabled you control your ship manually with the mouse / touch.
If
AUTO is enabled touch controls a weapon, it fires on touch.
2) Hero has made it! But at the end of the tunnel there is the
Mighty Gatekeeper, asking his eternal questions...
Choose wisely, Stranger! (Button A, B or C.)
3) Hero did it again! Now all is left to do, is
reaching the Space Station.
(Control his ship with the digital joystick.) And you're done!
-------------------------------------------------------------------------------------------------------
Now my questions:
a) How do you construct these three
"scenes" in LÖVE? Should they be in different .lua files?
How to switch from one scene to another, or to advance to another?
b)
Where would the GOOi code for the different buttons, joysticks... in the different scenes go?
Different .lua files (again) to be required?
Or does the GOOi code has to be clustered in one place? (The love.load callback of the main.lua?)
How can this be done?