9 Commits

Author SHA1 Message Date
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
4dd67d30fa Reuse client mechanism for movement on entities
Also brings in some MonoGame math classes to fulfill this purpose.
2016-04-06 21:37:11 -04:00
Drew DeVault
44e01d0fe7 Disable lighting by default via config.yaml 2015-07-03 10:54:55 -06:00
Drew DeVault
ff0ee58b37 Refactor A* implementation leading up to JPS 2015-07-03 10:54:55 -06:00
Drew DeVault
7578d5980a Add mob wandering AI 2015-07-02 22:46:20 -06:00
Drew DeVault
b7ba71e095 Add more complex pathfinding unit tests 2015-07-02 18:04:15 -06:00
Drew DeVault
2edd199fca Enable diagonal paths in A* implementation
The way this works is like so, where 'o' is the voxel we're trying to
leave, '_' is a possible exit, 'x' is an obstacle, and * is the exit.

    __*
    _o_
    ___

    xx*
    _o_
    ___

    xxx
    _o*
    ___

    xx_
    _ox
    __*

Basically, if both the north and east paths are available, AND the
northeast path is available, we use the northeast path.
2015-07-02 17:52:55 -06:00
Drew DeVault
b56a53dc81 Further refinements to A* 2015-07-02 17:22:57 -06:00
Drew DeVault
f2ab1c0598 Implement A* pathfinding and relevant tests 2015-07-02 17:05:44 -06:00