satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Disable local terrain generation in online mode #189

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

for https://github.com/satoshinm/NetCraft/issues/188 Use only terrain from server, remove local generation when online

satoshinm commented 7 years ago

Disabling local terrain generation when the client is enabled is easy enough:

screenshot-netcraft-2017-06-09t03_44_54 103z

but this breaks server.py / native client

satoshinm commented 7 years ago

Native build of client connecting to server.py, shows only blocks which the user added beyond the terrain:

screen shot 2017-06-11 at 8 49 18 pm

except for the outer edges which do show the terrain locally which I'm not sure why

satoshinm commented 7 years ago

Not ideal, but #ifdefing __EMSCRIPTEN__ to disable local terrain generation when online, when running under emscripten since it is connecting to WebSandboxMC which sends the full terrain, and enabling it when in the native build since server.py sends only a delta, is the most expedient.