Game Development Community

Field of Vision

by Cyrad · in Torque Game Builder · 01/18/2012 (9:26 pm) · 1 replies

I'm working on a platformer game uses field of vision -- the player can only see objects within "FOV auras." These FOV auras can be mounted on objects, including the player character and props such as lanterns.

The important consequences of this mechanic are:
1. The player can only target a magic spell within a FOV aura.
2. The player can only see objects inside FOV auras.
3. The FOV aura object should have potential for a corresponding visual to indicate its radius.
4. "Opaque" objects change the shape of FOV aura (i.e. can't see behind a wall).

I brainstormed several ways to implement this. These included using a tilelayer made of many small tiles that disappear or reappear, a grid of triggers, and series of overlapping triggers that resize themselves when colliding with opaque objects.

However, I am not very experienced with Torque and I question the viability of these methods.

Perhaps anyone can share some insight or suggestions?

#1
01/20/2012 (3:14 am)
The technique described in this thread might be of use to you:
www.garagegames.com/community/forums/viewthread/119671

However it does involve some source code changes so it requires a reasonable understanding of Torque.