13 Commits

Author SHA1 Message Date
Drew DeVault
05a6b10e21 Fix deterministic terrain generation 2017-05-23 19:54:04 -04:00
Drew DeVault
c5c0e5ddf4 Block when sending initial chunks 2017-05-23 19:41:52 -04:00
Drew DeVault
6fb8ee7ba5 Many more optimizations and bugfixes
Again, sorry for the huge commit. Just taking on performance issues as I
see them. Changes in this:

- Deadlocks in region code finally fixed
- Chunk packet preparation optimized (saves ~10-20ms per packet, since
  we're sending these like 30 at a time that's pretty important) by
  storing chunks pre-encoded in memory (basically just using a single
  big array for IDs, metadata, and light)
- Move chunk generation and compression to the thread pool
- Move client chunk updates to the scheduler
- Improve profiler coverage
- Add knob to disable scheduling chunk events on chunk load
- Make it possible to disable specific scheduled events in config.yml
2017-05-23 18:17:44 -04:00
Drew DeVault
362c852f51 Many improvements to server stability+performance
Sorry for the vague commit message. There were a lot of changes. Here's
a list of most of them:

- Lighting updates are timeboxed each frame
- The next environment frame is queued sooner if the current one took
  longer (as soon as immediately)
- Issues with the physics engines and mobs using it were (mostly) fixed,
  mobs no longer freak out and get stuck on physics objects
- Mob AI/pathfinding is done more intelligently
- The player can no longer spawn in an ocean or a desert biome
- Some deadlocks in Region were fixed (more remain to be fixed)

The current performance bottlenecks are lighting (still) and propegating
initial chunk loads to blocks that need to schedule things (such as
grass blocks). I think the main culprit in the latter case is grass
blocks and water blocks. The former can be improved by adding a block
cache to World, but that'll take some custom work. This step is just
gonna be slow no matter what, we might have to split it across several
frames but it's never going to be great.

There still seems to be a deadlock somewhere in all of this mess, in the
world code. I'll find it later.
2017-05-22 19:51:23 -04:00
Drew DeVault
f7ffe718a7 Initial pass on lighting optimizations 2015-07-04 08:41:27 -06:00
Drew DeVault
b2ae41b87c Initial implementation of lighting 2015-06-26 16:27:13 -06:00
Drew DeVault
2dd423ab11 Implement singleplayer 2015-06-02 20:31:43 -06:00
Drew DeVault
805320ce8f Implement caves
This:

- Implements caves with 3D noise
- Moves periodic chunk updates to the thread pool
- Fixes a handful of small bugs
2015-05-03 19:49:43 -06:00
Drew DeVault
6517738949 Improve terrain generation
- Enforced coding style
- Improved perlin constants
- Improved biome constants
- Spawn plants before trees so plants may grow underneath
- Fixed areas that were not deterministic
2015-04-26 18:08:56 -06:00
Drew DeVault
65deecd131 Add world manifests
These include the spawn point, seed, and terrain generator so that you
can load saved worlds with all the right details.
2015-04-13 17:41:57 -06:00
Daniel Vidmar
9fa3286ea0 Terrain Generation 2015-02-21 02:42:03 -05:00
Daniel Vidmar
b83ee8383d New terrain generator 2015-02-21 02:37:13 -05:00
Drew DeVault
8d3b084d8d Add Craft.Net standard generator 2015-01-01 19:21:46 -07:00