Results 1 to 11 of 11

Thread: Platform Game

  1. #1

    Platform Game

    Hey people...

    Im just after some ideas as im currently working on a platform game but im running into some problems. Im using bitmapData and an Array to draw the map where 1 = wall, and 0 = blank space. This works great and my hero collides with 'tilespace' by determining the next tile he will be on yada yada, but how will i go about elevators, as they are moving!... I thought about using a movieclip but i would prefer to drop them all together as bitmapData is faster.

    ty

  2. #2
    I think you can hitTest BitmapData. I'll check this to be sure...
    Bruno Palermo
    When everything is catastrophic, thank the Gods things aren't worse!

  3. #3
    well thats great, so i should create a new bitmapData for every elevator?

  4. #4
    No. You'd have to attach them to MC to get them to show on screen anyway. You could just perform standard MC hittesting with the said MCs. Of course every elevator must have a MC, but you'll attach the same BitmapData to all of them.

    //Edit: It's good to highlight that I never actually tried this, it just sounds logical to me based on what I know about MCs and BitmapData, but I may be completely wrong. Still, I guess it's worth checking.
    Last edited by bpalermo; June 5th, 2008 at 12:03 PM.
    Bruno Palermo
    When everything is catastrophic, thank the Gods things aren't worse!

  5. #5
    BitmapData can use hitTest with another BitmapData object only, and at pixel level...During rendering, BitmapData is mostly used to generate non-Interactive stuff, Like tiled backgrounds and layer design.Since its just a copy, or, umm, screenshot of a mc...
    MY BLOG

    I need a SPRITER who can do pixel arts for an arcade fighter project. If you can help out, please pm me.
    I also need someone who can write simple xml files.


  6. #6
    Quote Originally Posted by bluemagica View Post
    BitmapData can use hitTest with another BitmapData object only, and at pixel level...During rendering, BitmapData is mostly used to generate non-Interactive stuff, Like tiled backgrounds and layer design.Since its just a copy, or, umm, screenshot of a mc...
    I use BMD (BitmapData) hittest for my platformer, you can hittest it with MC's or other images fine. It's a bit faster than mc's hittest therefore the best option for pixel-level collision.

  7. #7
    Quote Originally Posted by substance View Post
    I use BMD (BitmapData) hittest for my platformer, you can hittest it with MC's or other images fine. It's a bit faster than mc's hittest therefore the best option for pixel-level collision.
    interesting! Can i see your coding to understand the implementation?
    MY BLOG

    I need a SPRITER who can do pixel arts for an arcade fighter project. If you can help out, please pm me.
    I also need someone who can write simple xml files.


  8. #8
    array map is the simple solve this problem of platform game [i think ]

    http://www.tonypa.pri.ee/tbw/

  9. #9
    Yep. It is TUNCAYS, but he needs it to moving objects. Array map is not really an option for those.
    Bruno Palermo
    When everything is catastrophic, thank the Gods things aren't worse!

  10. #10
    Quote Originally Posted by bluemagica View Post
    interesting! Can i see your coding to understand the implementation?
    Hmm, it's pretty simple. Something like:

    PHP Code:
    if (background.hitTest(new Point(0,0),0xFF,new Point(hero.feet.x,hero.feet.y)))
    {
    //hero is touching background

    'background' being a BMD object that is essentialy the game's stage saved out as a .png.

  11. #11
    Quote Originally Posted by Krabex View Post
    Hey people...

    Im just after some ideas as im currently working on a platform game but im running into some problems. Im using bitmapData and an Array to draw the map where 1 = wall, and 0 = blank space. This works great and my hero collides with 'tilespace' by determining the next tile he will be on yada yada, but how will i go about elevators, as they are moving!... I thought about using a movieclip but i would prefer to drop them all together as bitmapData is faster.

    ty
    Yes, i think so.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012