Saturday 29 March 2008

creating a platform game in as3 part 5

Welcome back, At the end of the last tutorial i wondered what would happen if we had a platform that you could jump underneath from.





As you can see, i have made the map a lot more complicated, and the simulation runs quite accurately until you go under the overhang on the left side. Where you can jump through the bottom of that platform. Lets change that.

We need to add a hit detection for when the top of the character hits the bottom of the land.



Ok, now you can't jump up through platform bottoms, but if you jump sideways into the hovering platform, you float down.

I will think on this matter for the next step in the tutorial.

6 comments:

Anonymous said...

This is really cool. I'm looking forward to seeing this go further with collectibles and levels.

Thank you! :D

- Josh

Will said...

why not give the character a hitbox, rather than make arts of him/it collision detecting?

tudway said...

What do you mean william? i'm sorry, i don't understand what you're saying.

Anonymous said...

I love your blog. Very nice tutorials.

Looking forward to more.

Anonymous said...

Hello! I am creating a flash game, and was wondering about how you did the camera follow option. You have a value of 250 - hero.height I believe? Or something like that. I have made my tiles 40x40 instead of 25 x 25 and was wondering if you knew how I could get the camera to centre back on the player?

Cheers!

Anonymous said...

Hey Tudway! I know you might no longer be active with this blog but THANK YOU SO MUCH. One of the few and awesome tutorials I've read about platform gaming in AS3 that doesnt require one to know OOP!

Again, I'm abit sad that you're no longer active here. But anyway, thanks again!