Removing All Display items + Functions.

Okay so, I’m working on a small little game but this is my first year/time working with corona sdk and everything so it will take some time to get use to it but in general Im making a game that there is a ball that just bounces around and you have to touch it after u touch it it either goes to another level or if the timer runs out then the first room should start over, But after the timer runs out i have it goto replay which is just another level that says failed! with a little timer. But after it goes back to the first level there are 2 timers on top of each other and I was wondering if someone could try to fix it or put my code in the correct order. 

At the bottom i have my whole game in a zip file that im working on. If someone could put this in the correct order for me. Thanks!

I just took a quick look but the possible cause is that timeLeft is never inserted into the sceneGroup.

Also when you create the objects you should create them in scene:create. scene:create will be only be runned once (during creation).

Also I think that the whole scene looks weird.

I think it might be a good idea to start the scene over from this template: https://gist.github.com/anonymous/c2783d4268d7a3b3f845

And make sure that:

  1. All objects are created in the scene:create

  2. That all objects are inserted correctly into the displayGroup “sceneGroup”

And after that create a function (instead of removing and re-creating the scene each time) that calls something called restartScene() or something like that.

I hope this will help get you started and that you’ll find the solution by yourself.

Best regards,

Tomas

I just took a quick look but the possible cause is that timeLeft is never inserted into the sceneGroup.

Also when you create the objects you should create them in scene:create. scene:create will be only be runned once (during creation).

Also I think that the whole scene looks weird.

I think it might be a good idea to start the scene over from this template: https://gist.github.com/anonymous/c2783d4268d7a3b3f845

And make sure that:

  1. All objects are created in the scene:create

  2. That all objects are inserted correctly into the displayGroup “sceneGroup”

And after that create a function (instead of removing and re-creating the scene each time) that calls something called restartScene() or something like that.

I hope this will help get you started and that you’ll find the solution by yourself.

Best regards,

Tomas