Hill Climbing in Side-Scolling Platformers

Game Editor comments and discussion.

Hill Climbing in Side-Scolling Platformers

Postby Turon » Tue May 27, 2014 6:19 pm

I do not recall seeing any game editor made platformers that allow you to climb uneven surfaces akin to those found in Sonic the Hedgehog and Kirby's Adventure and New Super Mario Bros. Wii. Is it possible? It sure wouldn't use a normal collision system to make it work would it?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby lcl » Tue May 27, 2014 7:55 pm

Of course it is possible. It's just a matter of how you manage your movement. One way could be to somehow make the character notice that it's climbing a hill and use an alternate movement code at those times.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Turon » Wed May 28, 2014 4:20 pm

And how would the system desern between steep walls from slopes?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby lcl » Wed May 28, 2014 6:19 pm

You'd have to think of a way to do that. You could use different actors for slopes and walls, or you could make the actor check two points ahead of it, with same x coordinate and different y coordinate, to find out the shape. What I mean with this is better explained via a picture:

slopeOrWall.png
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Turon » Wed May 28, 2014 7:25 pm

Thanks I think that might help :) .
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Hblade » Thu May 29, 2014 9:23 pm

There's a simpler way to do something similar. That's to have a collision actor, with 1 pixel width from the bottom, and it gets wider at the top (Almost like a diamond) but instead of sharp edges on left and right sides, make it look more like a spin-top. This will allow you to prettymuch stand on the surfaces like that without sliding that much :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Turon » Fri May 30, 2014 9:33 am

So if you just collide with the top side of the ground then it is a slope and if your colliding with the right side of the ground then its a cliff?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Hblade » Fri May 30, 2014 3:38 pm

Sort of. Are you talking about that sticky-effect when you collide into a wall?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Turon » Sun Jun 01, 2014 8:48 am

Sticky Effect?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Hblade » Sun Jun 01, 2014 12:29 pm

Yeah, where if you walk into a wall while jumping he'll stick to it.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby speckford123 » Sat Jun 07, 2014 9:59 pm

Hblade wrote:Yeah, where if you walk into a wall while jumping he'll stick to it.

is there an easy way to fix that?
I always created custom variables yvel and xvel that I used in place of yvelocity and xvelocity so that physical responses wouldn't change them.
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby NightOfHorror » Sun Jun 08, 2014 12:17 am

Hey Speck, long time no see, anything going on with you?
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby skydereign » Sun Jun 08, 2014 3:37 am

speckford123 wrote:
Hblade wrote:Yeah, where if you walk into a wall while jumping he'll stick to it.

is there an easy way to fix that?
I always created custom variables yvel and xvel that I used in place of yvelocity and xvelocity so that physical responses wouldn't change them.

Well you can do that with temporary variables instead of completely replacing them with xvel and yvel.
Code: Select all
double yvel = yvelocity;
// PhysicalResponse here
yvelocity = yvel;

But otherwise no, if you are using PhysicalResponse you'll need to somehow store the previous velocity to prevent sticking.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Hill Climbing in Side-Scolling Platformers

Postby Zivouhr » Tue Jun 17, 2014 1:48 am

Another way is to have a tile for walking, and a tile for steps made separately, using 45 degree angles and so on. The steps, when collided with the player, could have a physical response 1, 1, 0, 1 or so on, so the player doesn't fall through, and then add for any side of the steps/slope, a yvelocity-=2; That will make the player's normal physics yvelocity++; or yvelocity+=1.5; be able to overcome the gravity and allow the player to climb up steeper angled slopes or stairs. Minus equals UP, plus equals down for Yvelocities.

There is also a demo of Game Editor, that uses double yvel = yvelocity; that Skydereign mentions, which is also great for preventing players from jumping up the sides of walls/tiles.
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest