Commit Graph
183 Commits
Author SHA1 Message Date
Pieter-Jan Briers 5faa8a59c1 Add some [Pure] annotations. 2020-08-29 07:53:50 +02:00
Pieter-Jan BriersandGitHub 6b92db35f0 Deterministic RobustMappedStringSerializer (#1265) 2020-08-29 07:53:29 +02:00
Pieter-Jan Briers 3f0e2fa429 Fix GameStateProcessor skipping over necessary game states in some extrapolation cases.
Fixes #1246
2020-08-26 13:45:15 +02:00
9d1bec9bb2 Merge FloatMath and MathHelper (#1234)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-08-20 19:21:07 +02:00
Pieter-Jan Briers 21d493a6ec Ensure that paths are rooted in WritableDirProvider. 2020-08-20 18:52:31 +02:00
Pieter-Jan Briers 2fb60f7129 Actually disable runtime log output in integration tests. 2020-08-20 18:52:31 +02:00
Pieter-Jan Briers 3148371d18 Use virtual file system on server integration tests. 2020-08-20 18:52:31 +02:00
Pieter-Jan Briers 773ea34ee3 Make integration tests TearDown OneTimeTearDown.
Fixes concurrency issues.
2020-08-20 18:52:30 +02:00
VinceandGitHub 6a546dadf1 Fixes most warnings (#1233) 2020-08-16 14:04:15 +02:00
Pieter-Jan Briers 1e89c5f1fd IWritableDirProvider does not allow access to parent directories.
Fixes #1229

Added tests.
2020-08-16 01:32:19 +02:00
7bfd5eb72e Add NetSerializer dictionary test (#1214)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-08-14 23:55:07 +02:00
DrSmugleafandGitHub 5c10050f9e Add NetSerializer HashSet test (#1213) 2020-08-14 23:27:17 +02:00
Acruid 64a3916c04 Added the Robust.Physics project.
Added BenchmarkDotNet to the Robust.UnitTesting project.
2020-08-09 13:43:57 -07:00
Acruid 6c3c22affe Added AlignedRectangle (Box2) collision features. 2020-08-09 01:23:03 -07:00
Acruid 900bf76a7d Attempt #2 to fix the timing bugs. CurTime increases again, and all the unit tests pass this time.
This resolves https://github.com/space-wizards/space-station-14/issues/1560.
Special thanks to PJB's prediction unit tests.
2020-07-31 23:20:35 -07:00
Acruid 3fd1a2f3fb Fill out cases for the shape switch.
Circle-Box collisions!

Circle Collisions!

PhysShapeCircle!
2020-07-31 12:02:41 -07:00
Pieter-Jan Briers 53288ffd2b YamlObjectSerializer.IsSerializedEqual now handles dictionaries. 2020-07-31 01:44:56 +02:00
Pieter-Jan Briers 2fc6614118 Add NUnit.Analyzers analyzer
Caught numerous cases of expected/actual being mixed and even a few broken test cases in content.
2020-07-30 18:38:17 +02:00
Pieter-Jan Briers 6a62b618dc More NetSerializer unit tests. 2020-07-30 15:06:45 +02:00
Acruid 350e05c152 Adds new functions to IComponentManager that can efficiently query for all entities with a set of components. 2020-07-29 15:48:32 -07:00
Pieter-Jan BriersandGitHub 3648f43f5c Include NetSerializer as a submodule, add List<T> serializer. (#1195)
* Include NetSerializer as a submodule.

* NetSerializer list serializer.

* Update Actions workflows to handle the new submodule.

* Whoops
2020-07-28 18:56:20 -07:00
Pieter-Jan Briers 406e5277a6 Integration testing improvements.
Run Update in Integration game loop.
Ability to load extra prototypes from a string.
2020-07-26 14:07:24 +02:00
Pieter-Jan Briers a3d250a5c4 Allow YamlObjectSerializer to read/write immutable interface collections. 2020-07-26 01:35:43 +02:00
ShadowCommanderandGitHub 30108cf992 Refactor DetachParent (#1188) 2020-07-25 17:04:14 +02:00
Acruid 8475c1ae4b Moves all of the PhysicsComponent data to the CollidableComponent, and marks the PhysicsComponent as obsolete. 2020-07-21 23:36:42 -07:00
Pieter-Jan Briers 0297464af5 Fix MapID assignment in transform init. 2020-07-22 01:51:17 +02:00
Pieter-Jan Briers bbbaef5da4 Fix integration tests.
They weren't pumping networking anymore because Acruid moved it to Input.
2020-07-20 12:12:56 +02:00
63720cd034 Feature/the macro (#1165)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-11 15:03:28 +02:00
Pieter-Jan Briers 93fcb0df9b Move back to per-component-type-dictionaries for component storage.
It's much faster than the single dictionary approach.
2020-07-11 13:15:44 +02:00
Pieter-Jan Briers a2617312d9 Use Serilog internally for logging, add Grafana Loki log handler. 2020-07-10 20:55:31 +02:00
Pieter-Jan Briers 9e5374ac86 Assert that messages have been registerd in integration tests. 2020-07-06 21:24:03 +02:00
Pieter-Jan BriersandGitHub 31fb65bcb9 Movement prediction work. (#1144)
* Fix client-side input system not sending sequence numbers for input messages.

This caused message ordering issues and keys getting stuck down.

* Make sure EyeUpdateSystem runs after physics.

* IGameTiming.TickFraction helper.

* Subtick data for input commands.

* Literally a unit test to verify that I wasn't going insane while debugging input message ordering issues.

* More prediction logs behind net.predict.

* Move physics to shared and run it on the client.

* Synchronize grid gravity.

* Fix ResetPredictedEntities crash when entities get deleted server-side.

* Fix CollidableComponent setters not calling Dirty()

* Fix going into space while predicting.

* Watch window uses history line edit.

* Fix unpredicted objects stuck-jittering.

* VV tags for interp vars on transform.

* Fix 0 mass objects on client.

* Fix friction calculations being TPS dependent.

* Reset predict flag on handelComponentState
2020-06-24 20:47:20 +02:00
Pieter-Jan Briers 67efd69679 Add explicit update dependency specification between entity systems.
This allows a system to say "I want to update after this other system does".

Based on @chairbender's work with the input binding stuff.
2020-06-19 00:18:59 +02:00
Tyler YoungandGitHub 9cbdd1058c Use CannyFastMath & Update Some Packages (#1130)
update a bunch of packages and use JetBrains.Annotations as private asset as needed

mark some hot math methods agg inline to benefit from loop opts

use FMA for interp

use canny min/max/clamp

make Quaternion NormalizeAngle fixed time and faster

clean up YamlDotNet references
2020-06-18 02:25:36 +02:00
Pieter-Jan BriersandGitHub af249f80c8 Improved click detection supporting features: (#1133)
* Improved click detection supporting features:

Clickable removed from engine
Texture/RSI load hooks for content
New sprite layer API

* Fix tests.
2020-06-18 02:25:02 +02:00
Tyler YoungandGitHub 9662d52f90 Shared String Dictionary ctd. (#1126) 2020-06-13 04:09:48 +02:00
Pieter-Jan Briers b3d4f55f28 Fix ResourcePath.ChangeSeparator for rooted paths. 2020-06-12 22:51:25 +02:00
Pieter-Jan Briers aaa09881cb Enable NRTs for unit tests. 2020-06-12 17:11:32 +02:00
Pieter-Jan Briers b1ab4a61f8 Make sure integration tests get shut down on test tear down. 2020-06-12 15:16:03 +02:00
Pieter-Jan Briers ca1597d952 Add some convenience helpers for integration testing. 2020-06-12 12:42:05 +02:00
0d52def877 Have RobustSerializer use a shared string dictionary (#1117)
* implements shared string dictionary and handshake from net-code-2

* fix unit test

switch to szr sawmill

* try to silence some warnings around ZipEntry

* rebase and use system zip instead of icsharplib

fix rebase artifacts

* Update Robust.Shared/Interfaces/GameObjects/IComponentFactory.cs

* Update Robust.Shared/Serialization/RobustSerializer.MappedStringSerializer.cs

* Update Robust.Shared/Serialization/RobustSerializer.MappedStringSerializer.cs

* Apply suggestions from code review

* Apply suggestions from code review

* Update Robust.Shared/Serialization/RobustSerializer.cs

* since no longer gathering from paths, make string splitting more robust

* make string gathering ignore strings under 4 chars long

make string gathering yet more robust

* add limit to size of mapped strings

* add more string data to feed into shared string dictionary from YAML files

add JSON importer but don't parse RSI metadata yet

fix typo that breaks nulls in MappedStringSerializer

minor refactoring

make string splitting more robust

add WriteUnsignedInt / ReadUnsignedInt for validating WriteCompressedUnsignedInt / ReadCompressedUnsignedInt aren't bogus

* comment out some log statements

* minor refactor, reorder logging

add null check due to smart typing NRT checks

* Add doc comments, readability improvements to MappedStringSerializer

The protocol, handshake, and internal logic are now more documented.

The main area that could still be improved is the documentation of how
the cache system works, but the code is readable enough for now that it
isn't immediately necessary.

* add documentation, organization

* update some more doc comments

* add flows to doc comment for NetworkInitialize

* more documentation and organization

* more docs

* instead of retrieving INetManager by IoC, assign when NetworkInitialize is invoked

* "document" the regex

* Update Robust.Shared/Network/NetManager.cs

* add missing check for LockMappedStrings

* Update Robust.Shared/Serialization/RobustSerializer.MappedStringSerializer.cs

Co-authored-by: ComicIronic <comicironic@gmail.com>

* change to warning instead of throw for unlocked string mapping

Co-authored-by: ComicIronic <comicironic@gmail.com>
2020-06-12 04:09:55 +02:00
Pieter-Jan Briers 8f63ee481e Make sure CurTick increases AFTER ticks in integration tests.
For consistency with the real main loop.
2020-06-10 04:59:50 +02:00
Pieter-Jan Briers 76b0779563 More convenient system for integration tests to override CVars. 2020-06-09 14:11:30 +02:00
Pieter-Jan Briers 3cbfef8b07 Yep it's definitely late *checks clock* oh god. 2020-06-09 03:49:09 +02:00
Pieter-Jan Briers bdab4bc6c9 Why WOULD I run my own tests before pushing? 2020-06-09 03:47:04 +02:00
Pieter-Jan Briers 73618f6bb2 Fix map loading and add map loading unit test. 2020-06-09 03:43:33 +02:00
Pieter-Jan Briers be1ceeb2db Add testing convenience helper to mount strings as files in the VFS. 2020-06-09 03:43:33 +02:00
Pieter-Jan Briers 289938dbd1 Refactor PackLoader.
Use System.IO.Compression instead of SharpZipLib.
Unit tests.
Fixes.
2020-06-08 23:58:32 +02:00
Pieter-Jan Briers 3459e5fd0b Remove explicit x64 platform target to fix ARM64 builds. 2020-06-08 23:36:08 +02:00
Pieter-Jan Briers aec9c5e66d Clear IoC on RobustUnitTest TearDown to hopefully provide better test isolation. 2020-06-08 14:36:18 +02:00