🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
1 messages
1 total messages Started by Nicolai Czempin Thu, 23 Jul 1992 17:00
looking for hexagon-related algorithms
#160
Author: Nicolai Czempin
Date: Thu, 23 Jul 1992 17:00
22 lines
1333 bytes
In some board games (especially wargames), movement and position of pieces
is regulated by hexagons.
In some wargames, there is a thing called LOS (Line of Sight). This is used
to determine if some unit can "see" another, or if its LOS is "blocked".
To find out, you draw a (n imaginary) line from one hex center to the other.
If any hexes that line crosses are defined as "blocking", then the LOS is
blocked.
When using squares, it is simply an adaption of a line-drawing algorithm.

I could put lots of effort into working this out, but I tend to dislike rein-
venting the wheel. So, if anybody has got an algorithm for checking LOS, please
let me know. If you have any hints that would make finding one myself easier,
go ahead.

Thanks,

Nicolai


--
Nicolai Czempin, University of Karlsruhe, Germany
"I am not left-handed either"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads