Help with curved surfaces and collisions

Hey guys,

It's been roughly a week since i've started with GameSalad and I'm happy with what I've seen so far. The numerous templates and forum posts have helped me get my idea of the ground.

I am currently facing a problem with curved surfaces and collisions. While the core mechanic of the game does not rely on curved surfaces, having them in the game will immensely increase its polish. As we are restricted to just Squares and Circles, I have realized that collision-less sprites will make up the main images that the player will see, but invisible collision surfaces have to be implemented.

Is this the right way to go? Also how do I achieve this with just squares (close placement of square edges will take time)? And once I have achieved that, is there any way to duplicate the collision layer across different scenes in the same project?

Answers

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Also how do I achieve this with just squares (close placement of square edges will take time)?
    You wouldn't necessarily have to painstakingly place squares along your path so that their edges precisely align, you could simply plot out small dots spaced along your path, depending on the size of the actor interacting with the curved surface and the nature of that interaction (does the actor need to smoothly roll along the curved surfaces or simply bounce off it, or perhaps the curved surface just prevents the actor from entering an area . . . . ? etc etc).

    Wait a moment and I will make you up a quick project to illustrate what I mean . . . .
    And once I have achieved that, is there any way to duplicate the collision layer across different scenes in the same project?
    Personally I'd try and procedurally generate the curved surfaces with a rule so you need only copy that rule/actor to the next scene.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Take a look at this project:

    http://www.mediafire.com/?ntwtemcrp58gcvo

    Let the balls fall into the 'bowl' then use the white slider at the top (it only moves left and right) to change the size of the blocks making up the 'bowl'.

    Drag it to the left to make them simple collision points - or to the right to make them into a joined up curve - then pick the ball up and roll it down the sides - obviously the more joined up curve will give a smoother roll and the single points will be more bumpy.

    But if your project is a car racing game then you might only need to prevent your cars from leaving the track so single points might be fine . . . ?
Sign In or Register to comment.