Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Using multiple surfaces

  1. #21

    Using multiple surfaces

    Well. in my case it screws the structure of my code a little bit up, as I have to initialize my static playfield-frame somewhere else.

    Unfortunatley, LoadFromGraphic-Method is not applicable, as I have split the frame into 4 pieces to save space.

    I guess an Init-Flag in the Timer-Event will do the job as well.

  2. #22

    Using multiple surfaces

    I got 4700 in 8 bit without recompile.
    1300 in 16 bit with recompile - Delphi 4
    1100 in 32 bit with recompile - Delphi 4

    Although I'm not sure this method would be so useful when it comes to animating and scrolling since all tiles would need a redraw (All/Some depending on whether you used a dirty rectangles method). I've quite enjoyed this little experiment and shall bear you guys in mind when my latest project gets to the open testing stage.
    Isometric game development blog http://isoenginedev.blogspot.com/

  3. #23

    Using multiple surfaces

    I handle animation by, at start up, drawing each animation frame to a different surface.
    eg: Something like GroundSurfaces: array[0..2] of TDirectDrawSurface.

    So, if you have a FrameIndex variable like you normally would, you just use that value to get the proper surface.
    This way you never have to loop through all the tiles again, which is the main fps killer. Normally, the only Surfaces that would need to be redrawn will be those with tiles, sprites, etc that move around, but if you only have around 10 moving sprites, thats a hell of a lot quicker to loop through then a 100x100xEachLayer tile map everyframe.

    And of course, animation would also have to be timebased, lol at 1000+ fps the animation might be little too fast

    and don't forget to clip the drawing to the screen WxH with something like:
    Draw(0,0,rect(offx,offy,screenW+offx,screenH+offy) , Surface, true);
    no point in drawing what you can't see

  4. #24

    Using multiple surfaces

    Hi,

    I would be really interested in this source code, but the file on zupload has expired. Could you guys re-upload it?
    Or send it to me: info1848@yahoo.com

    Thanks

Page 3 of 3 FirstFirst 123

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
  •