Author Topic: Line of Site  (Read 921 times)

ST3ALTH

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Line of Site
« on: Tue, Oct 26, 2010 »
How can I create a simple effect similar to the flashlight effect in horror games. ???
« Last Edit: Wed, Oct 27, 2010 by ST3ALTH »

werem

  • Member
  • **
  • Posts: 79
  • Karma: +0/-0
    • View Profile
Re: Line of Site Question
« Reply #1 on: Wed, Oct 27, 2010 »
please, edit your question title to "line of sight" in order to be easyly founded by other people.

Second, there are a lot of ways to do that. You must discard the performance expensive ones(use ray tracing and blurs is a NO).

You should use a circular bitmap simulating a ligt source that you use like a mask over a black rectangle. And project rectangular shadows only for certain objects(tiles and enemys). For project shadows, I mean delete rectangles of the mask via bitmap manipulation. The shadows project away the light source.

It's a little tricky but is doable and the experience should be good enought.

Hope this helps.

ST3ALTH

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile