![]() |
|
dirty rectangle tutorials/examples? |
Derezo
Member #1,666
April 2001
![]() |
The only example I can find of dirty rectangles is the allegro demo.. "He who controls the stuffing controls the Universe" |
Evert
Member #794
November 2000
![]() |
I made a small demo program a while ago that shows how I do it. It also shows how I handle multiple screen update methods in one program. It's based on the Allegro demo game, but hopefully it will be easier to understand. You can get it from http://www.science.uva.nl/~eglebbk/download/upddemo.zip Hope it helps... Evert |
Derezo
Member #1,666
April 2001
![]() |
The problem I'm finding, is looking at the source, tearing out the page flipping/triple buffering/etc that's not needed, then taking what's left and combining it with my own drawing functions to make it work.. "He who controls the stuffing controls the Universe" |
Zaphos
Member #1,468
August 2001
|
The concept behind dirty rectangle code ...
|
epiwerks
Member #489
June 2000
|
That's all well and good, but what about multiple sprites? ------ |
Zaphos
Member #1,468
August 2001
|
Umm ... have buffers for each sprite (of corresponding sizes) and buffer the static scene for every sprite before drawing the sprites to the screen ... or just remember the order you drew the sprites and buffer as you go ... it isn't much different. Just follow the same process a bunch of times.
|
Derezo
Member #1,666
April 2001
![]() |
my problem is.. if I stick on the character, I also need to stick on what's infront of the character (the top layer, tree's and such). Blitting the entire layer causes slow down.. (Edit: Spelling.. it just sounded funny) [ September 12, 2001: Message edited by: Derezo ] "He who controls the stuffing controls the Universe" |
Zaphos
Member #1,468
August 2001
|
Does the layer in front of the character change? If not, and if you are using double buffer redraws, try this:
|
Zaphos
Member #1,468
August 2001
|
Oh yeah, I almost forgot to add:
|
Derezo
Member #1,666
April 2001
![]() |
Well, I've been working with the code a bit.. "He who controls the stuffing controls the Universe" |
Zaphos
Member #1,468
August 2001
|
Are you masked_blit ting the foreground? If you simply blit the foreground it will cover up the background and only the foreground will show.
|
|