Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Creating Background so player can climb run up.. ect

darrelljr00darrelljr00 Member Posts: 2
edited November -1 in Working with GS (Mac)
I dont know if Im saying this right. But How do I use a jpg or png as a background for my game? Also If i make a layer that is a hill or a rock ect, how do I make it so that the player can climb on top of it or jump over it? Im a complete newbie and dont have a clue..


  • Fafnir312Fafnir312 Member Posts: 161
    You'll want to look at the example games and on the wiki to learn how collision works. What I'm doing on my game ( is creating level elements such as grass and hills as separate actors then creating invisible actors below them for the player to collide with and run on. I'm using a mixture of rectangle collision and circle collision (for roundish parts like the tops of hills).

    I hope that helps.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Welcome darrelljr00,
    Once you have the image you want for your background just create an actor and give it that image.

    For different actors your player can climb on, it might be easier to give them a tag so your actor can just have one Collide behavior( ) and reference that tag.
  • ChirpinGamesChirpinGames Member, PRO Posts: 214
    Hey Fafnir312, this example is great just wondering how you managed to get the character to walk up a slope... do you change something upon collision of a diagonal plane?
    Has anyone else managed to achieve something like this?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    You don't have to have any special rules. If you have gravity in the scene and an actor with accelerate movements it will just accelerate up the angled "hill" actor (assuming that gravity isn't too strong).

    You just need to tell the moving actor to collide with the hill actor.
  • ChirpinGamesChirpinGames Member, PRO Posts: 214
    Oh ok thanks. Yeah i must have the gravity set to high.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    friction will come into play as well.
This discussion has been closed.