Commit Graph
98 Commits
Author SHA1 Message Date
Acruid 8f968760cb Replace IMapManager.FindGridAt with IMapManager.TryFindGridAt.
Grid spatial queries do not return the default grid anymore.
2020-02-27 02:10:18 -08:00
Pieter-Jan BriersandAcruid d9ae0efada Fix FOV being broken when lighting is disabled. 2020-02-26 14:03:28 -08:00
Pieter-Jan BriersandGitHub 32bafb66a8 Shadows & FOV. (#992)
* Work on shadow casting.

* Shadowcasting depth works, code cleanup

* Adds #include support to SWSL parser.

* Move lighting shader to swsl.

Also more shader parser fixes.

* Move PI constant to correct file.

* Got functional FOV, working on wall bleed.

* Hey, it kinda works.

* Occluder component now lives in shared.

* Optimizations.

* Fix light map color format.

I set it to something else while testing perf.

* Front face cull final FOV pass.

* Fix holes in occlusion geometry due to disabled occluders.

* Starting work on better wall handling.

* Some comments.

* Improve font-face-culled FOV pass.

* Improve various light biasing things.

* VSM, smooth shadows.

Also unused VSM blurring because it didn't work but committing it like this will forever keep it in Git somewhere.

* FOV smoothing, looks kinda awful.

* Base wall bleed blur strength on camera size.

* The part where I give up.

* Comments. Many comments.

* Allow eyes to disable FOV.

* Improve OccluderComponent on the client.

* Update for occluder component changes.

* Maybe do this properly...
2020-02-23 17:18:58 +01:00
Tyler YoungandGitHub 214f9f0323 Implement client bubble PVS. (#983)
* bubble implementation

include contained entities

fix line edit crash when clipboard contents are null somehow

use CVar for update bubble range

remove seenMovers that get NaN'd out of MaxUpdateRange - huge reduction in network traffic from bullets

cut default of MaxUpdateRange down to 12.5 for now

maybe handle teleported things

handle removing player state on disconnect

fixed positional audio errors

make UpdateEntityTree also update player's last seen ents

make net.maxupdaterange cvar tunable at runtime w/o impacting performance

back to position nan as means to hide from client

revert work pooling as the wrong player was getting the wrong game state

ffs needed to think less about *if* something is *seen* and more about *when* it must be *unseen*

clean up usings

handle parenting and sequencing issues that arise on the client

gather needed ents to update recursively

applied suggestions from code review

fix missing recursively contained ents

make assumption that client last saw things on first tick instead of tick zero, as zero would be the "from tick" and first would be he "to tick"

add First tick as constant to GameTick due to relevance above

renamed includedEnts to checkedEnts to make usage more clear

added comments

inverted some conditions to flatten parts of the pvs logic

fixed sending states when already seen (lastChange < lastSeen to lastChange <= lastSeen)

fix sending states when no actual changes (other bugs?)

local caching of currentTick, remove priorTick

* make TransformComponent's Parent setter call Dirty() to handle replicating network state if AttachParent isn't invoked

* fixed parent changed by setting Parent on Transform not updating parent's Children collection and other stuff

rotating parent entities now are visible with their orbiting children if one of their children moves into view

* break out duplicated code as GetLastSeen

* remove unused net.parallelstates

introduce net.pvs to configure enabling/disabling PVS
2020-02-23 14:42:54 +01:00
Pieter-Jan BriersandGitHub b282881482 Key name API, slight input manager cleanup. (#985)
* Adds API for retrieving correct key names & key combination strings.

* Remove (most) bit flag stuff from InputManager.cs.

Replaced it with a union.
2020-02-17 11:13:12 +01:00
Pieter-Jan Briers b3288d1d5c Work around OpenGL drivers not respecting GL_DEBUG_OUTPUT_SYNCHRONOUS. 2020-02-08 00:13:17 +01:00
Pieter-Jan Briers 0df2d7c89d More Clyde refactoring, FOV works now. 2020-02-06 14:14:27 +01:00
Acruid 1545340d5c Fixed bug in matrix multiplication that caused entities to be drawn in the wrong spot in the world. 2020-02-04 22:24:22 -08:00
Pieter-Jan Briers 0169312c0b Not actually functional FOV system.
There's enough various changes in here that this is worth committing already.
2020-02-05 00:10:58 +01:00
QuantomicusandGitHub cff6a9a5a7 Remove selector support in the RSI format (#952) 2020-02-04 23:43:27 +01:00
Pieter-Jan Briers 322ac488a1 Split part of Clyde rendering off to another file. 2020-01-28 17:05:47 +01:00
Pieter-Jan Briers 11f4f3820c Skip entity drawing if we are in nullspace. 2020-01-26 18:34:40 +01:00
Pieter-Jan Briers a4bf3161fc Clyde windowing improvements:
Pauses rendering if the window is minimized.
Fixes #931

I apologize in advanced for the non-atomic commit.
2020-01-22 23:45:12 +01:00
Pieter-Jan Briers 28fe0313d1 Added stencil testing support to shader instances. 2020-01-21 18:10:44 +01:00
moneylandPieter-Jan Briers d1dc84c632 Fix crash when minimizing game window (#933)
Returns early if the window or framebuffer width or height = 0 to avoid dividing by zero. Checked the vector components individually instead of using `Vector2i.Equals()` because you can end up in a situation where width is non-zero and height is zero if you manually resize the window instead of using the minimize button.
2020-01-21 03:18:11 +01:00
Pieter-Jan Briers 132f15b32d Rendering optimizations. 2020-01-20 17:45:33 +01:00
Pieter-Jan Briers 0739367013 Fix a bunch of compiler warnings. 2020-01-15 14:50:46 +01:00
Pieter-Jan Briers b458dd96a3 Fix Clyde erroneously culling on chunk rendering.
Fixes #912
2020-01-15 14:10:05 +01:00
Pieter-Jan Briers 74a940ca9e Apparently that's not how window scaling works in GLFW.
Fixes mouse input issues on certain non-macOS platforms.
2020-01-09 03:09:16 +01:00
ShadowCommanderandPieter-Jan Briers 5037ace00b Fix mouse input on HiDPI monitors (#927) 2020-01-08 11:50:25 +01:00
Acruid 8d30bcb041 Added a ShowContents flag to containers so that the contents can be rendered.
Added `bool TryGetContainer(IEntity, out IContainer)` to containers.
Changed the API of ContainerHelpers.
2020-01-03 15:16:07 -08:00
Pieter-Jan Briers da579d6b57 Replace a glBufferSubData call with a glBufferData call.
No real reason to subdata this.
2020-01-02 11:16:18 +01:00
Pieter-Jan Briers 4e6906fa7f Remove unused code in Clyde.Windowing.cs 2020-01-02 02:04:08 +01:00
Acruid 37aee07596 Rename GridId.Nullspace to GridId.Invalid, because it has nothing to do with Nullspace anymore. 2019-12-29 18:02:02 -08:00
Pieter-Jan Briers 6d8bfcc7bb Avoid breaking batching on every shader change.
This fixes batching not working for sprite layers. They'd set & reset the active shader constantly which broke batching.

Active shader is now part of batch meta data and broken like other data like textures.
2019-12-28 13:25:28 +01:00
Pieter-Jan Briers 900910e4de Fix crime of using static for stock Textures. 2019-12-28 12:52:19 +01:00
Pieter-Jan Briers a76191c138 Use R11FG11FB10F for lighting framebuffer.
This halves the memory necessary for the lighting framebuffer, so probably helps with bandwidth usage (especially on integrated GPUs) too.

I couldn't notice a decline in visual quality on my (admittedly) bad laptop screen.
2019-12-28 03:28:41 +01:00
Pieter-Jan BriersandGitHub 3c08f56619 Sprite orientation improvements (#917)
* Fold animation delays into a single set for all directions.

* Update systems to use new RSI animations API.

* Fetching layer directions now done in sprite render.

* Allow overriding direction in SpriteView.
2019-12-24 01:15:44 +01:00
Pieter-Jan Briers 21b29e26e2 Fix a bunch of warnings. 2019-12-22 13:50:29 +01:00
Pieter-Jan Briers 610bfea95c Clyde improvements.
Reduced the amount of buffer data calls to the OpenGL driver significantly, cleaned some code up to make it easier to extend Clyde.
2019-12-18 12:21:52 +01:00
Pieter-Jan Briers 6c0c395dc7 Remove lite stuff from Clyde. 2019-12-17 19:25:05 +01:00
Pieter-Jan BriersandGitHub 52e5afd277 Switch to GLFW for windowing (#914)
* Use GLFW instead of OpenTK windows

* Seems to work pretty well now.

* Fix stackalloc issue on Framework.

* Add GLFW project to sln.

* Fix package downgrade.

* Fix SLN more.

* Please work.

* Fix C# version error.
2019-12-15 15:53:30 +01:00
Pieter-Jan Briers 3095952dcb Use our own SpaceWizards.SharpFont for better .NET Core support. 2019-12-11 06:46:26 +01:00
Pieter-Jan Briers 12787db8de Avoid crash in Clyde if the GLSL compiler optimizes out uniforms. 2019-12-06 02:29:58 +01:00
Pieter-Jan Briers f3669e6646 Sound system improvements.
This just makes the sound system more flexible so content can do more stuff.
2019-11-27 00:33:54 +01:00
AcruidandPieter-Jan Briers d9a411b260 Shared IMap/Map class removal (#904)
* Moved IMap from Shared/Interfaces/Map to Shared/Map namespace.

* Extracted Map class out of the MapManager class.

* Removed the Map class and interface.

* Fully removed the Map and IMap class.
2019-11-26 20:47:04 +01:00
ShadowCommanderandPieter-Jan Briers 1263e10f5e Add exception to catch rendering deleted entities in UI (#902) 2019-11-24 10:44:42 +01:00
Acruid e82f969589 Adds missing using statement, Master compiles again. 2019-11-22 15:04:29 -08:00
Pieter-Jan Briers 1353dde41d Implement shader instances and uniforms. 2019-11-22 17:55:39 +01:00
EphememoryandAcruid cbe2fe698a Fix window width/height being equal to 0 equal game crash (#896)
* Fix window width/height being equal to 0 equal game crash

* suggested changes
2019-11-18 19:11:55 -08:00
Pieter-Jan Briers 86be98005c Some engine optimizations. 2019-10-22 18:05:08 +02:00
Pieter-Jan Briers d092a63b28 Adds debug panel to show Clyde info & stats. 2019-10-18 14:28:54 +02:00
Pieter-Jan Briers 631ff903b4 Implement tiling textures in StyleBoxTexture. 2019-10-18 01:05:36 +02:00
Víctor Aguilera PuertoandPieter-Jan Briers 0a976b5438 Add BufferedAudioSource to Clyde.Audio (#877)
* Add BufferedAudioSource

* Address reviews

* Address reviews 2: Span boogaloo

* Update EmptyBuffers to use new API.

* Only map needed handles

* Delete buffers on dispose.
2019-10-17 01:52:23 +02:00
Pieter-Jan Briers cd7a4f0b15 Clean up styleboxes and add support for padding. 2019-10-15 13:11:33 +02:00
Pieter-Jan Briers 72402f3983 Cull entity, light & chunk rendering. 2019-10-13 15:23:20 +02:00
Pieter-Jan BriersandGitHub 9868f186f3 Remove some unecessary NuGet dependencies. (#871)
Also made the window icon work again.
2019-09-24 12:42:59 +02:00
Pieter-Jan Briers b397a43845 Implement light masks. 2019-09-17 15:24:14 +02:00
Pieter-Jan Briers 2651a3db56 Texture loading improvements.
Can load non-sRGB Gray8 images.
Allow disabling sRGB on textures.
2019-09-17 15:24:13 +02:00
AcruidandPieter-Jan Briers 240c9a2df0 Removes EyeComponent's reliance on TransformComponent.OnMove. Now is uses an EntitySystem that is ran every frame. (#860)
Refactored some functions off of Eye, removed the IEyeManager dependence from it.
2019-09-06 08:09:49 +02:00