Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: help with Bitblt plz someone tht also knows vb lol.

  1. #11

    help with Bitblt plz someone tht also knows vb lol.

    or you put your proc in either private or public and then press CTRL+SHIFT+C. I dunno if this works with all versions of Delphi.
    Ask me about the xcess game development kit

  2. #12

    help with Bitblt plz someone tht also knows vb lol.

    Im still kind of boggled here... im already loading the bitmaps into TBitMap so ur saying im loading into TBitMap then Swapping them to another TBitMap and then finally Blitting to the paintbox.
    Weeeeeeee!!!!!!!

  3. #13

    help with Bitblt plz someone tht also knows vb lol.

    Yep, that's what I'm saying. The concept is called "double buffering" which means that you essentially prepare your "scene" in memory and then when all drawing is completed you "flip" it onto the actual canvas or front buffer. This concept is especially effective when dealing with video memory because "flipping" can be done extremely fast.
    The method using TBitmaps is obviously much slower because it works in system memory but it will still prevent flickering quite well.
    Ask me about the xcess game development kit

  4. #14

    help with Bitblt plz someone tht also knows vb lol.

    hmmm well it looks like my only choice your first suggestion did the same as using Repaint method before blitting so i guess ill try the second one and pray :lol:
    Weeeeeeee!!!!!!!

  5. #15

    help with Bitblt plz someone tht also knows vb lol.

    I think it might be tactics to explain the DoubleBuffered = true line... basically, that enables double-buffering in the OnPaint method of the TWinControl in which it's set. It creates a memory DC and calls the paint event for the specified control using that instead of the normal canvas. You ought to not get any flickering with it in there - if you do, that'd surprise me. But that's why I suggested stuff should be done in OnPaint if you do DoubleBuffered = true;

    So, you can do double-buffering by hand with TBitmaps if you want, or you could just use one line of code and be lazy. Of course, though, it's a good idea to use manual double buffering using TBitmaps if you want to update without refreshing the control.
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  6. #16

    help with Bitblt plz someone tht also knows vb lol.

    Yay hey no flicker :lol:
    Weeeeeeee!!!!!!!

  7. #17

    help with Bitblt plz someone tht also knows vb lol.

    hmm it seems to move really slow considering im minusing for going left by 1 would that have something to do with the PixelsPerInch property?
    Weeeeeeee!!!!!!!

  8. #18

    help with Bitblt plz someone tht also knows vb lol.

    Congrats! It's always a good feeling the first time you manage to squish the flicker!

    Now go program something cool and show it off to us!
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  9. #19

    help with Bitblt plz someone tht also knows vb lol.

    Quote Originally Posted by NaXeM
    hmm it seems to move really slow considering im minusing for going left by 1 would that have something to do with the PixelsPerInch property?
    How often do you update the animation? Just based on keypresses or something else (a timer?)?
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  10. #20

    help with Bitblt plz someone tht also knows vb lol.

    LOL yeah i remember this bugged me for so long in VB :evil:

    I also turned TBitMap for sprite Transparency color to black and to True and removed using the mask id assume this will speed things up if more is added to it

    EDIT: I update when necessary like only when something changes thats how i always do things.
    Weeeeeeee!!!!!!!

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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