Several doubts

DieganDiegan Member Posts: 55
edited November -1 in Working with GS (Mac)
Hi, i have several small doubts and decided to open just one thread for them :)

1- Using the 'reset scene' behaviour does not reset the values of atributes, right? So if I have events in that scene tied to certain atributes, I should also manually put all those attributes to the values that they should have for that scene to work like it's been reseted, right?

2- What is the 'Interpolate' behaviour commonly used for?

3- I made the Arkanoid type of game in the youtube series that teaches you how to make it. I already have it on my iphone and I have 2 questions:
- A lot of times, the ball bounces and the bounce becomes a straight linear pattern, and there's no way for me to alter that line. If it bounces up and down, I can just make it bounce in a straight line up again with the moving bar, or let it die. And if it becomes a horizontal pattern, it just stayes there, bouncing from one wall to the other, and I the only thing to do is reset the game. How could I make it so it never behaves in that pattern?
- I noticed that if I open the game while holding the iphone in a landscape position, it opens the game in portrait but the wrong way (portrait IN landscape mode, hard to explain and very bad-looking), and I cant correct it. I gotta open the app again while holding the iphone in portrait position. How can I fix this?

Thank you guys.

Comments

  • ChaserChaser Member Posts: 1,453
    1 yes or you can use change scene and go back to that same scene but also change those attributes
    2 typically moving actors, rotating, fading alpha and so on
    3 create some invisible obstacles for it to hit at the outside edges
    Check all your Scenes auto rotation to make sure landscape is not checked or vice versa
  • DieganDiegan Member Posts: 55
    2 - Aren't there behaviours that are specially designed for that? What's the 'added' value of interpolate? Sorry, dont understand what it does.
    3 - Invisible obstacles? how could I without the player noticing it? Isn't there a smarter way? Maybe I dont understand exactly what you mean.
  • ChaserChaser Member Posts: 1,453
    Interpolate does some things better and smoother

    Let's say you place very small invisible round colliding non moving actors at different positions along the edges to keep it from getting stuck in a path. Otherwise I think somebody came up with a collide rule that changed the angle when it hit walls to keep it out of the stuck up down colliding
  • old_kipperold_kipper Member Posts: 1,420
    Interpolate can be thought of as an 'inbetweener' for numbers. If you have 2 values it can increment between them. You have your starting number which can be a current position, a colour value or score, and by 'interpolating' you can get smoothly to a second value. For instance-

    You want to move your actor to a new position based on your player's touch.

    make a rule that says- On player touch 'interpolate' over 1 second my actor's X and Y position to player touch X and Y (using 2 interpolates),

    If you want to fade out an actor to invisible-

    interpolate self colour alpha to 0

    hope that helps.

    kipper
  • DieganDiegan Member Posts: 55
    Sure helps kipper, as always :)

    Wow, that collide rule that changes the angle would be awesome to have, but dunno how to start looking for it... if I search 'Arkanoid' in the forum search, I get nothing of import...
  • old_kipperold_kipper Member Posts: 1,420
    An 'insecure bounce' function cuts out a lot of problems and I would love to have it in here.
  • DieganDiegan Member Posts: 55
    What bould an 'insecure bounce' do exactly?
  • old_kipperold_kipper Member Posts: 1,420
    Bounce at angle close to the correct physics based return but with an amount of random added/subtracted to the angle. It turns up is quite a few games engines under slightly different names.
  • DieganDiegan Member Posts: 55
    So, this 'little' problem has no easy fix in gamesalad, until they implement something like taht? :S
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    For a perfect bounce search for Sphere Trap on the creator. Or you can check the GS ball breaker template that has a way to detect if the ball start to bounce horizontally and fixes that.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
  • DieganDiegan Member Posts: 55
    Wow, Thx!

    When you say 'search in the creator', you mean the free demos that people make available for everybody?
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    When you open open the creator go to the new tab and use the search feature there. SphereTrap was a demo made by CodeMonkey and the ball breaker game is one of the templates that comes free with the creator.

    When you find them just double-click on them and you will be able to open and edit the projects.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
  • DieganDiegan Member Posts: 55
    Thank you! I hope I will learn a lot from them :)
Sign In or Register to comment.