Commit Graph
653 Commits
Author SHA1 Message Date
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
Acruid ea18d6983e If the current map an eye is on does not exist, fallback to the default eye's map. Previously Clyde would throw an exception, crashing the process. 2019-09-05 16:08:57 -07:00
Pieter-Jan Briers 814b686cb7 Explicitly dispose ImageSharp images. 2019-08-28 12:08:05 +02:00
Pieter-Jan Briers d0ec77e804 Blit fonts manually to reduce created garbage. 2019-08-27 23:13:06 +02:00
ShadowCommanderandPieter-Jan Briers a8d6c294ab Input System Refactor (#840)
* Fixes right click menu stopping input

Removed a flag change when the modal stack was showing, which preventing the click from getting passed to the next function.

* Added parsing for mod2 and mod3 from Keybind YAML

* Fixes a crash on context change when a keybind is not defined in keybinds.yml

* Implemented ShowDebugConsole Hotkey

* Refactored input system

Refactored input system to run Key and Mouse input through the InputManager before doing stuff.

* Upgraded LineEdit and classes that use it. Fixed input while KeyboardFocused.

Upgraded LineEdit to use Keybinds.
Upgraded DebugConsole to use Keybinds.
Replaced all references to MouseDown, MouseUp, KeyDown, and KeyUp with KeyBindUp and KeyBindDown.
Moved UserInterfaceManager call from GameController.Input to InputManager event.
Stopped input going to simulation while a control has focus in UserInterfaceManager.

* Some fixes for input system

Fixed keybinds getting stuck when selecting a LineEdit.
Changed MenuBar to not error.
Fixed a few cases where LineEdit would eat input if you hovered over it and where mouse input got eaten when clicking in the world while a LineEdit was selected.

* Removed extra dependencies

* Added GUIBoundKeyEventArgs to ButtonEventArgs

* Fixes for input with LineEdit selected

Fixed multiple keybinds mapped to the same key not triggering.
Fixed keybind input not getting to LineEdit when hovering over a control.

* Implemented Key Repeat for LineEdit

* Fix for input on Robust.Lite Launcher

* Renames NonFocusKeybinds to EnableAllKeybinds

Renamed NonFocusKeybinds to EnableAllKeybinds and added comment to clarify usage

* Adds repeating keybinds

Used for TextBackspace, TextCursorLeft, and TextCursorRight
Reverts a change to LineEdit that implemented repeating keys
Adds some documentation comments
2019-08-21 17:13:48 +02:00
Pieter-Jan BriersandGitHub cb5f2ffae1 Refactor UI system. (#843)
* Refactor UI system.

Deferred updating is used for styling & layout. This fixes the awful time complexity of containers.
Removed SetDefaults and Initialize. They were a bad idea alright.

* Fix build on .NET Framework.
2019-08-14 22:03:51 +02:00
Pieter-Jan Briers cdac0d5757 Correctly delete disposed audio sources on the main thread. 2019-08-14 10:48:54 +02:00
Pieter-Jan Briers 468fbda539 Ensure stable sort in the entity rendering sort. 2019-08-12 18:46:34 +02:00
Pieter-Jan Briers 6a331cfdf6 Re-organize OpenGL init so debug callback gets initialized earlier. 2019-08-05 15:58:58 +02:00
Pieter-Jan Briers 0a41ef3c9a Unified those messy FrameEventArgs. 2019-08-04 01:08:44 +02:00
Pieter-Jan Briers c0eca4f6c2 .NET Core support. 2019-08-02 02:07:03 +02:00
Pieter-Jan Briers 6f201ccddc Renderer optimizations.
Nothing major, but it should be a bit faster now.
2019-08-01 02:14:03 +02:00
Pieter-Jan Briers 85a4375905 Various performance optimizations. 2019-08-01 00:10:20 +02:00
Pieter-Jan Briers 170b8717c1 Fix some compiler warnings. 2019-07-31 13:47:34 +02:00
Pieter-Jan Briers fdfbf92223 Remove a ton of lighting system cruft.
Basically just kills the light manager.
Clyde was already using the ECS anyways.
2019-07-30 13:31:05 +02:00
Pieter-Jan Briers 6d377ee1e3 Robust Lite, also known as "Qt was too hard to distribute". 2019-07-29 23:08:50 +02:00
Acruid 30cafea218 Adds a debug net graph to the game state system. 2019-07-29 11:25:20 -07:00
Acruid 91d0936a99 Eye now uses MapCoordinates instead of Grid Coordinates when building the view matrix. This fixes the bug where the view offsets from the map origin when the player touches a grid in the world that isn't positioned at the origin. 2019-07-20 14:07:38 -07:00
Pieter-Jan Briers ecb641f403 Allow scaling SpriteView. 2019-07-20 15:49:44 +02:00
Pieter-Jan Briers 03edfc46cb Actually apply fullscreen preference on client restart. 2019-07-19 23:59:49 +02:00
Pieter-Jan Briers 13ad6f3f37 Show a warning in the main menu on old OpenGL versions. 2019-07-19 23:57:41 +02:00
Pieter-Jan Briers 8ec83a7654 Allow Clyde to draw rotated boxes. 2019-07-19 22:12:33 +02:00
Pieter-Jan Briers 0c1c6cee0e Generate basic cyrillic for font atlasses. 2019-07-19 14:13:37 +02:00
Pieter-Jan Briers ed340f7df9 Optimize the code to reduce a ton of allocations. 2019-07-11 14:51:20 +02:00
Pieter-Jan Briers 981bbc61ee Re-implement hollow rectangle drawing.
I missed a TODO.
2019-07-06 22:37:58 +02:00
Pieter-Jan BriersandGitHub 09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* Attempted Clyde cleanup, didn't get far.

* Add negation operator to Vector2i.

* Add RenderOrder to ISpriteComponent.

* Post process shaders.

Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.

This is necessary to implement functional outlines.
2019-07-06 19:17:33 +02:00
ZNixianandPieter-Jan Briers 222e19ddc4 Add support for diagonal RSI sprites (#828) 2019-06-29 01:54:34 +02:00
Pieter-Jan Briers 58ac8f0dba Log warning when using stereo audio positionally.
OpenAL doesn't support this so this should help avoid confusion.
2019-06-01 00:06:32 +02:00
Pieter-Jan Briers f74bf680e7 Add an assert to lighting rendering. 2019-05-29 01:11:45 +02:00
Pieter-Jan Briers b65f108268 Load vsync from config on startup. 2019-05-28 01:59:27 +02:00
Pieter-Jan BriersandGitHub bb4a1eda8e Project file refactor (#819)
* Project file refactor

Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.

As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.

Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.

* Fix compiler warnings.
2019-05-28 00:16:01 +02:00
Pieter-Jan Briers a7d3b31ec4 Fix outline rendering. 2019-05-16 14:40:05 +02:00
Pieter-Jan Briers 7323e454e4 Fix StyleBox.GetContentOffset(). 2019-05-14 11:18:26 +02:00
Pieter-Jan BriersandGitHub 17ebeac107 UI Scaling Support. (#809)
Not quite perfect, but quite usable.

Adds the ability to scale the UI. Scaling is controlled via a cvar,
and can be changed at runtime.
Fractional scaling is supported.

Some controls could be better (SpriteView, TextureRect),
but for now it's a good start.
2019-05-11 16:04:14 +02:00
AcruidandPieter-Jan Briers c4fb96b5e8 Tile Placement Improvements (#808)
* Tile Placement box actually uses the mouse snapgrid, not the players.

* Placement box only snaps to grids if cursor is over grid.
First tile of new grid is centered on cursor, instead of bottom left on cursor.

* Place square now sticks to the edge of a grid.
Cannot place tiles that would touch two grid Bounds.
2019-05-11 15:58:28 +02:00
Pieter-Jan Briers 5077b5ec4e Do not hide exceptions thrown in IoC service Dispose. 2019-05-08 22:59:45 +02:00
Pieter-Jan Briers dec103ac1b Remove GameController.Mode
The difference between headless and Clyde is now handled by IoC.
2019-05-08 22:24:50 +02:00
Pieter-Jan Briers d6a9343635 Make GameController created by IoC, remove GameControllerProxy. 2019-05-08 21:55:16 +02:00
Pieter-Jan Briers dc6e186a26 Ensure Window Close does not fire from Dispose on Clyde. 2019-05-08 21:27:30 +02:00
Pieter-Jan Briers 6da21ab6c1 Clyde correct sRGB support.
This makes light stacking look less... awful.

Also minor cleanup.
2019-05-08 14:37:48 +02:00
Pieter-Jan Briers 3c9bcae474 Delete GodotWrapFont. 2019-05-06 16:44:34 +02:00
Pieter-Jan Briers 5c8986c075 Fix Texture.LoadFromImage not passing load params to Clyde. 2019-05-06 15:08:12 +02:00
Pieter-Jan Briers 2c523115ab Fix compiler warning. 2019-05-05 11:48:51 +02:00
Pieter-Jan BriersandGitHub cf2995437f Remove Godot support. (#805)
Let's be real, it's pretty damn broken already and will never be fixed.
2019-05-05 01:58:24 +02:00
Pieter-Jan Briers 296d39bee6 Make fonts use A8 textures.
Reduces VRAM usage.
2019-05-04 22:17:06 +02:00
Pieter-Jan Briers 772b680723 Render extended ASCII font glyphs. 2019-05-04 21:20:06 +02:00