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

Re: (TFT) Online Melee



--- Lloyd Weber <laweber3@yahoo.com> wrote:

> There are good ideas in there for line of sight. I've done my hexes
> differently though, and I'm hoping to be able to continue to use
> Java's graphics 2D package for calculating line/hex intersections. 
> If Irun into
> trouble with it then I'll probably rewrite the whole hex board
> part, but for
> now I think its ok, and even seems pretty easy to work with.
> 
> Thanks again!

For the record, I found (once again) the site by Mark Butler that has
another way of line-of-sight handling of hexagon maps (this time in
Javascript) - it was in my older browser's bookmarks so many years
(and PCs) ago it seems, but I recently found it again with Google:

http://www.webwargaming.com/combat/

An example of the JavaScript that is used, can be seen (at least with
my Firefox browser) here: http://www.webwargaming.com/combat/los.js

The combat page loads in a lot of .js files, but I haven't seen
anywhere where these programs are documented (apart from the comments
which aren't too bad, and the rules that are documented) or
distributed as a .zip file or something more centralized. 

One should realize that Mark Butler's hexagon mapping logic is based
on "hex parts" (http://www.webwargaming.com/hexpart/hexpart.html),
which is not a bad idea. It's yet another way to skin a cat. 

I'm trying to develop a Java version of the stuff from Clark
Verbrugge's line-of-sight algorithms, but there are some cases where
the algorithm as-is fails and I'm trying to work out the bugs. The
whole "flattened" hex, non-orthogonal axes strategy is putting my
brain in a pretzel. 

Ideally, I'd like to provide a HexCoordinates.java class that offers
functions for all of the tricky stuff, including distance, paths,
different variants of LOS, etc. I'm aiming for a good design that
would facilitate the building of other engines.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
=====
Post to the entire list by writing to tft@brainiac.com.
Unsubscribe by mailing to majordomo@brainiac.com with the message body
"unsubscribe tft"