Vertical spawned images are not displaying fully on the scene in a universal game

natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243
edited October 2014 in Working with GS (Mac)

I am currently building a universal game where the images are being spawned from the top to the bottom at random times.

Question 1

What position should the actors be set at so that the images are displayed fully on the screen for a universal app? Currently they are displaying on the edges and only half an image is showing and some are not showing at all.

I have square actors (rubbish) set at
random(-10,350)

I have rectangle actors (rubbish) set at
random(-5,350)

Question 2

The hero (dolphin) can go to the bottom of the screen and reappear at the top. How do I stop the hero actor from doing so?

Question 3

If I want the spawning actors (rubbish) to settle at the bottom of the scene and build up. Is there a way that I can do that? I would also like the game to end when the pile of actors (rubbish) gets too high.

Currently the actors are moving off the scene and re-spawning. If the hero (dolphin) collides with the actor they will lose a life. I have put in the game things to collect so that they can gain a life and remove all of the rubbish.

Thanks for your assistance

regards
natalie

Nat Clarke
Life Cleansing

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @natclarke said:
    What position should the actors be set at so that the images are displayed fully on the screen for a universal app? Currently they are displaying on the edges and only half an image is showing and some are not showing at all.

    They would need to be at least half their width/height away from the edges of the target device's screen.

    @natclarke said:
    I have square actors (rubbish) set at
    random(-10,350)

    I have rectangle actors (rubbish) set at
    random(-5,350)

    Setting anything at less than zero (-10 and -5) will mean they are not fully on the screen.

    @natclarke said:
    The hero (dolphin) can go to the bottom of the screen and reappear at the top. How do I stop the hero actor from doing so?

    Stick something in the way ! Use an actor as a barrier to prevent him from leaving the bottom of the screen.

    @natclarke said:
    If I want the spawning actors (rubbish) to settle at the bottom of the scene and build up. Is there a way that I can do that? I would also like the game to end when the pile of actors (rubbish) gets too high.

    Sink the rubbish using accelerate set at 270° (relative to scene), have the rubbish collide with itself, and make sure you have a suitably shaped barrier at the bottom to catch the rubbish.

    Example: https://www.mediafire.com/?t7u67a5la68bkca

  • natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243

    Thank you. This is awesome.

    If the rubbish fills up a section. Say 1/4 of the scene at the bottom. How could you get the game to end?

    cheers
    Natalie

    Nat Clarke
    Life Cleansing

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @natclarke said:
    Thank you. This is awesome.

    If the rubbish fills up a section. Say 1/4 of the scene at the bottom. How could you get the game to end?

    The real question is how do you detect when the rubbish fills up the section rather that how do you get the game to end . . . I'd guess you would have to come up with a way to detect the level of rubbish, maybe every so often drop an actor from the top of the screen and see how long it takes to hit the accumulated rubbish . . . or simply count the number of rubbish actors that have settled (without knowing your game I'd guess that would be how many have been spawned but not successfully intercepted) . . . or maybe have a large 'detector' actor that covers the lower part of the scene and when an actor overlaps with it change a count to that count+1, then when the count goes over a certain amount you can end the game . . . etc etc.

  • natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243

    Thanks. I will do that. How do I make the rubbish settle at the bottom and not bounce all over the place. I have the rubbish coming in at random times so there is only two or three rubbish actors on the screen at the same time

    Nat Clarke
    Life Cleansing

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @natclarke said:
    Thanks. I will do that. How do I make the rubbish settle at the bottom and not bounce all over the place.

    I don't know how familiar you are with GameSalad, but actors have a bunch of parameters (attributes) that you can play around with which cause actors to behave in different ways, in the actor's attributes, under physics, you will see a field for 'bounciness', adjust to taste.

    Remember to adjust not just the actor's bounciness, but also the bounciness of the thing it is colliding with . . . it's no good making an object solid lead to dampen its bounciness if the walls are still made from rubber !

    I'd start with both the actor and the wall (the barrier) set to 0.2 bounciness.

    @natclarke said:
    I have the rubbish coming in at random times so there is only two or three rubbish actors on the screen at the same time

    Weird.

  • natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243

    Thanks for all your help. All done. Very much appreciated.

    Nat Clarke
    Life Cleansing

Sign In or Register to comment.