Posted: 11 Jul 2007 06:30
Switch to an 8bpp graphics mode and it'll cost almost no extra CPU time at all...athanasios wrote:Seems that animation slows the game a lot.
The place to talk about Transport Tycoon
https://www.tt-forums.net/
Switch to an 8bpp graphics mode and it'll cost almost no extra CPU time at all...athanasios wrote:Seems that animation slows the game a lot.
I think madman is working on including slope info in the map.Bilbo wrote:I have though of another optimization. During some tests with callgrind and one of my savegames I discovered that GetTileSlope in tile.cpp, some "complicated" function is eating 6.95% of cpu time, which is relatively lot.
I though of possible fix: cache slope data (1 byte/tile) in some array, this will mean max. 4MB of memory "wasted" on largest map (2048x2048), but those 7% of CPU cycles will be reduced to neglibigle lookups.
Do you think it is a good idea?
Actually, root cause of this was GetSlopeZ_Track in rail_cmd.cpp, eating 7.96 % of cpu time, so if this function can be rewritten to do more effectively without GetTileSlope (I have no idea what for this function is), things may be beter too and without any extra memory usage
But rest of the desktop will be in 8bpp also which is .... not goodpeter1138 wrote:Switch to an 8bpp graphics mode and it'll cost almost no extra CPU time at all...athanasios wrote:Seems that animation slows the game a lot.
And how did you come into the conclusion that I didn't?peter1138 wrote:Switch to an 8bpp graphics mode and it'll cost almost no extra CPU time at all...athanasios wrote:Seems that animation slows the game a lot.
Because I guessed you'd confuse "blitter" with "video mode"...athanasios wrote:And how did you come into the conclusion that I didn't?