Results 1 to 5 of 5

Thread: DrawRotate is slow

  1. #1
    Ebbe
    Guest

    DrawRotate is slow

    I want a 2d car to be able to turn around and drive in all 8 directions, but if I use sprites and DrawRotate, it is very slow.
    The alternative is to have pictures for all 8 directions and then show them when the car is in the right angle and use DrawRotate for the inbetweens..

    But that is alot of code and images. Is there a easier way?


    Ebbe

    PS. I hope people know what I am talking about..

  2. #2

    DrawRotate is slow

    You must change your DXImageList property.
    like this:
    DXImageList.Items[0].SystemMemory:=True;

    PS:
    This is only for your car image,does not for all images.

  3. #3
    Ebbe
    Guest

    DrawRotate is slow

    Great!
    That really helped

  4. #4

    DrawRotate is slow

    The best way of doing this is as follows:

    At the start of your program rotate your car by increments of say 10 degrees (Or as much or little as you want) and store each rotated frame in your imagelist or an array or wherever. Then, when it comes to the main game loop, all you have to do is blit the appropriate image to the surface which is fast. From what I gather from your post you are redoing the rotation at every frame, it's no wonder it's very slow. Hope this helps.
    Isometric game development blog http://isoenginedev.blogspot.com/

  5. #5

    DelphiX: Speed...

    Hi,

    here http://www.micrel.cz/Dx/delphix.exe is simple program for demonstration software and hardware speed difference in DelphiX. Written in Delphi2005 + (un)DelphiX + extender for DelphiX (only two lines code have to added, original code no changed). Extender is tested now and can be it released in short time.

    Any comments welcome.
    Ijcro.

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
  •