Grid or other solution? Whats the best?

Hello,

Im using an interpolate to make my inventory move to scene.
Im woundering whats the best solution to make the game optimized as much as possible.

Should I use constrain attribute x y of the inventory or how should I make the slots follow the inventory?
I want them to be on place moving with the inventory when its on scene.

Comments

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236
    edited February 2016

    What does "move to scene" mean? Like follow the camera? Can't you put your UI on a non scrollable layer?

  • KIIVIINKIIVIIN Member Posts: 159

    @owen_dennis said:
    What does "move to scene" mean? Like follow the camera? Can't you put your UI on a non scrollable layer?

    What I ment is that when inventory is true it move on scene (on to camera).
    I want the slots to be on position of the inventory. Right now the picture show the inventory "out of the scene" on a non scrollable layer yes.

  • KIIVIINKIIVIIN Member Posts: 159

    Right now I got the slots "interpolate" to the scene on the correct y position of the inventory. But I wounder if there is an other better solution

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If you want to move the inventory actors onto the scene then, yes, use Interpolate.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • KIIVIINKIIVIIN Member Posts: 159

    @tatiang said:
    If you want to move the inventory actors onto the scene then, yes, use Interpolate.

    But I got an inventory "background" with the empty squares.
    On top of each square I got 30 actors (slots).

    I want them to move with the background inventory to the scene.
    At the moment I made it like each slot is interpolated but I want to know if there is a better way to do it. Else I keep it like that

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Use the pause option. I show you how in the videos I did on inventory. Then you don't need all that interpolate stuff.

  • KIIVIINKIIVIIN Member Posts: 159

    @Lost_Oasis_Games said:
    Use the pause option. I show you how in the videos I did on inventory. Then you don't need all that interpolate stuff.

    I did your type of pause game with the inventory. I also use a stack items loop solution to stack my items. Issue I have is that when I sometimes open the inventory the items dont appear in the inventory as I clicked them before to go there. I think that the pause game somehow interupt the logic. Can that be true?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Could be. You need to be sure you stack your logic in the proper order. Logic is a linear thing. Logic is fired in gamesalad in an actor top to bottom. Look at your logic and be sure it is in proper order of execution. You can always delay the pause by a couple code cycles to allow things time to fire off so try putting the pause in a (after .3 seconds timer) all the code is scanned every .03 seconds in a linear fashion 1.2.3.4 et... I really recommend you watch my GSLogic series. Take some time to watch this series will really help you logic coding in gamesalad and empower you to understand what is really going on.

Sign In or Register to comment.