Anyone else missing actors all of a sudden?

vikingviking Member, PRO Posts: 322
edited September 2012 in Working with GS (Mac)
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.

Answers

  • BluemoonstudiosBluemoonstudios Member Posts: 156
    I have never seen this before. Let me know if you ever figure it out :D
  • famekraftsfamekrafts Member, BASIC Posts: 834
    Anything out of the scene, more than 200 pixels on right side that's approx x=1200 for 1024 size will get auto destroyed. So make sure your screen is double size. I was using the sliding menu for my first game but I changed it to simple one instead as the whole thing was a bit buggy and was taking lot of time to load. Will try it for my second game. I am not sure it is the scene or the camera size. On the left we can go upto -999 before it auto destroys. Just keep this in mind and make the scene a bit wider and test once.
  • vikingviking Member, PRO Posts: 322
    Thanks for the comment :)

    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...
  • famekraftsfamekrafts Member, BASIC Posts: 834
    Ya that's what I have been doing, but I am not spawning any more actors. Simply recycling them as spawns cause loads of lag, say if I have fifty stages in a game.
  • vikingviking Member, PRO Posts: 322
    I have tried many different ways to make this work and the only solution I have found is a pretty hardcore "brute force" option, which is to use the reset game behavior to take me back to the main menu and always have my level select actors show up. Anyone know if the reset game behavior have drawbacks that I am not thinking about?
  • sparkaniasparkania Member, PRO Posts: 300
    I also learned that Random behavior of actors in GS, unless programmed to be so, are actually acting the way you told them to.. you just might not know it. I was having a problem with overlapping trigger actors to produce values.. some worked and some didnt although all were all programmed the same. then I found out that there was an actor in the layers list between some of the triggers which was cancelling the value creation of the other actors below it..
  • RPRP Member Posts: 1,990
    I have not been able to locate Bruce Willis or Millia Jovovich for days now. Definitely "trigger actors". I tried to spawn but got some big dude in a weird costume with chains and a huge collared red cape.
  • sparkaniasparkania Member, PRO Posts: 300
    Bruce was kidnapped by Chuck Norris, Milla is in my living room watching CSI and the Red Caped dude is my bodyguard hired to keep you away from my window..
  • RPRP Member Posts: 1,990
    Bruce was kidnapped by Chuck Norris, Milla is in my living room watching CSI and the Red Caped dude is my bodyguard hired to keep you away from my window..
    Whaaa? How'd you know?! @-)
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Has anyone seen my cape?
  • sparkaniasparkania Member, PRO Posts: 300


    Whaaa? How'd you know?! @-)
    c'mon.. a dude in my front yard with a cartoon bomb for a head.. you didn't think that "Lost contact lens" excuse really worked did you?

  • AfterBurnettAfterBurnett Member Posts: 3,474


    Whaaa? How'd you know?! @-)
    c'mon.. a dude in my front yard with a cartoon bomb for a head.. you didn't think that "Lost contact lens" excuse really worked did you?

    Cartoon bomb for a head... AND NO BODY!!!!

Sign In or Register to comment.