Commit graph

14 commits

Author SHA1 Message Date
Kamron Batman
fa5eafdaff
fix: Adds Created, LastSerialized, and BeforeSerialize for all entities. (#775)
* Adds `BeforeSerialized` for entities to handle cleanup.
* Adds `Created` and `LastSerialized` fields to all entities. While this is a big bloat, this will be necessary for identifying dangling references to other invalid entities.
* Changes formula for determining a valid reference to be _not null, not deleted, and reference's created date must be at or before the entities last serialized date_.
* Adds versioning to idx file and serializes `Created` and `LastSerialized`.
* Fixes Save Stats and also disables it by default.
2021-09-26 01:09:45 -07:00
Kamron Batman
6e9477ea13
fix(core): Updates to serialization (#590)
- [X] Adds `AdhocPersistence` which replaces RunUO `Persistence`
- [X] Fixes a few minor bugs with EntityPersistence deserialization
- [X] Reverts/updates some serialization changes
2021-05-09 00:10:39 -07:00
Kamron Batman
c2143584bc
fix(core): Fixes BufferWriter Seek and removes World.SaveBuffers (#359)
- [X] Fixes an issue in BufferWriter where if SeekOrigin.End is used, it will yield the wrong index.
- [X] Changes BinaryFileWriter to dispose pattern
- [X] Removes World.SaveBuffers. They were dangerous and should be done in-line while the world is loading, even if it is slower
- [X] Fixes BufferReader Seek too
- [X] Changes BufferWriter to use uninitialized arrays to speed up resizing
- [X] Changes World loading so it doesn't buffer the whole file, even if it makes things slower. It lowers allocations/fragmentation over all which is good.
- [X] Changes World Loading to use uninitialized arrays and directly saves them to the SaveBuffer which eliminates having to open/load the files _again_ which is dangerous. Also looping through items while the world is running is dangerous since async references can and will cause exceptions.

Bumps release version
2020-12-24 14:21:17 -08:00
Kamron Batman
525cda5413
Cleanup & Fixes for .NET 5 (#309)
- [X] Fixes several bugs
- [X] Updates more ordinal issues
- [X] Cleans up the code a bit
- [X] Turns classes static that should have been
- [X] Changes TcpServer.Instances to a HashSet

Bumps release version
2020-11-15 10:03:50 -08:00
Kamron Batman
55935d30b4
Fixes bugs in world save (#297)
- [X] Fixes bugs in the buffer writer
- [X] Removes background save commands
- [X] Avoids calling Serialize() on deserialization
    - In a future optimization I will copy the entire object to a buffer, deserialize using a SpanReader, then use that buffer for the SaveBuffer
- [X] Fixes issue with decay queue.

Bumps release version
2020-11-01 17:22:18 -08:00
Kamron Batman
1ca8655fc1
Updates Serialization (#292)
- [X] Removes all save strategies
- [X] Removes duplicate file writer that won't be used
- [X] Removes persistence (it will become a duplicate system)
- [X] Add a save position variable to skip serializing a clean item/mobile
- [X] Update Guilds/Accounts to be IEntity types
    - Because guilds are abstract, this may make serialization tricky.
- [X] Update the generalized IEntity writing
- [X] Update the load/save to write to buffers then to files in background


Bumps release version
2020-10-31 17:38:29 -07:00
Kamron Batman
741e8d8300
Cleanup/Housekeeping (#242) 2020-09-12 15:31:21 -07:00
Kamron Batman
dad5997c85
Fixes copyright headers and live template (#216) 2020-09-03 01:47:20 -07:00
Kamron Batman
86b7b3aed1
Fixes formatting (#200) 2020-08-25 18:53:35 -07:00
Kamron Batman
556a17aba8
Adds style cop (#109) 2020-04-26 00:16:02 -07:00
Kamron Batman
2c0d97cd36
Switches to Kestrel (#102) 2020-04-12 20:57:48 -07:00
Kamron Batman
5b5bfeb4b0
Adds EJ (#99) 2020-04-10 14:41:39 -07:00
Kamron Batman
57b14ad690
Code Cleanup & Fixes Warnings (#74) 2020-01-18 14:56:45 -08:00
Leath Cooper
5c8821b11c Serialization interfaces (#62) 2019-12-30 12:16:35 -08:00