Daily Archives: February 26, 2017

Sleep

I am working on a thousand bugs and issues at once, but 2.1 is slowly getting kicked into shape.

I’ve just finished working on the modified sleep mechanics. With multiple players it’s no longer possible to simply accelerate time when a player goes to sleep. Plus other players can now interact with the sleeping player too.

This is the way I did it:

  • When a player goes to sleep, the screen goes black as usual and player lies down the same way as when he’s dead.
  • If other players are present and not sleeping, time runs at normal speed.
  • If all players are sleeping, time speeds up as previously.
  • Player will wake up when his sleep meter is full and it’s daytime – previously player always slept until next morning no matter what.
  • To prevent a sleeping player from being stuck in sleep for 10+ minutes (when other players don’t sleep), he can now manually wake early:

Sleep.jpg

Player will also wake when:

  • He’s injured
  • He’s becoming wet – you can pour a bucket of water on someone to wake them up (or remove roof over their heads and let rain do it).

When a player loses consciousness due to lack of sleep, the option to manually wake up is disabled.

I’m now working on players spawning code. When this is done I will get to making skins – thank you for all the specimens you sent me! I now have plenty of material and will hopefully concoct something reasonable from them.