• Home
tudwaythecore.com
blog
  • Recent Posts

    • Detecting focus in flash player
    • BitmapData PerlinNoise
    • Creating bridges in APE part 2
    • Creating bridges in APE
    • SteerWheels 2
    • Creating a simple APE example
    • Design me some levels!
    • Finished Migrating
  • Recent Comments

    • random on Making a Shooting Game Part 2
    • SammyG on Making a Shooting Game Part 2
    • Jim on Making a Shooting Game Part 2
    • rraven on Making a Shooting Game Part 2
    • Adrian on Making a Shooting Game Part 2
  • Categories

    • APE
    • flash
    • game
    • platform
    • sound
    • tutorial
    • Uncategorized
  • Archives

    • May 2009
    • October 2008
    • September 2008
    • August 2008
    • May 2008
    • April 2008
    • March 2008
  •  

    March 2008
    M T W T F S S
        Apr »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  
  • games

    • Game Showcase
Mar 29

creating a platform game in as3 part 5

flash, game, platform, tutorial Add comments

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.

17 Responses to “creating a platform game in as3 part 5”

  1. Josh of Pixelton Says:
    April 1st, 2008 at 9:57 pm

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

    Thank you! :D

    - Josh

  2. William Says:
    April 4th, 2008 at 1:13 am

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

  3. tudway Says:
    April 4th, 2008 at 8:12 pm

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

  4. EagleVision Says:
    April 6th, 2008 at 10:06 pm

    I love your blog. Very nice tutorials.

    Looking forward to more.

  5. the guy that commented on tudway experimental Says:
    August 27th, 2008 at 2:11 pm

    Coolio! I looked at your other site and commented. Cool new site. Im looking forward to the ape tutorial remember! :)

  6. Mr. Munky Says:
    September 28th, 2008 at 8:17 pm

    So uhh. Where’s the code example of the collision detection on the bottom? I cant figure it out myself. Pls help man. Your tutorials are great btw.

  7. tudway Says:
    September 28th, 2008 at 9:55 pm

    It will be out shortly, i am currently working on some server side script which is taking up a lot of my free time. I will get this done soon.

  8. Mr. Munky Says:
    September 28th, 2008 at 10:04 pm

    Great, thanks a lot bud! :)

  9. Mr. Munky Says:
    September 28th, 2008 at 10:06 pm

    Actually, I have a somewhat ghetto-rigged way of handling this… Hoping it’s something like what you’re doing:

    if (bg.hitTestPoint(block.nextx, block.nexty – (block.height / 2), true)) {
    velocity = Math.abs(velocity);
    }

    bg is my background clip with ground and obstacles in it.

  10. tudway Says:
    September 29th, 2008 at 6:49 am

    i think that is virtually how my code went, but i have 2 hittests, one for each corner of the box. when a hit is detected i just set the velocity to 0. I have lost the original files, so i will have to rebuild it.

  11. dek Says:
    October 21st, 2008 at 11:55 pm

    hey this is a great tutorial. So how can I make the box jump faster?

  12. tudway Says:
    October 22nd, 2008 at 5:37 pm

    just change the”velocity = -5″ to a lower number.

    if (attemptJump==true) {
    char.y–;
    velocity =-10;
    }

  13. Bruno Says:
    June 7th, 2009 at 2:29 pm

    This is THE TUTORIAL!
    Over the internet there are only tutorials for this kind of game in AS2.0
    And u explain really good!
    Where is the code of the step #5 and the explanation? I cant find?
    And have u already released the correction for not lifting within the walls ?
    I am looking forward to that!
    CONGRATS!!!

  14. tudway Says:
    June 8th, 2009 at 5:11 pm

    I never got round to putting the code up on the site because of the floating glitch. I am currently busy with other projects but i will fix the code as soon as i can!

    Check out some of the other tutorials while your waiting :)

  15. Ax Says:
    July 10th, 2009 at 3:31 am

    Can some one give me a link to part 1 I can not seem to find it. Thanks

  16. Ax Says:
    July 10th, 2009 at 4:13 am

    nevermind I found it :)

  17. Andy Says:
    September 10th, 2009 at 9:54 am

    hi there, I was wondering of you had managed to fix the going through platform bottoms bug? I have created some floating platforms and my guy goes through the bottom of them.

    Thanks!

    Andy (moogle001)

Leave a Reply

Powered by WordPress .::. Designed by SiteGround Web Hosting

cssandhtml