Hi there!
Sorry for my language!!!
I am developing a Hidden Objects Game with 54 scenes. When check it in Player or my Device, scenes changing correctly some times and then changing incorrectly. Why?
I attach Main file and one of the Scenes to this post.
Please help me to solve this problem.
Thanks a lot dear friends :-)
Comments
Likes: Giliapps
For example when I tap on Back, moves to scene 18 correctly, then in next test, moves to scene 4 ???
Is these reasons are possible:
1- Use GC in start of scenes
2- Use same name Vars in scenes (I declare them in start of scene, then NIL them in end of scenes)
3- Use Timers for Hint (In Hidden Objects Games, for help to gamers to find things) and conflict it with Scene Manager
Thanks again :-)
I believe that the problem is somewhere in your code, maybe some Var is not annihilated in time?
I didn't check your work, but there could be some time when both scenes coexist (during transition from one to the other).
To avoid the "overlapping" of Vars values you could set them as properties of each scene and see if the problem persists.
You could also try monitoring (print) the vars values before and after scene transition to check if this may be your issue.
Likes: Giliapps
Thank you so much.
I try replace gideros.class with Core.class in every scenes, but my problem is not solve yet.
But your recommendation about test print(var) shows that my Vars is still in memory after NIL them!!! I guess that it is my issue.
I am changing name of them in every scenes. This is take much time. I will say about result to you.
Thanks again :-) :-)
Likes: Giliapps
I didn't know about strict lua, it seems to be an excellent idea to keep things clean: from my understanding it is wise to avoid global vars anywhere it is possible.
Likes: Giliapps
Thanks all.
I can't use recommendations of Strict.lua because my HINT functions (in a separate and important lua file) checks every vars in every scenes to help gamers to find things and ways and ...
But changing name of vars to unique names, solve my problem. (Special thanks to @pie)
I complete this game (with name: WILLIHARD (Collector's Edition - Full Hidden Objects)) just now. [-O<
Thanks to all my dear friends :-) :-) :-) and good luck.