about looping BG or other design elements

JaxterJaxter Member, PRO Posts: 398
edited November -1 in Working with GS (Mac)
How is possible to loop some elemts in game. for example: http://gamesalad.com/game/play/5734 here is sand ( about 1000pix long yellow slide) but it is ending after 5 min gameplay.. are here some solutions.. ?

Comments

  • CorellaCorella Member Posts: 37
    One possibility might be to break the sand texture/object into smaller seamless segments, and set a timer somewhere for 'every (how long it takes to cross the screen)-seconds' spawn a new actor outside the camera view which then moves across at the same speed. You may need to work a bit to get the timing right.

    There may well be other more efficient solutions, just my thoughts.
  • JaxterJaxter Member, PRO Posts: 398
    tnx but i am waiting for more solutions .. ( maybe make some simple animation in FLASH , then export to image sequnce and tjhen export all samples.. but it will cost some MB of game.. is i am right?
  • CorellaCorella Member Posts: 37
    Yes, thats also a viable idea, heres an example of what I am imagining from your description:
    http://i289.photobucket.com/albums/ll232/Magicraoul/sanddemo.gif

    My worry with this approach is that although it is simpler to set up, and it runs fine... even that sample is about 30 jpegs made into that gif, so yes, I'd say MB would be an issue. Also even more images would be needed to make a nice 'smooth' flow, rather than the rather jittery result I got. I really don't know enough about the weigh off between loads of images, or constantly spawning new instances...
  • JaxterJaxter Member, PRO Posts: 398
    nice.. But gamesalad must think about this solution in future.. because flash cs5 will does it easy
  • JaxterJaxter Member, PRO Posts: 398
    It was great if was possible to load .swf files in game salad ( of course with alpha channal)
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    If you have your scene wrap on the X axis, and stretch the scene size to the size of the sand image, then give the sand actor a move behavior.
  • JaxterJaxter Member, PRO Posts: 398
    did not get your idea - CodeMonkey
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    In the Scene Attributes ( http://gamesalad.com/wiki/scene_attributes ), change the Size.Width to the same width as your sand actor. Also change the Wrap X boolean attribute to true.

    Give your sand actor a move behavior to move left. The sand will then 'loop'

    You may need to adjust when actors are destroyed though.
Sign In or Register to comment.