IOS simulator issue:system freezes when loading a rule

zellhuangzellhuang Member, PRO Posts: 79
edited August 2012 in Working with GS (Mac)
Hi GSers! Thanks for checking my problem.

My project is in final testing phase and I'm so excited. But unfortunately, I'v got some problems on IOS simulator. My mac os x version is 10.7.4. Xcode version is 4.4 and GS ios viewer version is 0.9.94.

Now I'v faced a weird issue. I created an actor named ACTOR1 in which there is a attribute(real) named POSITION. Then I created several rules in this actor:
When POSITION = 1, change another game attribute(named Equiment1) to 0.
When POSITION = 2, change another game attribute(named Equiment2) to 0.
When POSITION = 3, change another game attribute(named Equiment3) to 0.
When POSITION = 4, change another game attribute(named Equiment4) to 0.
(Note:there are other rules in this actor)

Then,I duplicated ACTOR1 and named it ACTOR2. So ACTOR2 is completely the same as ACTOR1.
When a scene starts,it will spawn both ACTOR1 and ACTOR2.Here comes the problem!
Every time, the simulator freezes when the scene changes to another one which will spawn ACTOR1 and ACTOR2.
I tried to check where the problem is.And then I found if I turn the rules(as described above) off in ACTOR2,the simulator won't freeze.However,when I preview directly in GS creator,it all runs well and no issue occur.

Does anybody know how so solve this problem. Thank you in advanced!

Best Answers

  • MobileRocketGamesMobileRocketGames Posts: 128
    edited August 2012 Accepted Answer
    Well, assuming the simulator doesnt freeze when you delete actor 2, but does when actor 2 is present and its behaviours are on;

    This could be the result of both objects trying to update the same attribute at the same time. Or, this could be having to do with what is affecting the POSITION attributes in each actor.

    First, try creating another set of "Equipment" attributes and have Actor 1 update EquipmentA1-4 and Actor 2 update EquipmentB1-4.

    Obviously this may not be ideal as you may wish to have actor 2 update the SAME attributes as actor 1. But you can create a system of rules to this effect.
  • MobileRocketGamesMobileRocketGames Posts: 128
    edited August 2012 Accepted Answer
    .....?
    what are you doing....
    you shouldnt be using xcode at all at this point.

    I think we are not on the same page. You are trying to play your game build on your IPHONE, not SIMULATOR. The "simulator" simulates playing on a device, playing on your iPhone is the real thing.

    First of all, in your image, at the top left, you have to select your build device, right now you have it left on the iphone simulator, which is not what you want (because if it was, you could just preview your game on your screen from inside gamesalad without installing the gamesalad viewer or using your device).

    Tshirtbooths got two great tutorials. Both cover setting up provisioning keys but one covers testing in the gamesalad viewer on your device and the other playing an ad-hoc build of your game on your device. (keep in mind you will need an apple developer account for this)

    Test your game on your device in Gamesalad:






    Build Ad-Hoc version of game on your device:


Answers

  • zellhuangzellhuang Member, PRO Posts: 79
    Well, assuming the simulator doesnt freeze when you delete actor 2, but does when actor 2 is present and its behaviours are on...
    hi @MobileRocketGames ,thanks for your help,man!
    I'm still working on this issue.Your method sounds good,but I think that will make my project code much more complicated.'cause there are too many such ACTOR1,2.3,4...Anyway,thank you
    :)
  • MobileRocketGamesMobileRocketGames Member Posts: 128
    Hi Zell,
    You are going to find with GS that most of your work will be finding ways to get GS to do what you want. It may require making your code much more complicated, but nothing worth doing is ever easy, as they say.
    You might have more success if you say what you are trying to accomplish, as we may have an easier or more direct method of achieving those results.
  • zellhuangzellhuang Member, PRO Posts: 79
    hi @MobileRocketGames ,
    this time when simulator freezed,thx Xcode error info showed message as below:
    < img src="http://m3.img.libdd.com/farm5/9/31EC986E321DA5D01CA05683212E3A09_1020_638.JPEG">

    Any idea why this issue occur?
  • zellhuangzellhuang Member, PRO Posts: 79
    hi @MobileRocketGames
    Thanks for your help.I know how to test on my device and I've already done that.I met the same problem both on my iphone and simulator. I think if there's no problem in simulator,it will be OK on device.That's why I'm testing in simulator.

    One more thing, when my game runs on my iphone 4,(I installed the GS viewer on my iphone and ran the project in the viewer),it takes too much time to load the scene,usually about 1 minutes.But when it runs in simulator on my mac,it only takes 5 seconds to load. I wanna know if my app published (not running in the viewer on device) and will it take 1 minutes to load,too?

    BTW,I have downloaded and watched the tutorials from Tshirtbooths and I've already published an app last year :) Thank you again, man :>
Sign In or Register to comment.