Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimizing Graphic Input? (Completed)
#6
Sure. The old system blits everything through the GameLoop. So even on the places that hasnt changed, still blits.

For example, when only one player is on a map, with no enemy. The map is being reblited all the time. But with this system, it will only blit the tiles around the character, since those are the only onse that changes.

It's pretty meaningless to blt everything all the time, therefor I made this code that will blt up to 2 tiles around the character. Instead of all tiles on the whole map.

This results in a smaller For loop, and also less use of FastBlt(). So it will make some difference after all.

Even so, a lot of things needs to be added for this to work. You can see those things in the Tutorial section. I will complete the tutorial tomorrow i think. So you can test it then.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)