Page 1 of 1

Player-specific graphics

Posted: Sun Mar 05, 2017 12:57 pm
by trold
Kane Hart expressed a wish (https://github.com/troelsbjerre/Bottleneck/issues/24) to have Bottleneck's lights be toggleable for each player individually. It's a really good idea, but as far as I understand, it would require a drastically different approach. Currently, the lights are added to the map as entities that all players see the same way. Any idea how to make the lights only visible to a subset of the players?

Re: Player-specific graphics

Posted: Sun Mar 05, 2017 2:09 pm
by Klonan
trold wrote:Kane Hart expressed a wish (https://github.com/troelsbjerre/Bottleneck/issues/24) to have Bottleneck's lights be toggleable for each player individually. It's a really good idea, but as far as I understand, it would require a drastically different approach. Currently, the lights are added to the map as entities that all players see the same way. Any idea how to make the lights only visible to a subset of the players?
It cannot be done at this time

Re: Player-specific graphics

Posted: Sun Mar 05, 2017 3:26 pm
by trold
Klonan wrote:It cannot be done at this time
Thank you for the quick reply. Would it be possible to tie visibility to the "additional information" layer, toggled by the alt-key?

Re: Player-specific graphics

Posted: Thu Apr 05, 2018 5:07 am
by betrok
I wonder if times have changed...

Re: Player-specific graphics

Posted: Thu Apr 05, 2018 10:22 am
by eradicator
Player specific overlays are something i've wanted a long time. Ghosts can already do per-force visibility. :x

Re: Player-specific graphics

Posted: Mon Jun 25, 2018 10:24 am
by betrok
Please, move this topic to interface requests.

Re: Player-specific graphics

Posted: Mon Jun 25, 2018 11:33 am
by Bilka
betrok wrote:Please, move this topic to interface requests.
Done.

Re: Player-specific graphics

Posted: Mon Jun 25, 2018 11:44 am
by Rseding91
betrok wrote:I wonder if times have changed...
They haven't. Per-player rendering that's readable and adjustable by mods would mean everything that's rendering per-player would need to store which players it's rendering for in memory and in the save file.

That's too much overhead for mod support.

Re: Player-specific graphics

Posted: Mon Jun 25, 2018 1:10 pm
by eradicator
Rseding91 wrote:
betrok wrote:I wonder if times have changed...
They haven't. Per-player rendering that's readable and adjustable by mods would mean everything that's rendering per-player would need to store which players it's rendering for in memory and in the save file.
They definetly don't need to be readable (same as there's no specific function to tell if a ghost can be seen by player_x).. If it was linked into alt-view there would be no adjusting either. Entity_X would simply be visible to any player that has alt-view enabled and is on the same force, and be invisible to players who have alt-view disabled or are enemies to its force. Thus the "visibile or not" state would not be part of the game state.

It could even be made to work with arbitrary "info layers" (pseudocode):
1) In the prototype stage the entity is defind with .info-layers = {'alt-view','my-custom-layer'} (multi-layer is probably overkill)
2) In control stage a mod can do LuaPlayer.set_visible_info_layers{'my-custom-layer'}
3) When the renderer starts it asks LuaPlayer what layers it should render and skips any entity that isn't in any of those layers.
That way the game state only needs to store one additional table per player, and does not need to know about visibility. If this can be done with reasonable performance i don't know. (Also obviously .info-layers should only be available for "simple-entity-with-info-layer" and not to every prototype.)

Re: Player-specific graphics

Posted: Fri Jan 04, 2019 6:25 pm
by Bilka