279 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
444a3f47ed Fix dungeon generation issues
Fixes #249
2017-05-23 19:25:23 -04:00
Drew DeVault
2b130e816f Fix up some straggling threading issues in Region 2017-05-23 18:29:57 -04:00
Drew DeVault
535437f51e Fix chunk damage during terrain gen 2017-05-23 18:22:06 -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
9a61e73ebd Do not allow placement of blocks within entities 2016-07-04 20:26:59 -04:00
Drew DeVault
e51d22cb52 Handle physics corner cases (literally) 2016-07-04 20:12:48 -04:00
Drew DeVault
a2f7f62a67 Update height map before trying to access it
Only if not already populated
2016-07-04 20:12:45 -04:00
Drew DeVault
e1114ccda8 Fix up nunit tests + travis 2016-07-04 15:02:59 -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
d04e5de273 Add option to invert the mouse
Closes #189

Regards to @illblew
2016-04-06 18:53:40 -04:00
Drew DeVault
68f53787fc ItemStack.Empty -> ItemStack.EmptyStack 2016-03-20 14:12:57 -04:00
Peroalane
e476546bd0 Another fix. 2016-03-20 18:56:10 +01:00
Peroalane
c1c9832fb1 Fixes 2016-03-20 18:52:25 +01:00
Peroalane
66cc475d9f Fix grass seed drop 2016-03-20 18:40:59 +01:00
cra0zy
3c55b9d642 Update NuGet packages 2016-03-15 19:45:37 +01:00
Drew DeVault
1750eb60d6 Add interactive bounding box to sugarcane, torches
Note that torches have a different bounding box depending on their
metadata, which is not currently supported by the block model.
2016-01-03 12:06:02 -05:00
Drew DeVault
5c48a2e115 Switch launcher to HTTPS
Also fixes #219
2015-11-08 08:30:23 -05:00
Drew DeVault
95f49dd277 Add crafting bench support to client 2015-10-09 08:33:04 -04:00
Drew DeVault
0c6a973a69 Unify server and client implementations of windows 2015-10-09 07:42:37 -04:00
Drew DeVault
bbb457af87 Fix inconsistent location of .truecraft 2015-10-08 22:02:03 -04:00
Drew DeVault
6b38bc7c03 Finish implementation of inventory window 2015-10-08 19:05:32 -04:00
Drew DeVault
facf8ce2c6 Send players their health on log in
Health is already being saved to disk with their NBT file, so this just
involves sending it to them when they log in.
2015-10-08 08:19:15 -04:00
Drew DeVault
3da7d25a3d Rewrite chat interface 2015-10-07 08:36:43 -04:00
Drew DeVault
42f682ac1c Drop items when you exit a crafting bench
Fixes #26
2015-10-07 07:21:12 -04:00
Drew DeVault
c4a65da5a1 Improve identification of .minecraft directory
This will use the following, in this order:

- $XDG_CONFIG_HOME/truecraft
- .config/truecraft (%APPDATA% on Windows)
- ~/.truecraft (%USERPROFILE% on Windows)

Fixes #201
2015-10-06 08:10:30 -04:00
Drew DeVault
2395c535b8 Fix build 2015-10-06 07:48:49 -04:00
Drew DeVault
b0624e26b3 Add full list of burnable and smeltable items 2015-10-06 07:28:00 -04:00
Drew DeVault
de880f2f8c Merge branch 'client-audio' 2015-10-05 22:08:25 -04:00
Drew DeVault
a361703746 Implement walking sounds
These sounds change depending on what kind of block you're walking in.

Still to come: sound effects for mining and placing blocks
2015-10-05 22:06:59 -04:00
Drew DeVault
d4ccb22e4f Reinitialize furnaces when loaded from disk 2015-10-05 08:44:54 -04:00
Drew DeVault
98b15c3434 Fix minor bug with fuel consumption from furnaces 2015-10-05 08:36:32 -04:00
Drew DeVault
05cffcf631 Finish implementing furnaces (server side)
That is, it works with the Minecraft client, but not with the TrueCraft
client.
2015-10-05 08:35:28 -04:00
Drew DeVault
a22cb1ce12 Improve physics stuff, fix falling sand/gravel
Fixes #69
2015-10-04 18:11:29 -04:00
Drew DeVault
11489e7f95 Partially implement furnace blocks 2015-10-04 15:46:43 -04:00
Drew DeVault
cc1eccae02 Fix issues with metadata from mined wood and wool 2015-10-03 09:51:52 -04:00
Drew DeVault
eda920cb75 Allow players to throw items at an angle
Fixes #73
2015-10-02 08:41:40 -04:00
Drew DeVault
8367f97451 Fix more snow issues
<_<
2015-10-02 08:29:30 -04:00
Drew DeVault
ed85da313f Fix remaining issues with snowfall blocks
Fixes #194
2015-10-02 08:22:58 -04:00
Drew DeVault
14aa3ce07a Add "InteractiveBoundingBox" to IBlockProvider
This is used to determine the bounding box for interaction in the client
(the ray that's cast from your camera interacts with it to determine the
highlighted block).

TODO: Make it work better with metadata.

This commit also fixes one of the issues with snow: ref #194
2015-10-02 08:15:29 -04:00
Drew DeVault
9ccbf80ce5 Add block placement/right click actions on client 2015-09-30 20:17:20 -04:00
Drew DeVault
8a0ad17b00 Add icon texture mappings for all items 2015-09-30 18:29:07 -04:00
Drew DeVault
8d8da15f5a Decode and store inventory updates from server 2015-09-30 08:36:30 -04:00
Drew DeVault
b0c41ffdcc Reduce the max grow time for cactus 2015-09-30 07:36:03 -04:00
Drew DeVault
07362ad666 Implement digging on client*
* With known limitations

- Changing blocks still doesn't re-render correctly
- The item you're holding doesn't factor into your digging time
- No animation on the block you're digging out
2015-09-27 22:32:07 -04:00
Drew DeVault
8f2a4e54a9 Add highlighted block model and VoxelCast class 2015-09-24 08:28:16 -04:00
Drew DeVault
0b9a3c34d1 Change gravity for a few entities to 1.98 m/s^2 2015-09-21 08:38:29 -04:00
Drew DeVault
6956500ef1 Fix oversight on x/z collisions 2015-09-20 17:57:07 -04:00