This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: Unit view problems (long)
>> FIX 1 (THE EASY WAY)
>>
>> Get rid of the "last seen location" stuff. Only draw units that are
>> actually observed in real time. This would mean that if you fly over enemy
>> territory you would only see units as long as they stay within your vision
>> range. After that, it would be up to you to remember what you saw and
>> where. You would no longer have obsolete unit views to guide your memory.
>
>That seems pretty hard on the human player. Computers are good for
>remembering things.
>
>Having them only show until the end of the turn might be OK, though.
Well, I'm almost done with the "HARD WAY" fix now (rewriting the view code)
since that is what most people wanted. The new code is much more robust and
works fine in the Mac interface. I also got rid of the most significant
remaining memory leak in xconq by implementing garbage collection for unit
images.
I still have to port the new code to the tcltk, sdl, x11 etc. interfaces. Sigh.
BTW, the old code did not quite work as I thought at first with respect to
the "fog-of-war" issue. Specifically, it would always delete any old image
of a unit before drawing a new one. Thus, there would never be two images
of the same unit (which I thought was one reason for having this kind of
code in the first place).
We may want to consider allowing more than one image of the same unit (in
order to implement a real fog-of-war), something which is easily done in
the new code. And as already discussed also implement some kind of aging,
so that views do not remain forever.
Hans