Proposed change, fundamental invariant

Stan Shebs shebs@shebs.cnchost.com
Mon Jul 31 22:39:00 GMT 2000


One of the old rules for Xconq internals is that xform_cell, which
converts area coordinates into screen coordinates, must receive a
valid point in the area, and that its inverse nearest_cell will
have an undefined result if the screen coordinates do not translate
to a cell in the area.

However, as I work through various issues with isometric display,
these rules are proving to be more inconvenient than helpful.  For
instance, the outline of the main map within the world map frequently
protrudes past the edge of the world, but it would be really
complicated to figure which edge cells the outline intersects, and
in any case it's more understandable to have the whole outline
drawn if possible.

So the new rule would be to say that the coordinate system is
effectively infinite in both directions, to require that conversion
calculations be accurate throughout the coordinate system, and to
require that callers do any of the in_area tests that may be necessary.
I've experimented a bit with a partial change of this form, and
there doesn't seem to be any bad effects yet.  (A practical
consequence is that the "attempting to xform" errors go away,
but of course that just means that the bug(s) responsible
won't be so easily detected.)

What about cylindrical areas?  I'm thinking about having the
wrapping apply just to accessing area data, but am not sure
about that yet - there are perennial bugs in the handling of
cylindrical areas (and there seems not to be any other body of
code/formulas for handling hexes on cylinders), and I would
to adopt a representation that can make those problems go away...

Stan


More information about the Xconq7 mailing list