Hello,
http://github.com/Darith1974/Lua-Corona-Mobile-App-Space-Invaders
I have my space invaders app at the above github repository. Trying to fix a few bugs which i cannot fathom:
First bug:
Transition from scene 4i to scene5:
Unfortunately when I transition form this scene to Scene 5 physics will
not work properly. The main soldier sprite will not obey gravity properly and
acts strangely to events. I do not why. Sometimes if one starts the game from
say scene 4a or 4c it works and maybe even from scene1a. But it is too
inconsistent. I spend a few hours trying to find out why and trying various
things but to no avail. I though it was scope in that in scene5 I originally
set group to global within createScene. I then initiated physics from main.lua.
I tried creating a transition from blank scene in between the problem levels.
There is a flip command associated with storyboard.The only reason I can come up
with is that corona or storyboard cannot handle purging all the previous scenes
with all the physics and then moving onto a totally different scene with
different objects and physics. It could be that I am not removing objects
properly or handling collisions; the simulator is getting bogged down and maybe
half crashing. The subsequent levels
will work fine if one starts the game at scene5 and progresses onwards.
Second Bug:
I implemented the sound for collisions within the classes. There is a delay from when the
collision happens to the actual sound been rendered? Even if I run from main.lua
this strange behaviour happens.
Third bug:
The clock acts weird in later levels in that it jumps 3 to 5 seconds at a time.
This could be due to the stress I am maybe putting the simulator under. Or another
reason is that I implemented the timeScore fn incorrectly
Fourth bug:
During
the final testing for reasons unknown when I start the game from scene5, the
game will terminate to GameEnd at scene8 or 8a for some unknown reason even
though I did not alter the code