Game Development Community

Mission lighting option

by Howard Dortch · in Torque Game Engine · 12/14/2005 (7:37 am) · 8 replies

I want the user to change the time of day before the mission loads and have the info show on all clients. I have been looking at changing the sun ambient and color info on the host side and sending that to the clients. Is there an easier way to set the lighting pre load or during load on each of the clients? I only want 2 options day or night so it doesn't have to be dynamic. Any ideas?

#1
12/17/2005 (6:02 am)
Bump
No one have any ideas here?
#2
12/17/2005 (6:32 am)
You can make 2 missions, all the same but different ambient light settings. In that way you dont have to relight the scene every time you start it.
#3
12/17/2005 (10:04 am)
Isn't that kind of a wast of memory footprint ? Seems there would be an easier way. I dont mind the relight time.
I tried to do it this way but dont see why it fails.

new MissionGroup/sun(Sunlight){}
#4
12/17/2005 (11:48 am)
Quote:MissionGroup/sun
isn't valid syntax.
#5
12/17/2005 (11:57 am)
Yeah thats what I said
So how would you do it?
#6
12/17/2005 (1:06 pm)
Well, the thing after new is the class, and the thing in parentheses is the name. So I'd select an appropriate name and class and do that.

I can only guess you're trying somehow to make it show up in the MissionGroup and have it be a Sun named Sunlight? In that case you'd do something like this:

new Sun(Sunlight);
MissonGroup.addObject(Sunlight);
#7
12/17/2005 (1:30 pm)
Thanks for the reply. Ah addObject looks like the trick.
If I have a mission (some.mis) with no sun in the file then do the addObject before loading the mission will that work? I can send the proper sun value to each client then they load the mission locally and it should relight on all the clients correct ?
#8
12/17/2005 (2:30 pm)
Heck if I know. I suggest doing some experiments.