Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sky: Get various colors used for sky from server #6802

Closed
sofar opened this issue Dec 18, 2017 · 6 comments
Closed

Sky: Get various colors used for sky from server #6802

sofar opened this issue Dec 18, 2017 · 6 comments
Labels
@ Client / Audiovisuals Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature @ Server / Client / Env.

Comments

@sofar
Copy link
Contributor

sofar commented Dec 18, 2017

https://github.com/minetest/minetest/blob/master/src/sky.cpp#L526

There are 9 hardcoded colors here that should be retrieved from the server.

The new sky packet could be expanded to include these color values. Clients that know where to look for these values can then use them. Old clients will be unaffected.

This doesn't seem to complex, other than there being lots of different colors. Some experimentation shows that toying around with these values yields good results quickly and mods should be able to use this. Together with the cloud stuff, this would make for a great atmospheric addition.

@paramat paramat added @ Client / Audiovisuals @ Server / Client / Env. Feature request Issues that request the addition or enhancement of a feature labels Dec 18, 2017
@paramat
Copy link
Contributor

paramat commented Dec 18, 2017

Very useful.

@raymoo
Copy link
Contributor

raymoo commented Dec 19, 2017

So is the request to expand the sky packet and client code so that the server can tell clients what sky colors to use? I'm guessing anything like a mod API to change these for a player would be a separate feature?

@sofar
Copy link
Contributor Author

sofar commented Dec 19, 2017

So, I just looked at the network stuff and thinking about the api, we might as well just have a new get|set_skycolors(skycolorparamstable) API.

From sky.cpp I reckon that we need a table with 9 color pairs.

it seems packet wise, looking at server.cpp, we should just make a new Server::SetSkyColors() function and a new TOCLIENT_SKY_COLORS packet.

Then it's just a simple an straightforward api that is mostly passthrough to the client, and the client can cache the values and use them instead of the hardcoded colors.

@sofar
Copy link
Contributor Author

sofar commented Dec 19, 2017

Concept images:

@paramat
Copy link
Contributor

paramat commented Dec 20, 2017

Lovely.
Can the colours just be added to the existing set sky packet? after all that can already set the colour for a plain override sky. set sky seems to be the place for it, and obviously this should be per-player to cope with differing realms/planets in a world.
@bendeutsch may be interested or have insight.

@sofar
Copy link
Contributor Author

sofar commented Dec 20, 2017

Yes, expanding a packet and putting more data into it is always possible, I would be cautious of doing it to prevent conflicts and complex handling.

@paramat paramat added the Concept approved Approved by a core dev: PRs welcomed! label Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature @ Server / Client / Env.
Projects
None yet
Development

No branches or pull requests

4 participants