Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / is there a snippet

Author
Message
Yian
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 9th Sep 2003 21:03
I would just like to know if there is any snippet or routine which calculates the level of light at a position in 3D space, and if not would it be possible to make?

-john D.
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 9th Sep 2003 21:18 Edited at: 9th Sep 2003 21:18
yes it would be possible to make and no no-one has done it
lemme guess, your making a stealth game

the artist formally known as darkfluff
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 9th Sep 2003 22:58 Edited at: 10th Sep 2003 00:02
- Calculate the distance between you nad the light.

- If it's within the light range then you're illumintaed.

- Then calculate the percentage of light (if you were 50 units away fro mthe light with a range of 1000 then it'd be 5%)

There you are

c:/dos
c:/dos run
run dos run
Yian
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 9th Sep 2003 23:19
it's the last bit which i dont get...shouldn't it be 5%?

-john D.
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 10th Sep 2003 00:02
oops sorry 5%

c:/dos
c:/dos run
run dos run

Login to post a reply

Server time is: 2026-07-25 08:11:34
Your offset time is: 2026-07-25 08:11:34