Stunt Squirrels! now working 100% in 0.81

firemaplegamesfiremaplegames Member Posts: 3,211
edited November -1 in Announce Your Game!
Hey,

So I retooled Stunt Squirrels! and finally got it working 100% again. The web version has been updated.

My main issue was my "Scene Controller" Actor.

This Actor Instance sits just offscreen and resets the level Attributes. Stuff like:

Change Attribute:
game.currentLevel = 1

Change Attribute:
game.bombCount = 10

Change Attribute:
game.gameOver = false

etc...

It would reset everything as well as set the specifics for that level.

This worked fine before, but with the new speed increase, the other Actors in the Scene would act before getting this information.

For instance, one Actor in the Scene would instantly think that game.bombCount is 0 (because that is what is was when the previous level ended) and would trigger Game Over.

I just had to move stuff around and lock stuff down. Similar to what I had to do in Danger Cats!.

Thanks to the GS team for working so hard to improve this already great product!

Joe
Fire Maple Games

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    It would be great to have some tips from GS for how to handle this switch. Like what does it mean to "lock stuff down"? I know this is not GS saying this, but I am apprehensive about making the switch and would love to have some specific direction from GS in the wiki.
  • SlowboySlowboy Member, PRO Posts: 329
    It is beggining to look more and more like the speed increase, which, of course, we all wanted, is the very thing that is tripping us up right now! I have some similar Actors, FM, and it is also looking to me like things are getting ahead of themselves and getting the wrong information, too soon.
    I agree with Sci that some tips on how to reconfigure things, from the GS team would be nice, but, let's be honest Sci, we're a strange bunch, present company most definitely INcluded, and I doubt that the GS guys would ever be able to second guess all the bizarre ways that we try and get GS to work for us and do what we want it to do!
    So FM, I understand it's a pain to explain fully, but would you mind telling us roughly what kinds of things you had to change? I mean, in your example above...

    Change Attribute:
    game.currentLevel = 1

    Change Attribute:
    game.bombCount = 10

    ....what do these rules look like now, in yer working 8.1 version??
    Thanks
    Wayne
  • rebumprebump Member Posts: 1,058
    My "Scene Controller" does the same sort of scene setup and it controls a game attribute called "SceneSetupComplete" (or thereabouts) that is "false" upon scene entry. When the scene controller is done, it sets it to "true".

    Then all my actors have one rule that encompasses all other rules/behaviors that tests for "SceneSetupComplete" to be true (i.e. before doing its stuff). Works fine for me. You could add some custom pause conditions here too if you weren't doing the seperate pause scene method.

    I had to implement this in 0.7.0 as my actors were trying to use values that the scene controller was still setting or hadn't set yet. Sounds like what FMG had to do for 0.8.1.

    Maybe that is what he meant by "lock stuff down".

    I have a similar "ActorSetupComplete" inside each actor too for similar purposes (on some).
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Well, firstly, don't rely on behaviors to work from the top down...

    I used to have something like this:

    Rule
    When TOUCH is PRESSED
    Play Sound "Goodbye!"
    Destroy Actor

    This no longer works. Destroy fires first and the sound never plays.

    I had to do this:

    Create a Boolean called "destroyMe"

    Rule
    When TOUCH is PRESSED
    Play Sound "Goodbye!"
    Change Attribute self.destroyMe to TRUE

    Rule
    When self.destroyMe = TRUE
    Destroy Actor

    This now works. I had to separate them and make sure each behavior fires only when I want it to.
    Instead of just stacking them on top of each other, I had to 'chain' them together with Rules so to speak.

    Also, the whole project is probably not all messed up, just some actors here and there.
    Just take a deep breath and tackle them one by one.

    In the end, it's just sloppy stuff we were relying on. The speed increase is worth the additional effort.

    Also, going forward with this beta software, some things will definitely be rethought and reworked on GS's part, and we're bound to run into issues like this again...

    Joe
  • rebumprebump Member Posts: 1,058
    Yeah, the devs mentioned in a post somewhere that the rules of an actor on any given level in the rules/behavior section will be executed willy-nilly but most of the time from top down. Basically stating that you cannot count on the order of execution of the rules/behaviors unless you controll them with additional rules/timers to force the order based on logic/time.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, rebump, that is what I meant by lock down!

    I should have done that from the beginning, but I was being lazy, and it worked...
  • ORBZORBZ Member Posts: 1,304
    I've noticed that the scene layer order is executed from the bottom up. That is the same in 0.7.0 and 0.8.x. That is how I am able to have my scene controller complete before my other actors use any data manipulated by the scene controller without relying on flags.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    oh, that's interesting! good to know!
Sign In or Register to comment.