glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] GameGUI re-organization update


From: Bradley Arsenault
Subject: [glob2-devel] GameGUI re-organization update
Date: Mon, 16 Jul 2007 02:36:50 -0400

Lately I've been making several attempts to clean up GameGUI, for example, map marks are now managed by their own class. The class is quite simple, only 115 lines, but its that much less code in GameGUI, plus the class is de-coupled from GameGUI. Same thing I did for keyboard shortcuts, text-messages (and the message history box), and the controversial minimap.

On the minimap: While I did mange to get my code providing the same result, it took almost 2.5 times as long to do it at full optimization. I scrambled to figure out why, as, in terms of the amount of code executed, new and old where very similar. I concluded the new had bad cache performance, and that heap-lookup times where bogging it down, so I reverted to using the old algorithm, but still in the new, self-contained class. In its new enclosure, the algorithm seems to perform better, by almost 2% of total cpu usage (i made the comparison as fair as possible, same map, same AI's, same length of time run), and it updates at the same speed: one full update per second.

My next and class change (for now) will be to make a new "Tool manager" class for GameGUI, which handles the tools, such as placing a building or flag or using one of the area-brushes. Simple and self contained. Its less code in GameGUI, which will make things less confusing and more organized.

--
Really. I'm not lieing. Bradley Arsenault.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]