Can I make collidables overlap?

I really wasn't sure how to phrase my question. I am working on a side scroller in GameSalad. I want the platform too look more 3D so I have my tile-able art showing 2 sides of the platform: the surface (top) and the side. I want my player to run on the surface of the art as opposed to the boundaries of the actor. My terrain is randomly generating so I can't just set up an invisible platform. Is there a way to do this in GameSalad or am I asking too much?

Also, I would really like it if I could slightly overlap my tiles, but as far as I can tell from other posts, thats not possible in GameSalad. The other question is more important to me though. Any help will be appreciated. Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You could constrain the player actor so that the bottom of it is just below the top edge of the platform actor. Like this:

    image

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

  • dismantledismantle Member Posts: 7
    Yes. That is what I want to do. How do I do that? I am not really seasoned in GameSalad. I see a constrain attribute. From what I have learned so far, I assumed I could just use that to change the player Y position to a negative number. Even -1 moves it under the platform.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If your first game with GameSalad is a pseudo-3D scrolling platformer with randomized terrain, you're in for a considerable challenge.

    The basic idea is this...

    In the platform actor, constrain attribute game.platformX to self.position.X and game.platformY to self.position.Y.

    In the player actor, constrain attribute self.position.X to game.platformY (you may not want to do that, but it's up to you) and self.position.Y to game.platformY+[some number*] (relative to scene, not actor).

    *You'll have to play around with this value. It moves the player actor up from the center of the platform actor.

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

  • tahakitantahakitan Member Posts: 102
    you can always create an invisible actor which is a little lower and have it collide with that. Have it constrain to the image actor. when you jump on it, it looks like you landed on the image. i think it works better because the image doesn't move at all.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's a demo of what I mean.

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

  • dismantledismantle Member Posts: 7
    edited December 2013
    Thank you for the example. For your version, tatiang, will I remove the collide feature then?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    For your version, tatiang, will I remove the collide feature then?
    I think you'd have to.

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

  • dismantledismantle Member Posts: 7
    Taking off the collide screws up my jump and run animations. Also, I copied your constrain information into my project, but it didn't work. The game.platformX code isn't built in like self.position.Y is so I looked at your attributes to see if it was something you added and it was not. I am not sure I follow what you are doing.

    I am kind of interested in this other idea about an invisible box that is constrained to the platform, but if I can't get the constrains to work with this, I doubt I will be able to do that one easily.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The game.platformX/Y attributes I used were attributes of type 'real' that I added.

    And my demo is really just an idea... it's far from a working model of a platformer game. You may want to try a constrained box instead and use that for your collide behavior.

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

  • natzuurnatzuur Member Posts: 304
    Why can't you generate seperate invisible colliders on a randomly generated game? Generate the colliders to match the piece of terrain you generated.
  • dismantledismantle Member Posts: 7
    Oh I see them now. I was looking in the actors' attributes. Thank you. I will do my best to see if I can get it to work in my project. Thank you both for responding and helping a newbie.

    My forte is graphic design so this is just a new thing for me.
  • dismantledismantle Member Posts: 7
    Okay. I got it to work. I constrained an invisible actor to the ground and it looks good, but now the character won't fall in the holes.
  • dismantledismantle Member Posts: 7
    edited December 2013
    Okay I figured out why it was blocking me from falling. I accidentally took the invisible floor and constrained position x to game.platformX AND self.position.Y - I removed self.position.Y and the invisible floor is not repeating to cover all the platform.

    Also wondering if I need to run a delete to remove the invisible actor as it leaves the screen.

    Also, constraining the player to the platform overrides the gravity of the player falling.
  • dismantledismantle Member Posts: 7
    Any new advice?
  • SocksSocks London, UK.Member Posts: 12,822
    Also wondering if I need to run a delete to remove the invisible actor as it leaves the screen.
    Just stick an object off screen that collects any objects that move off screen that you don't need any more (let's call it the GameHoover) . . . . then just place a rule into your invisible actor that says when actor collides with GameHoover then destroy this actor.
Sign In or Register to comment.