Indicates that an entity has an unobstructed view of another entity.
2
votes
2answers
76 views
Calculation: Is a sphere/square/plane visible from a certain point?
I'm searching for a way to detect if a form (shape can be changed if algorithm requires it) is visible from a single point in a 3D tile-based world. This should be used as some kind of wall-hack ...
4
votes
2answers
284 views
MMO, server-side line of sight
I am working on a simple tile-based multiplayer game. I am rather experienced programmer, but not so experienced game developer.
The players will see each other depending if there is a blocking ...
3
votes
1answer
316 views
Effecient finding of long-range spotting targets
I'm creating a top-down 2d strategy game, with a square grid map.
So far, I've used Bresenham's line drawing algorithm in a circle to determine what's in LOS of each unit, and then targedt one of the ...
1
vote
1answer
116 views
Line draw on “even-q” vertical flat topped hex grid
I'm trying to implement a Line Draw or Line of Sight algorithm for my hex boardgame. Upon reading several different solutions from most common places like the Hex Bible none of the algorithms adapted ...
7
votes
2answers
322 views
Diagonal line of sight with two corners
Right now I'm using Bresenham's line algorithm for line of sight. The problem is I've found an edge case where players can look through walls. Occurs when the player looks between two corners of a ...
1
vote
0answers
98 views
Best way to create line-of-sight occlusion in no-tiled game? [closed]
Suppose I want to create a 2D game where the player can freely move in a map with walls (including diagonal ones). I don't know the best way to create a game like this but I suppose using tiles is not ...
0
votes
1answer
134 views
Quick 3D sight calculation algorithm
I have a tile based board game where units move in 3D space on a 2D isometric view. When calculating attack tiles for a unit, how do I verify that they aren't shooting through a wall or a level too ...
1
vote
3answers
177 views
Geometry problem for area of sight
My player have a line of sight and all objects between the white lines, turns red.
To compute this, the following conditions are met: if the angle between the yellow line and the red line are small ...
3
votes
1answer
2k views
More efficient way to implement Line of sight on a 2d grid with ray casting?
Consider a 2d grid of tiles, and an approximated sphere of coordinates - centered on the player - that represents line of sight. The goal is to block the line of sight beyond obstacles (ie walls).
...
4
votes
2answers
1k views
Simulating “line of sight” with obstacles on 2d grid?
Ran into an interesting problem. I need to figure out how to simulate line of sight - simple enough, just on a 2d grid with obstacles. Either a grid cell is visible, or it's not.
I can get something ...
5
votes
1answer
240 views
Finding cells between two points (along line) to finding obstacles
My game is in 3D environment partitioned with 2D grids in 2 dimensioned array
So I can get any cell/node by passing row and col like return _nodes[r][c].
When the an attacker attacks an enemy with ...
5
votes
2answers
309 views
Robust line of sight test on the inside of a polygon with tolerance
Foreword
This is a followup to this question and the main problem I'm trying to solve. My current solution is an hack which involves inflating the polygon, and doing most calculations on the inflated ...
0
votes
2answers
587 views
Detecting if line crosses rectangle in python. Need speed boost
I am currently writing a top down man vs robot shooter. The game works now, but if I have a decent sized level it runs slowly when you are being chased by robots. While just roaming around it can go ...
2
votes
1answer
323 views
Most efficient way to implement walls and shadows in 2d
I am making a 2d top-down programming game similar to robocode. There will be up to 1000 walls (lines) in the arena, and up to 50 robots. Each robot can see in a 90 degree arc, and cannot see through ...
2
votes
2answers
1k views
XNA 2D line-of-sight check
I'm working on a top-down shooter in XNA, and I need to implement line-of-sight checking. I've come up with a solution that seems to work, but I get the nagging feeling that it won't be efficient ...
3
votes
1answer
406 views
How to calculate FOV with four-walled tiles?
I'm working on a 2D tile-based game. I'm trying to calculate FOV and I've implemented walls so they don't take up an entire tile. Instead, they just take up a side of each tile. Similar to:
class ...
7
votes
4answers
949 views
Efficient 2d Java Line of Sight for a lot of entities?
My problem today is this:
I have many civilians going around, they are classes stored by an arraylist.
The idea is when they see another civilian panic, they'll start to panic and it will spread.
...
5
votes
1answer
802 views
How to implement line of sight restriction in actionscript?
I have a problem with a game i am programming. I am making some sort of security game and i would like to have some visual line of sight. The problem is that i can't restrict my line of sight so my ...
11
votes
1answer
2k views
Draw real time fog of war in 2d game [duplicate]
I have game situation as shown in picture:
Red dot: player
Brown dot: obstacle ( rock, tree, etc)
Grey: non visible area ( under fog of war)
My question is: how can I draw that kind of shape, ...
5
votes
3answers
1k views
Make my NPC “see” gameobjects around him in Unity
I have a walking NPC that will "see" the wall in front or behind him (2d gameplay) and that will react accordingly.
I was thinking to attach him to an invisible collider that would react to objects ...
9
votes
4answers
1k views
Finding unoccluded tiles in tile-based game
I am working on a 2D tile-based game, and right now I'm trying to get a 2d equivalent of shadow volumes to work. I'm having trouble finding the surfaces that should cast shadows. From any point in the ...