[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using multiple surfaces for SmallMap?
From: |
Gervase Lam |
Subject: |
Using multiple surfaces for SmallMap? |
Date: |
Tue, 15 Oct 2002 21:58:15 +0100 |
> Subject: Re: SmallMap issue(s)
> From: Ingo Ruhnke <address@hidden>
> Date: 09 Oct 2002 01:24:38 +0200
> Update takes 2-3ms currently (thats all I could get with
> CL_System::get_time()), but the slowdown is still noticable, probally
> just because a frame_skip due to a missed timeframe, but I am not
> sure.
One thing that I have been thinking about with regards to this. Why not
split the Small Map into 1 pixel high horizontal lines/surfaces and
"cache" the the parts of the ColMap that is used by the SmallMap?
Then, every "update", diff the "cache" with the ColMap. If what is in the
"cache" is different from what is on the ColMap, update the Small Map
Surface line using Canvases. This would mean that most of the time only
part of the SmallMap is converted from Canvases to Surfaces, which is the
most time consuming part of the process.
Initially, I was thinking of dividing up the SmallMap into squares to do
this, which would have been annoying to implement, or dividing up the
SmallMap into possibly vertical lines. However, because Pingus go across
the map horizontally most of the time, most of the things that happen
would also be horizontal. Also, handling horizontal lines is easier to do.
Thanks,
Gervase.
- Using multiple surfaces for SmallMap?,
Gervase Lam <=