Random Chitchat 2012-2016
(04-07-2013, 04:11 AM)xoft Wrote: I'm not sure I'm understanding you precisely right now. In my language, "novel writer" means you're writing too much and is kinda negative, not sure if it's the same in English.

A novel writer is someone that writes novels! I didn't mean it in a negative way, just a joking way, neither did I mean you're writing too much just that you wrote a lot Smile
Thanks given by:
It happens to everyone, with bigger or lesser severity, depending on computer speed.

My guess is that as soon as MCServer generates a chunk, it sends it to the client, but then the fluid simulator takes over and in its first step simulates several thousand blocks, sends those changes to the client and the client freezes because it recalculates lighting for each block change. To confirm this, if you set both water and lava simulators to Noop, the client should cease freezing (but of course you don't get running water, then).

There are principially two solutions to this:
1, Don't send chunks to client until they've had several steps of fluid simulation
2, Generate chunks (at least) one row ahead of clients and siulate them even when they have zero clients.

#1 is quite difficult to code - there's a lot of housekeeping (this chunk has a client, but don't send block updates to it yet, because the chunk itself hasn't been sent yet)
#2 is easier to code, but means that the server will use more RAM (needs 1 more row of chunks around the player) and CPU (chunks that could be unloaded will still be simulated)
Thanks given by:
No lag when disabling fluid simulation - so it's definitely it. I think there should be a better solution. How vanilla server deals with that problem?
Thanks given by:
fluids don't run until they receive a block update, I believe.
Thanks given by:
I believe vanilla uses solution #2, but it's hard to say, really, vanilla has quite a different approach to terrain generation and is much less multithreaded than MCS.
Thanks given by:
if you don't have the presimulator enabled they don't run until they receive a update but if you have it enabled it runs once the chunk is generated.
Thanks given by:
By rev 1366 I consider abandoned mineshafts generator to be done. There's just two things missing and those are related to missing MCServer features - spawners don't work and don't have a spider in them, but a (default) pig, and loot books have no enchantments. Otherwise the entire thing should be working. It may use some speed-related checkup, still.
Thanks given by: NiLSPACE
I'm trying to integrate SQLite and LuaSQLite into MCServer, but LuaSQLite doesn't compile for weird reasons. And it's the kind of source written by real madmen, so it's impossible to tell what's going on there. This is gonna take a while.
Thanks given by: NiLSPACE , bearbin
ThanksTongue
Thanks given by:
Wow, I'm just amazed. After I managed to fix compilation, it actually works! I've even written a small test code in the Debuggers plugin, and it promptly created a DB file, inserted some values and read them back to me. Surprised! If I knew it was this easy, I wouldn't've waited so long to do itTongue

I'll just verify that it compiles under my Linux VM and then commit the code. Huge commit - SQLite itself comes as a 4.6 MiB source file and a 340 KiB header file Smile Wonder what the executable size does...

The exe has put on some 0.5 MiB, not bad.
Thanks given by:




Users browsing this thread: 20 Guest(s)