27 Commits

Author SHA1 Message Date
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
e51d22cb52 Handle physics corner cases (literally) 2016-07-04 20:12:48 -04:00
Drew DeVault
314e49eed5 Add another physics test
This one fails, and brings to light a fundamental flaw in my physics
engine. Another rewrite will have to happen.
2016-07-04 15:42:49 -04:00
Drew DeVault
e1114ccda8 Fix up nunit tests + travis 2016-07-04 15:02:59 -04:00
Drew DeVault
528eb2c5f4 Implement time update packet on the client 2016-04-20 18:55:16 -04:00
cra0zy
3c55b9d642 Update NuGet packages 2016-03-15 19:45:37 +01:00
Drew DeVault
8f2a4e54a9 Add highlighted block model and VoxelCast class 2015-09-24 08:28:16 -04:00
Drew DeVault
15670c3d77 Reduce mouse sensitivity, fix return to launcher
The mouse sensitivity is now more Minecrafty by default (will eventualy
want to make this configurable) and the bug where the launcher won't
re-open after exiting singleplayer is fixed.
2015-09-21 08:16:44 -04:00
Drew DeVault
8819ccf27e Fix issues with client physics, implement jumping
Still a bit janky with jumping.

Fixes #146
2015-09-20 17:45:27 -04:00
Drew DeVault
79e95e2083 Improve performance, fix grass issue 2015-09-07 17:25:14 -04:00
Drew DeVault
ec079f4dfa Fix some issues with physics simulation 2015-07-06 19:47:29 -06:00
Drew DeVault
ed7a14b871 Rewrite physics engine
This time it sucks slightly less
2015-07-06 19:30:51 -06:00
Drew DeVault
87b621e166 Finish lighting optimizations (for now)
We can now consistently light a chunk with sub-10ms lighting steps.
2015-07-04 15:00:54 -06:00
Drew DeVault
f7ffe718a7 Initial pass on lighting optimizations 2015-07-04 08:41:27 -06:00
Drew DeVault
ff0ee58b37 Refactor A* implementation leading up to JPS 2015-07-03 10:54:55 -06:00
Drew DeVault
b7ba71e095 Add more complex pathfinding unit tests 2015-07-02 18:04:15 -06:00
Drew DeVault
f2ab1c0598 Implement A* pathfinding and relevant tests 2015-07-02 17:05:44 -06:00
Drew DeVault
328420fcdb WorldLighter -> WorldLighting 2015-07-01 11:30:54 -06:00
Drew DeVault
994de4de70 Refactor light propegation RE: dextar0's comments 2015-07-01 11:26:43 -06:00
Drew DeVault
edf7205050 Fix propegation of light through leaves/etc 2015-06-26 19:22:07 -06:00
Drew DeVault
61310e6bbb Improve tool effectiveness subsystem 2015-06-26 17:56:07 -06:00
Drew DeVault
f89381aa6f Fix bugs in sky light calculation 2015-06-26 16:50:52 -06:00
Drew DeVault
b2ae41b87c Initial implementation of lighting 2015-06-26 16:27:13 -06:00
Drew DeVault
c2ca8914ca Add test for block support 2015-06-06 22:19:51 -06:00
Drew DeVault
ccd972e6ac Add unit test for BlockProvider.BlockMined 2015-06-06 22:19:51 -06:00
Drew DeVault
50040ed440 Start adding tests 2015-06-05 14:15:39 -06:00