A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Clipping images off screen

  1. #1
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784

    Clipping images off screen

    I'm making a scrolling game with simple images, non tile based. I'm having trouble with the game slowing down at different points. I've tried two approaches

    1) having each graphic be it's own Sprite and when it hits the end of the screen, make it available to be used again for the next graphic. This works ok.

    2) draw all of the graphics onto one Sprite and scroll that sprite. This has obviously problems as very soon this Sprite is very large and begins to slow down.

    What I'm wondering is if there is anywhere to use Bitmap.draw to make it so Flash only has to worry about drawing what is visible on the screen. Can anyone tell me if this is possible and point me in the right direction? Thanks!
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    Drawing everything to a bitmap is absolutely the best way to go and known as blitting. Lee Brimelow has recently started a series of tutorials for using blitting in existing game engines.
    http://gotoandlearn.com/

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center