Commit graph

36 commits

Author SHA1 Message Date
Ryan Johnson 153cde1a04
Chunk Rewrite With Paletted Containers (#91)
The current approach to managing chunk data is misconceived. This new approach uses genuine paletted containers and does not suffer from complexities caused by caching. As a result, memory usage (according to htop) in the terrain example with render distance = 32 has gone from 785 megs to 137 megs. That's 17.4% of the memory it used to use. Terrain generation speed was not affected.
2022-10-07 15:52:55 -07:00
Ryan 5a686a0e8b Derive terrain seed from current day
It's easier to test things when the terrain isn't constantly changing.
2022-10-07 00:17:14 -07:00
Ryan 65dc561868 Document and rename default_client_event to handle_event_default. 2022-09-11 21:59:05 -07:00
Ryan bc470f3eb3 Consistent logo file names 2022-09-11 00:20:17 -07:00
Ryan Johnson ca4f47c768
Implement the player sample (#47)
Verify that it works by hovering your mouse over the player count in the
cow_sphere example.
2022-09-10 16:02:12 -07:00
Ryan Johnson 20546e2fb8
Split Chunk into loaded and unloaded types (#37)
These changes will pave the way for nonblocking terrain generation in `terrain.rs`.
2022-09-08 19:33:24 -07:00
Ryan 30e05bb373 cargo fmt 2022-09-04 22:21:24 -07:00
Tristan F d7e229e0a9 Make default client event 2022-09-04 15:42:08 -04:00
Ryan 2a266fb091 Change rustfmt settings 2022-08-28 21:31:07 -07:00
Ryan 793a795732 Check protocol version during login 2022-08-14 15:18:22 -07:00
Ryan 55cb595740 Improve chunks API 2022-08-10 20:09:10 -07:00
Ryan 003c2e3649 Enable authentication in examples 2022-08-10 10:32:05 -07:00
Ryan d4d169d130 Use chunk state instead of HashSet 2022-08-09 17:24:21 -07:00
Ryan 3649a8ca99 Make superflat option per client rather than per world 2022-08-09 15:09:51 -07:00
Ryan a5a560220c New player list implementation 2022-08-09 14:44:04 -07:00
Ryan 1838c290a0 Extract slotmap logic into separate modules 2022-08-08 18:42:39 -07:00
Ryan 49d63a39c0 Clean up client and fix names 2022-08-05 12:36:34 -07:00
Ryan 35c697ff93 Rename *Data to *State 2022-07-27 19:21:11 -07:00
Ryan 2e22946ffc Rewrite the entity generator 2022-07-27 07:10:35 -07:00
Ryan 865ab76699 Add custom data 2022-07-15 20:40:39 -07:00
Ryan 9d0363ac4e Add logo 2022-07-12 16:54:36 -07:00
Ryan 24cf864ed1 Don't export items arbitrarily at the crate root 2022-07-06 18:27:59 -07:00
Ryan 3ac711ca74 Use idiomatic names
The Rust stdlib uses "Kind" instead of "Type".
2022-07-05 19:21:52 -07:00
Ryan c4590a45fc Fix entity create/delete bugs 2022-07-04 16:30:37 -07:00
Ryan a6bb67ecfe Fix client respawning 2022-07-03 18:45:11 -07:00
Ryan 79cb4c159a Store entities and clients per server rather than per world 2022-07-03 15:31:24 -07:00
Ryan 340318b9b6 Get system chat working 2022-07-01 19:18:59 -07:00
Ryan 9a87fda211 Rename packets 2022-06-30 14:18:29 -07:00
Ryan fa2241c038 Basic chat message support 2022-06-29 21:34:20 -07:00
Ryan 806ffa4f42 Remove &mut wrappers
The mutable reference wappers were causing more problems than they were
solving. We will document the dangers of mem::swap later.
2022-06-29 11:09:00 -07:00
Ryan e97df76a75 Don't tamper with the texture payload
The texture payload (skin + cape URL) that we get from the auth server
needs to stay intact so the signature is not invalidated. However, skins
still aren't loading. Not sure what's up with that.
2022-06-28 18:29:29 -07:00
Ryan 055dd03ffc Implement the player list 2022-06-27 17:52:23 -07:00
Ryan 69ba704352 Implement the block change packets 2022-06-22 08:06:54 -07:00
Ryan f75debdd50 Tweaks to terrain.rs 2022-06-21 15:07:02 -07:00
Ryan 16b9b4ca9e Support the last death location for the recovery compass 2022-06-21 14:14:16 -07:00
Ryan 8ad9c8587a Upgrade the chunk example 2022-06-19 08:40:37 -07:00