KaylebJay / tunnelers-bugz

No code. Bug tracker for the Tunnelers' Abyss Minetest Server. Please report all bugs here or at our Discord in channel #dev.
4 stars 3 forks source link

Discussion: Should day/night be decided by individual players instead of the server? #34

Closed KaylebJay closed 4 years ago

KaylebJay commented 4 years ago

I feel like we have too much day and not enough night because people keep clicking the spawn button. Other players feel like we have too much night (penguins for one :P). Even more players tell me they would rather have the night/day cycle as it normally is in vanilla minetest. So why not let the players decide for themselves?

This would mean, if implemented:

  1. There would no longer be any day button at spawn.
  2. There would probably be some kind of night vision item, which if in your inventory, you will always see day.
  3. There could also be the opposite, where you will only see night. (not sure though)
  4. All settime privs would be revoked (obviously)

This is likely extremely controversial and thus up for serious debate over a long time, but it would give every player exactly what they wanted at any given time. The recipes for the items would be somewhat inexpensive also, so anyone could get them easily. Note: Caves will not get bright with night vision, sorry :smile:

Guilll4um commented 4 years ago

I totally agree that everyone can choose :)

it's perfect that it goes through a parameter or an item :)

it could also be a head torch that lights up in front of us for a reasonable distance ... the torch in the inventory would leave your hands free to handle another tool ... both at night in the woods and in the mines ...

we would thus have all the beauty of seeing the night fall naturally while being able to benefit from continuing to play with a less gene =)

free in addition to adding an additional night vision but a little more expensive .. for the fun of seeing without being seen

hello hiding party at night: p

AsumFace commented 4 years ago

Potential alternative: time is controlled per area. Either using commands or using a time-control block that might as well be digiline-controllable. Consequence: the owner of an area controls the time, no time control out in the wild.

Benefits:

KaylebJay commented 4 years ago

I think that'd actually be quite a nice idea. The problem is: If you enter the area, when is the split second you enter it, how does the visual look? Does it look like poof you go from day to night? That'd just be bad (as bad as it is now, TBH). If it gradually but quickly transferred, that'd be nice but minetest currently has no support for this AFAIK (though you could cheat and speed up the time with some coding before switching into the area's timezone, and make that adjustable for the digiline blocks).

fluxionary commented 4 years ago

Okay, some technical stuff, as best I understand it.

Night and day are hard-coded concepts in minetest. You can change the length of a cycle, the ratio of day/night per cycle or even if there is a cycle, but there's no way to code up different values for these in different areas.

What is possible, is to have per-player customization of the skybox and "day/night ratio", which is a single value that indicates how much ambient light the player sees above ground, but it doesn't always entirely make things look like "true night" or "true day" for a player due to weird interactions w/ the server's actual day/night cycle. The interesting thing, though is this can be set up to trigger if e.g. a player is inside a specific area without too much trouble, or to trigger if a player is wearing/holding some particular item. HOWEVER, note that per-player tweaks of the day/night ratio will not affect things like crop growth, and can lead to unexpected difficulties e.g. if a player sees day, but it is actually night, and plants won't grow w/ fertilizer. Mesecons light sensors would also appear to act strangely. A node inspection tool can always be used to discover the actual light value of a node, however.

For an example of a mod that makes use of per-player skyboxes, see https://gitlab.com/sofar/insidethebox/-/tree/master/mods/skybox

One thing I am aware of, but have little experience in, is that you can tweak the param1 value of nodes in an area to set their light value, but (1) this doesn't necessarily work on all nodes (I don't have examples) (2) I'm pretty sure doing other things that cause a recalculation of the light levels in an area (e.g. placing/breaking blocks or torches) can cause weird effects. See here for API info.

Things like a wearable torch (or walking torch) have been vetoed multiple times already by the admins on the grounds of it causing lag. Wearable torches generally work by replacing air around the player w/ invisible light-generating nodes, which revert back to air when the player moves on. Without extra work, they won't work in other passable nodes (like water). Unfortunately, there's no way to make entities emit light, or you could just make the player glow. It seems possible that you could have a mod that tweaks the param1 value of nearby nodes as a player moves around, but I've never seen that done before, and I don't expect it would be any less laggy. It's also possible that the "glowing air" type of lights can be coded up so badly that they can cause arbitrary nodes to get removed if the server crashes (see e.g. this)

All that having been said, I highly approve of Caleb's proposal as it currently stands.

fluxionary commented 4 years ago

Oh, and if you wanted to cause a smooth transition for light levels in different areas, that could easily be done by just triggering a sequence of events that each change the value slightly. I'm not sure there's an equivalent way to meld skyboxes into each other (unless maybe the skybox stuff can make use of the texture modification logic).

KaylebJay commented 4 years ago

Thanks for your large assessment of this :) Yes, sadly they are very hardcoded concepts and have problems. There is, however, a set_sky addition to minetest recently that seems pretty interesting for sure and might help with this. For the most part, the sky in minetest is very beautiful and skyboxes are not needed. But, skyboxes can be textured like you said, which is very handy (I use colorize textures function often because of this!), and though it would be much prettier, it incorporates a lot of problems. An alternative solution which would be even easier is just making the night brighter. And the night vision effect could be more of a temporary effect instead of permanent, so it would be obvious?

axcore commented 4 years ago

There's a mod that lights the surrounding area, if you're carrying a torch. Would that be simpler than messing with the hard-coded day-night cycle? Josselin

KaylebJay commented 4 years ago

It would, the worry is would this cause user-based or server-based lag. And would players accept that over the day button? :) What would be really cool is if it only worked above a certain height and got dimmer and dimmer as you got deeper. That way, people would have to place torches in caves still.

KaylebJay commented 4 years ago

Great to have you here btw, Josselin :)

KaylebJay commented 4 years ago

An alternative solution that just might be nice is: -Brighten up the night -Make all wielded items that are a light_source emit light (ie wielded light) -Revoke all settime privs, remove spawn day button What do you think?

Guilll4um commented 4 years ago

yes it sounds good when you say wielded it's on hand or in inventory ? :p 💡

KaylebJay commented 4 years ago

On hand.

Guilll4um commented 4 years ago

ok :) .. is it voluntary in relation to the balance of the game? because in the inventory it would allow you to have your hands free to do something else.

KaylebJay commented 4 years ago

Hmmm... I think that would be too OP. The brighter nights will allow for seeing most everything clearly so then its up to caves, and if you could see everything in caves nobody would need torches :)

That said, it would still light the way as you travel anywhere. Just you'd need to place a torch once you've found a nice ore spot or a place where you want to build your home, etc, so you could move to different tools.

Guilll4um commented 4 years ago

indeed ! ok nice =)

Hume2 commented 4 years ago

There is a function player.override_day_night_ratio(ratio or nil). It is purely visual so the game logic doesn't act accordingly. It can make the player see the night even when iẗ́'s day or vice-versa. So each player could either choose to see daylight as normal or he could set it to a fixed value.

KaylebJay commented 4 years ago

I should have this ready within a few days now. Probably the night vision should be added first so people can get them, then the day button will be removed and settime privs.

KaylebJay commented 4 years ago

Ok, this is done and should be in the server as early as tomorrow. On the 300th day of server runtime, the button at spawn will be removed and all settime privs revoked.

KaylebJay commented 4 years ago

For now, no wielding light will happen. This will (likely) happen (very?) soon in a (future? or maybe with this update) mod.

KaylebJay commented 4 years ago

Wielded_light will be added too :)