The Daily Click ::. Downloads ::. Tutorial ::. Simple slopes in 2.5D example

Simple slopes in 2.5D example
Author: Spitznagl Submitted: 1st July, 2009 Favourites:1
Genre: Tutorial Downloads: 534

Edited By Spitznagl on 7/1/2009

I decided to upload this example because of this thread.

Anyone his free to use this engine, even if only for the slope part.

Creating a slope engine isn't complex at all. You just need to put the events in the right order. But the difference with this one, compared to others I've seen here, lies in the speed at wich you climb those slopes. Normaly, people just add a vertical movement, but this means climbing about 41% faster then when walking straight. 0_o

So that's why you need to compensate on the horizontal movement. For this, you need to carry on the horizontal and vertical position of your object, calculate the angle of the movement and increase or decrease the number of loops from your "horizontal loop" accordingly.

2.5D part
This part his only a test, with no collision detection coded yet, but the visual part does works. It seems to be the simplest way to do it.

Version 1.2
I added rotation to the sprite and the jumps are now affected by the slope angle.

Review This Download in 2.5D version1.2.rar (391 kkb )

Posted by UrbanMonk 1st July, 2009

Posted by MBK 1st July, 2009
Rated :

Fan flippin' Tastic! ... Thank You!

Posted by Spitznagl 1st July, 2009

@MBK: I'm glad I could help & thanks for the points
Posted by MBK 1st July, 2009
Rated :

You're way beyond welcome.
This is pure genius.
And you commented it too?

Hope you throw another one my way when you add in
collision detections and extras.
I can't get over how straightforward it is.

Posted by Spitznagl 1st July, 2009

Just added rotation to the sprite and the jumps direction now depends on the slope angle.
For the collision detection, I can probably find time in a couple of weeks.
Comment edited by Spitznagl on 7/1/2009
Posted by -Nick- 1st July, 2009
Rated :

Now someone make an Excitebike kind of game
Posted by Spitznagl 1st July, 2009

I'll do it!
Posted by erghhhhx 1st July, 2009
Rated :

Clever stuff!
Posted by MBK 2nd July, 2009
Rated :

I forget, did Excitebike have Sonic style loops in it?

I've only been thinking of beatemups and what has and has not been done in them, but some of the things that were never done in the oldschool beatemups have apparently been done in other styles of games. I completely forgot about Excitebike .. that was such an awesome game too.
Neat tricks like slopes and platforms in 2.5d have alot of interesting uses and extra potential that I've not even considered.

Good Luck on the Excitebike game Spitz (mind if I call you Spitz?), can't wait to see it in action!
Excitebike would make an incredibly fun highscore online arcade game!

Posted by Cecilectomy 4th July, 2009

"I forget, did Excitebike have Sonic style loops in it?"

no but there was a game for the gameboy called motocross maniacs that had loops.

Posted by MBK 5th July, 2009
Rated :

Kewl! .. that's right! ... Forgot about that game too ... now that's a game I wish I had ... you know I still have the old green screened gameboy? .. lol, crazy eh? Yea, it's collecting dust, but it still worked the last time I checked. Heeeyy .. is there a GameBoy emulator? .. I'd love to play that game again.

Motocross Maniacs was only 2d though, but it was fun too. Spitz, you out there? .. maybe you could make a combo of Excitebike and Motocross Maniacs?
Hell, maybe I'll try to if you don't, once I get everything working in this silly 2.5d code that is.

Posted by Spitznagl 5th July, 2009

I'll have to try out motocross maniacs first to see.
As for emulating GB games, any GBAvance emulator should do. VisualBoyAdvance is a good one.





Worth A Click