Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Light Visibility
- - By Clonk-Karl [de] Date 2014-12-31 13:54
Sven2 has already touched the topic with his latest commit in the lights branch:

> Currently, all players see the light. In the future, we may want limit it to the controller of the explosion.


At the moment, all lights are visible by everyone. That's not desirable of course. Especially for melees, we don't want players to see the light cones of their enemies. For explosions, all players seeing them might not even be the worst idea, since it might add some strategic element to the game (if you make explosions, you will be seen for a short while).

How about we make the light visible to the controller of the light source object, and all allies. Objects without controller would be visible by everyone. Would this cover most usecases, or are there other suggestions?
Reply
Parent - By Armin [de] Date 2014-12-31 14:56

>How about we make the light visible to the controller of the light source object, and all allies. Objects without controller would be visible by everyone.


Sounds like the ideal way imo.
Parent - By Maikel Date 2014-12-31 15:58
I think the controller of the object is good if it concerns torches and flashlights for example, but for explosions I'd prefer something global somehow.
Parent - - By Zapper [de] Date 2014-12-31 16:03

>How about we make the light visible to the controller of the light source object, and all allies. Objects without controller would be visible by everyone. Would this cover most usecases, or are there other suggestions?


The controller of an exploding flint is the throwing player. This is necessary to trace kills correctly.

So this would not cover the flint case. I am a fan of making the explosion visible for everyone, too. :)
Parent - - By Maikel Date 2014-12-31 16:09
Can't it default to controller + allies and then for the flint (and maybe other objects) you can specify global. This must be easily possible with the helper object created by Sven once the engine supports this.
Parent - By Zapper [de] Date 2014-12-31 17:04
Ah, sure. The objects will have to create the light via script anyway. So a AddLight(size, controller, timeout) or something could wrap all that cleanly :)
Parent - By Armin [de] Date 2014-12-31 16:33 Edited 2014-12-31 16:39
I think the controller of an exploding flint doesn't matter in this case because the explosion creates a new Fx_Light object which (can be) without controller?
Edit: alrdy mentioned
Parent - - By ala [de] Date 2015-01-01 12:44
*klick*
I like global lighting for all light sources. It's realistic and strategically the most interesting.
Parent - - By Maikel Date 2015-01-01 12:52
It is definitely the most realistic, but this would mean that any light source other than the clonk can always be detected by the enemy. So there are no sneaky weapons or tools you can use which involve lights. I am not sure I like that, I agree with you however, that explosions, fire arrows and boompacks should be visible by all.
Parent - By Sven2 [de] Date 2015-01-01 13:07
We could also make explosions visible only if it's within view range of one of your clonks. Although if we continue to disallow scrolling, we already have that.
Parent - By PeterW [de] Date 2015-01-01 17:05
Yeah, that's pretty much the way I intended it to work. There's a number of interesting design considerations though - for example we probably want torches in one way or the other eventually.  So should torches only work for their owners? Spontaneously, it would make a lot of sense to me to make "viewpoint" lights visible to allies (initially just Clonks, but maybe we'll have "wards"?), but all actual light objects visible to everybody. After all, it's realistic and we might get some strategic decisions out of it. We could even decide to shorten the Clonk view range considerably so carried torches become a true resource.
- By Maikel Date 2015-01-02 10:08
For more insight into this topic you can watch the video Sven, Newton and I made of the current state of the lights branch.
- - By Maikel Date 2015-01-02 19:33
I am currently working on fire arrows and explosive arrows, so that we can test a little the effects of visibility with ranged weapons in the lights branch.

By the way, would it be okay if I commit these objects directly to the lights branch once they are done?
Parent - - By Clonk-Karl [de] Date 2015-01-02 19:51

> By the way, would it be okay if I commit these objects directly to the lights branch once they are done?


It would be okay for me, but I hope we can also merge the lights branch into master soon.
Reply
Parent - - By Maikel Date 2015-01-02 21:23
Yes that would be good as well, to merge, I think the Parkours have been tested sufficiently and seem okay.

That's why I wanted to also test some melee functionality.
Parent - - By Clonk-Karl [de] Date 2015-01-03 15:32
Does anyone have objections to merging the branch in the state it is now?
Reply
Parent - By Sven2 [de] Date 2015-01-03 15:34
No, it's fine.
Parent - By Zapper [de] Date 2015-01-03 15:48
Nothing stands in the way of the collective progress! ☭
Parent - By Clonk-Karl [de] Date 2015-01-03 16:07

>  Does anyone have objections to merging the branch in the state it is now?


Merged! Please do all lights developments and bugfixes now in master :)
Reply
Parent - - By Maikel Date 2015-01-03 12:30
For now I have just created a nice dark melee with fire and explosive arrows. See attachment.

Btw: Sven should the Fx_Light object be a vehicle? It then falls out of the screen, so I already changed it to staticback locally, I can push that if needed.

I hereby license the file CaveBattle.ocs.tar.gz under the CC-BY license
Attachment: CaveBattle.ocs.tar.gz (118k)
Parent - By Zapper [de] Date 2015-01-03 13:00

>Sven should the Fx_Light object be a vehicle?


No. Only vehicles should be vehicle.

If the object needs to be affected by gravity and is NOT a vehicle, then it should simply have no category. We don't need the CR hack of making everything C4D_Vehicle anymore.
Up Topic Development / Developer's Corner / Light Visibility

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill