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 Discussion / how do i reduce light in DBC 1.2.0

Author
Message
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 15th Oct 2007 12:37
Just upgraded my DBC to the newer one.

while using DBC before upgrading i created a dark enviorment in my game by setting the ambient light to "0".But now it isn't working.
the whole scene is bright and i cant control it.

Is there any code to reduce the global light of my game.

Follow the white rabbit
Comrade Robski
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 15th Oct 2007 13:28 Edited at: 15th Oct 2007 13:33
I've found hide light 0 works

(EDIT: this will totally remove the ambient light, and you won't see anything unless you provide your own lights, or turn off an object's ambient light sensitivity - but this method works much better than set ambient light 0)
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 15th Oct 2007 14:16 Edited at: 15th Oct 2007 14:18
The "SET AMBIENT LIGHT" command is now redundant. All objects used to use the same ambient light settings so they all could be changed with a single command. Now, each object can have it's own ambient light settings. So, to mimic the old command, for each object in your scene you would have to use:
SET OBJECT AMBIENT objNo, RGB(0,0,0)


a.k.a WOLF!
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 15th Oct 2007 14:45
ok...it works.
thanks.

I think you should give us some tutorial so we can know more about these new commands.

Follow the white rabbit
Comrade Robski
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 15th Oct 2007 14:54
OK thanks for the tip, Ron. BTW does hide light 0 still work in the new version?
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 15th Oct 2007 16:00
Quote: "I think you should give us some tutorial so we can know more about these new commands."


There is one simple example program there, but I can understand you wanting more. Unfortunately, it may be a little while before I can get to doing that. I have a LOT of other stuff going on at the moment.

Quote: "OK thanks for the tip, Ron. BTW does hide light 0 still work in the new version? "


Yes. It should. It effects a "light" in a scene, not the material properties of an object.

I will try to write a small explanation of how/why the new commands work so everyone has a better understanding of them.


a.k.a WOLF!
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 15th Oct 2007 17:04
Quote: "I will try to write a small explanation of how/why the new commands work so everyone has a better understanding of them."


that would be perfect.

Follow the white rabbit
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 16th Oct 2007 19:10
ron,
i was working with the new commands and i think i can give some tutorial into the forum.

Follow the white rabbit
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 17th Oct 2007 02:43
Great! I'll be happy to comment on it.


a.k.a WOLF!

Login to post a reply

Server time is: 2025-05-31 20:55:48
Your offset time is: 2025-05-31 20:55:48