| Mirage Source http://miragesource.net/forums/ |
|
| Only redrawn when it changes... http://miragesource.net/forums/viewtopic.php?f=201&t=788 |
Page 1 of 1 |
| Author: | Obsidian [ Fri Dec 01, 2006 10:07 pm ] |
| Post subject: | Only redrawn when it changes... |
I was looking into it... the multiple surface layers, like BigRed submitted, is nice. The map is drawn once, and a few other things are drawn just once (which saves a LOT of loops/memory), but isn't there a more practical way of doing it, like only redrawing only if the initial drawing changes? I've been trying to think of a way to do it, but they would all involve loops and/or timers, and that would really kind of defeat the purpose. Anyone know of a way to do it? or possibly a source code that has something similar to it already that i can use as an example? |
|
| Author: | Lea [ Fri Dec 01, 2006 11:43 pm ] |
| Post subject: | |
I think what you're thinking of is dirty rectangles. Instead of drawing the entire map every loop, draw only the part that changes. So you need to keep track of the parts that change, and draw them You could use 1 rectangle, 2 rectangles, 4 rectangles, however many you want. One rectangle for each moving part, even, is possible in Mirage (not too much moves) I plan to do it that way in my up and coming engine. |
|
| Author: | Obsidian [ Sat Dec 02, 2006 12:56 am ] |
| Post subject: | |
oh okay, so like one rectangle per player on the map (for example)? i'm going to try to play with this on a blank MSE source and see what i can do... if i can make a decent version of it (that works completely), i'm going to try and release it as either the source or in a tutorial. i was also thinking about playing with a huge in-game map... like 10000x10000 maps, and then load/blt/destroy as you walk for a completely seemless scrolling system. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|