Anyone else missing actors all of a sudden?
viking
Member, PRO Posts: 322
Hey guys,
Just wanted to share an issue I have been dealing with lately in case you are having similar problems.
I have a main menu where each new level of the game is represented by unlocked or locked icons. My scene is bigger then the 480 x 320 camera (1024 x 768) and I slide level icons in and out depending on user input. So far so good.
I started noticing that sometimes my icons just didn't appear and it was completely random. I could even restart the main menu over and over again and get a different makeup of level icons appear each time. Super-strange, right?
However, I didn't have a big problem with it because the AdHoc versions of my game always displayed all the level icons, even if they didn't appear in the editor -- until today. Today I noticed that the icons didn't always appear on the device either.
I tried a few different things to debug the problem including adding a constrain on the alpha data for each icon to a global attribute and display it with a debug text actor so I could check if the alpha channel was 0 when it was supposed to be 1 since I interpolate the alpha to zero when pressed, but that was not the problem. Then I tried to move the icons around in the scene outside the camera area and suddenly one of them appeared consistently, while the others did not. I found that if I place all of the icons at 550 on the X axis then they consistently appear in the editor. How strange is that? If I place them between 480 and 540 they appear only sporadically. If I place them between 570 and 1024 they only appear sporadically.
I kept the icons at 550 and I tested an AdHoc build and it works perfectly on the device as well.
There is perhaps a simple reason why this occurs, but I have no idea why -- Anyone?
For now, all ll I know is that it works for my game.
Just wanted to share an issue I have been dealing with lately in case you are having similar problems.
I have a main menu where each new level of the game is represented by unlocked or locked icons. My scene is bigger then the 480 x 320 camera (1024 x 768) and I slide level icons in and out depending on user input. So far so good.
I started noticing that sometimes my icons just didn't appear and it was completely random. I could even restart the main menu over and over again and get a different makeup of level icons appear each time. Super-strange, right?
However, I didn't have a big problem with it because the AdHoc versions of my game always displayed all the level icons, even if they didn't appear in the editor -- until today. Today I noticed that the icons didn't always appear on the device either.
I tried a few different things to debug the problem including adding a constrain on the alpha data for each icon to a global attribute and display it with a debug text actor so I could check if the alpha channel was 0 when it was supposed to be 1 since I interpolate the alpha to zero when pressed, but that was not the problem. Then I tried to move the icons around in the scene outside the camera area and suddenly one of them appeared consistently, while the others did not. I found that if I place all of the icons at 550 on the X axis then they consistently appear in the editor. How strange is that? If I place them between 480 and 540 they appear only sporadically. If I place them between 570 and 1024 they only appear sporadically.
I kept the icons at 550 and I tested an AdHoc build and it works perfectly on the device as well.
There is perhaps a simple reason why this occurs, but I have no idea why -- Anyone?
For now, all ll I know is that it works for my game.
Answers
I did something slightly different, which seems to work -- at least for the moment. I used to place the actors in the scene. Now I removed the actors from the scene and instead added an actor that is spawning all the menu actors. This minor change seems to have made a big difference in the reliability of my menu actors actually being displayed. Just so you know...