Commit Graph
132 Commits
Author SHA1 Message Date
ComicIronicandGitHub caa876dbb3 Fix TickRate causing CurTime jumps (#1106) 2020-06-06 23:50:02 +02:00
chairbenderandGitHub d148bde02b Command Binding System supporting multiple bindings (#1089) 2020-05-31 20:44:16 +02:00
Pieter-Jan Briers cb3fe9c138 Adds AttachedProperty<T>.
Generics are useful.
2020-05-31 00:34:56 +02:00
ComicIronicandGitHub c9157c8b57 Adds custom YAML serializer for ints in terms of named constants (#1088)
Works similar to the flag serializer, except it allows for magic numbers
to be given names in the YAML.
2020-05-30 12:07:19 +02:00
LeoandGitHub 44fcb0232c Adds theyre text macro (#1080) 2020-05-28 17:47:55 +02:00
Pieter-Jan Briers 9eeb1d1afa Fix compiler warnings 2020-05-28 17:44:31 +02:00
Pieter-Jan Briers 5b9789870b Fix inheritance overriding behavior on PlacementMode. 2020-05-28 00:27:22 +02:00
Hugal31andGitHub b4eac8526a Implement text macros (#1058) 2020-05-25 20:47:51 +02:00
ComicIronicandGitHub 5ebd8a4221 Add system for using flag names in YAML (#1047) 2020-05-24 22:43:30 +02:00
Jackson LewisandGitHub 274334c926 Rewrite the physics engine (#1037) 2020-05-23 01:21:02 +02:00
Pieter-Jan Briers eb6463fad0 Fix failing test 2020-05-20 16:16:25 +02:00
Pieter-Jan Briers 2424adbe6e Clean up unused cruft files. 2020-05-17 02:12:00 +02:00
Pieter-Jan Briers d6b25945e4 Adds AltOrigin functionality property to PopupContainer. 2020-05-13 17:55:33 +02:00
Pieter-Jan Briers b7f3627ef1 Remove List<>/Dictionary<,> usage from low-level GameState serialization.
NetSerializer does not handle these well and sends the entire backing array instead of a more compact representation. This can then cause it to start sending lists of length 1 with a *capacity* of 4096 resulting in 250 KiB/s down to send updates for a single entity. As it just did on the public server...
2020-05-12 18:34:16 +02:00
Pieter-Jan Briers 1f6bd2481f Allow escaping command parsing. 2020-05-03 15:59:15 +02:00
ComicIronicandGitHub 4b50b151fe Minor improvements to printing in VV (#1041) 2020-05-02 00:15:59 +02:00
Jackson LewisandGitHub 10f98e2fca ServerEntityNetworkManager doesn't dispatch messages if the client got disconnected (#1030) 2020-04-20 15:46:11 +02:00
Pieter-Jan Briers 2f02cb271a Fix tests. 2020-04-19 01:00:39 +02:00
Pieter-Jan BriersandGitHub 0c8f869cb4 Prediction (#1027) 2020-04-18 17:35:54 +02:00
Pieter-Jan Briers ba933f7db0 Improvements to allow better connection dialog in content. 2020-04-17 14:41:22 +02:00
PrPleGooandGitHub 6d8a0f6558 ISelfSerialize interface (#1021)
* Special check for decimal in serialization code. Changed method in IoCManager for a little QoL

* ISelfSerialize stuff

ISelfSerialize interface for stuff that want to implement their own (de)serialization.
Forgot that desialize could exist for decimals earlier.
Added ViewVariablesPropertyEditorISelfSerialzable thing for viewvariables.

* fix TestStylesheetOverride

* Fix improper UT logic

* Somewhat neater VV lineEdit event hanlding

* remove whitespace and unused using

* uninherit ViewVariablesPropertyEditorISelfSerialzable

* Fix improper use or ToString

* seal VV classes
2020-04-08 21:24:32 +02:00
Pieter-Jan Briers ec52102d02 Allow controls to override stylesheets for itself and descendants. 2020-04-04 15:07:53 +02:00
Pieter-Jan Briers 9cca7ce8ef Expose client connection state. 2020-04-04 15:07:31 +02:00
Pieter-Jan Briers 7e536954be API for accessing initial launch parameters like --launcher. 2020-04-04 15:06:47 +02:00
Pieter-Jan Briers fd8e68091e Fix implementation, add tests. 2020-03-25 21:34:30 +01:00
AcruidandGitHub a947a38f3c View Rotation (#1016)
* Adds a derived class from Nunit's Is test constraint class.
The game camera can now be rotated.

* Added the new `bind` command to the console, used to bind a key to a keybind.
Added two new keybinds for rotating the View camera left and right.
Added more info to the ""Component does not exist for state" exception.
Added Reduced() and FlipPositive() public functions to Angle.

* Fix a copy/paste bug.

* Adds missing code to bind/unbind CameraRotateLeft.
Camera snapping now actually uses the CameraSnapTolerance constant.
2020-03-25 02:22:18 +01:00
Pieter-Jan Briers ff1bfde979 Optimize CommandParsing a bit and add tests. 2020-03-25 02:12:23 +01:00
PrPleGooandGitHub 5c461a8500 Added unit tests for some collision code and a small rename (#1014)
* Changed how collision checks work

* Undid asym collision

* Push to switch machines

* Added UnitTest to clarify the logic in CollidesOnMask

* moved test into testcase
2020-03-15 07:27:25 +01:00
Pieter-Jan Briers 3e62e6d1f6 Fix a bunch of tests 2020-02-28 04:05:56 +01:00
Pieter-Jan BriersandGitHub 0b1f088f8c Better entity exception tolerance (#996)
* Use separate define constants for exception tolerance stuff.

* Improve handling of exceptions during entity creation.

The entity in question now gets marked as deleted immediately.

* Glorious.

* Testing components, tests, wrapper exception type.
2020-02-24 03:56:50 +01:00
Acruid a5e47d9307 Adds more unit tests for EntityEventBus. 2020-02-22 12:49:17 -08:00
AcruidandGitHub 728f58465d EntitySystem Event Refactor (#989)
* Removed the EntitySystem event implementation, it now uses the more advanced EventBus.
Removed EntitySystem.RegisterMessageTypes() function.
Removed EntitySystem.SubscribeEvents() function.
Added EntitySystemMessage.NetChannel field. This holds the remote net channel the event originated from.

* Removed the Sender object from events. If you needed this field, add it to the event class.

* Removed unused event proxy methods from Entity.
SubscribeEvent() has been split into SubscribeNetworkEvent() and SubscribeLocalEvent() methods on EntitySystem.
Most methods on EntityEventBus now require callers to specify the source (Local or Network) of the events.
2020-02-22 17:59:43 +01:00
Pieter-Jan Briers bc630d9b01 Disable status host in integration tests. 2020-02-08 15:36:48 +01:00
Tyler YoungandGitHub 755675eaab Introduce DynamicTree, Separate Ray from CollisionRay (#951)
* separates Rays from CollisionRays, removing collision masking from Ray

* Entity, ClientEntityManager and EntityManager classes occasionally need to UpdateEntityTree

Entity intersection queries now use a DynamicTree

DynamicTree now correctly reports Count and separately NodeCount

DynamicTree now has optionally precise queries

DynamicTree no longer incorrectly Adds on AddOrUpdate if Update is not necessary

Entity startup now starts Transform, then Collidable, then remaining components

EntityManger's Entity dictionary is now a ConcurrentDictionary to support iteration under modification

DynamicTree freeing root leaf no longer results in invalid tree

SnapGridComponent has been extended to support additional area and directional queries

* added lots of calls to UpdateEntityTree, will need to scale back during review

fixed moved/changed AABB updates to DynamicTree, missed a ref

converted other methods in EntityManager to use the tree for spatial queries

* add unit tests for DynamicTree

make Capacity and EnsureCapacity public, setting Capacity will call EnsureCapacity

* fix brace style

* Box2 Grow -> Enlarged, Combine -> Union
2020-02-06 14:13:15 +01:00
Pieter-Jan Briers 76933003ad Improve native downloading spaghetti, use own Freetype on macOS 2020-01-30 13:29:19 +01:00
Pieter-Jan Briers ada2c3f39c Fix handling of disconnects in the integration test netmanager.
Clients would treat any message coming in as being from the server they're connected to, instead of ignoring them if they're not correct.

This made the client crash inside integration tests because messages came in while disconnected.

This fixes that.
2020-01-26 23:51:57 +01:00
Acruid f33f9a7b52 Move raycasting into the broadphase algorithm.
Raycasts now require a MapID so that the ray is restricted to a single map.
2020-01-25 12:14:09 -08:00
Pieter-Jan Briers 768121bc57 Fix popups going off-screen with a new PopupContainer. 2020-01-25 17:26:37 +01:00
Pieter-Jan Briers 3d11cf2f87 No running AssemblyTypeChecker unless necessary, use less dumb byte copies. 2020-01-25 16:27:30 +01:00
Acruid 42932b3ff6 Adds IMapGrid.CollidesWithGrid() which tests if a point is actually inside a non-empty tile. 2020-01-24 17:10:05 -08:00
Acruid 9f956cef95 Renamed SpawnEntityAt to SpawnEntity.
SpawnEntity now throws an exception if an invalid GridID is passed in the coordinates.
2020-01-24 15:44:08 -08:00
Pieter-Jan Briers d945247f31 Add necessary infrastructure to allow content to launch game from itself.
This allows us to make Content.Client and Content.Server Exe projects so that they can be executed directly via your IDE. This'll help wtih not forgetting to do a full rebuild and such.
2020-01-22 20:16:29 +01:00
Pieter-Jan Briers 103fca8bc7 Add MapCoordinates.Nullspace. 2020-01-20 22:26:04 +01:00
Pieter-Jan Briers dd98f3cbad Adds IntegrationInstance.Assert to aid using assertions. 2020-01-20 22:09:15 +01:00
Pieter-Jan Briers e7ccef53de Update NuGet dependencies. 2020-01-20 20:41:01 +01:00
Pieter-Jan Briers ab465d2af8 Fix unit tests. 2020-01-20 18:47:44 +01:00
Acruid 6249ae8d0d Fixes issue where map entity was not being deleted from Nullspace on restart. 2020-01-20 00:04:13 -08:00
Pieter-Jan Briers 0739367013 Fix a bunch of compiler warnings. 2020-01-15 14:50:46 +01:00
Acruid ed134da488 MapManager_Tests now work on both client and server sides. 2020-01-15 03:07:37 -08:00
Acruid 32db0f82f1 Grid chunks now use the GridChunkPartition method for generating a set of collision rectangles and their bounds.
Grid collision rectangles are now drawn as a blue overlay in the CollisionOverlay debug view.
GridChunkPartition now also returns the bounding rectangle, which is a union of all the collision rectangles.
Each IPhysShape now handles it's own debug drawing with a new method, DebugDraw.
2020-01-13 13:40:09 -08:00