Commit Graph

114 Commits

Author SHA1 Message Date
Pieter-Jan Briers 83c2a1be11 [Dependency] source generator part 2 (#6550)
* [Dependency] source generator

No more reflection, no more codegen at runtime

Also various changes to Roslyn helpers to make this easier to write.

Requires all types with dependencies to be partial and not have readonly dependency fields. An analyzer enforces this at warning level, the previous injection strategies have remained in the code *for now* as a fallback.

No fallback is available for [field: Dependency] properties, due to a Roslyn bug.

Code Fixes exist. We love Roslyn

* Apply dependencies generator changes to all code

* Release notes

* Preprocessor got hands

* Handle nullable dependencies

These are bad but gotta deal with it.

* Apply suggestions from code review

Co-authored-by: Moony <moony@hellomouse.net>

* Fine, let's not use collection expressions

---------

Co-authored-by: Moony <moony@hellomouse.net>
2026-05-08 12:38:33 +02:00
PJB3005 02b64b7386 Show task bar progress bar for loading progress
Using the new API in SDL 3.4.0
2026-01-18 23:30:15 +01:00
beck-thompson e49515956a Add a basic loading screen! (#6003)
* Added basic loading screen

* Make it look better!

* I forgor xD

* Fix test fails

* Add comment

* Removed unused import

* Only write to file if the number of sections changed

* Servers can now have their own settings

* Minor optionzation and rare colors

* Remove some of the cvars

* debug only loading messages

* Added a few more steps

* Only one section at a time

* nullable section name

* Lock out functions if finished

* Get rid of saving the ccvar

* Cleanup

* Forgot!

* A few tweaks

* Disable vsync

* remove colors

* remove outdated vsync functions

* Silly me xD

* What I get for trying to be clever... ;(

* Better seconds display

* Simplify drawing logic + it looks better

* Type does not need to be partial

* Make interface to expose to content

* Use correct define to gate showing debug info

Should be TOOLS instead of DEBUG

* Use appropriate exception type in BeginLoadingSection

* Fix exception when closing window during loading screen

Would try to stop the main loop before it exists.

* Rename CVars, put debug info behind CVar instead of conditional compilation.

* Add to RELEASE-NOTES.md

* Add UI scaling support

* Make ILoadingScreenManager fully internal

Didn't realize content can't touch it as it'd break the total amount of sections

* Don't re-enable vsync manually, GameController does it at the end of init

* Add command to show top load time usage.

* Improve verbosity of debug time tracking

More steps and some steps named better

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-10-30 00:38:59 +01:00
PJB3005 38d3b83818 Add display.max_fps CVar.
Applies when vsync is not enabled.

Had to shuffle stuff around to GameController since it involves the game loop.

The implementation isn't great and undershoots the target FPS value (because the OS overshoots the desired sleep value). I tried using SDL_DelayPrecise too but this causes significantly increased CPU usage probably because it spinwaits and all that nonsense, so I decided against it.

I don't know why I bothered to do this. I just got the idea in my head. Kinda feels like a waste of time, but there's no point not committing it at this point.
2025-09-02 22:05:28 +02:00
PJB3005 93cf9f4227 Disable threaded window blit on macOS
Can probably do this on Linux too, but I didn't test that.

This feature is, fundamentally, a workaround to avoid WGL MakeCurrent() constantly breaking. The extra threading complexity is not a good thing on other platforms, so get rid of it.
2025-07-19 13:22:27 +02:00
Leon Friedrich ed16032280 Disable tile edges (#5842) 2025-04-16 21:25:31 +10:00
metalgearsloth 353c044b52 Hot reload resources (#5443)
* Fix ResPath CanonPath

Apparently this is supposed to standardise to / but this isn't always the case. Alternatively we could just assert for performance reasons I'm good with either. The comment as written says this should happen.

* Fixes

* change

* assert

* Fix bad respath input

* Buffer

* Merge conflicts

* review

* Fix
2025-03-08 15:16:31 +11:00
metalgearsloth ea1cc5e446 Planet lighting pre-reqs (#5490)
* Add another lookup overload

* Fix RenderInRenderTarget

See the linked issue for what happens.

* Also this one

* stuff

* Fix stencilling

* fixes

* mix blend

* fix

* blur fixes

* Tile flag

* Minor tweak

* Fixes

* Render state fixes

* Fixes

* Fix stupidity

* More state render bug fixes

* MapUid on overlay draw

* Remove blur comment

* Fixes

* Fixes

* Remove

* Engine vibe
2025-02-16 19:29:32 +11:00
Mervill 4e73d72753 Remove unused IoC dependencies (#5419) 2024-09-01 23:23:02 +02:00
Pieter-Jan Briers cf230b3454 Warning fixes centered around Clyde
Pulling entity systems into direct fields in Clyde to make it now painful. This required adding an event to ClientEntityManager when these become available, as they are only available when the client is in a server/single player.
2024-07-23 17:49:56 +02:00
metalgearsloth 04b6d60d76 Fix TileEdgeOverlay drawing over grids (#4698) 2023-12-12 20:13:20 +11:00
metalgearsloth 2733435218 Audio rework unrevert + audio packaging (#4555)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:26 +11:00
metalgearsloth 170d192791 Revert audio rework (#4554) 2023-11-07 09:34:09 +11:00
metalgearsloth d75dbc901f Audio rework (#4421) 2023-10-29 14:58:19 +11:00
Leon Friedrich 3aa04a3c86 Fix grid chunk bugs (#4525)
* Fix grid rendering

* Use TileChangedEvent

* Other empty chunk fixes

* Remove assert

Good ol integration tests at it again, adding invalid components
2023-10-28 13:57:54 +11:00
DrSmugleaf b737ecf9b3 Add generic EntityUid, remove some usages of .Owner (#4498) 2023-10-19 12:23:48 -07:00
metalgearsloth 25007a743f Remove lights component reference (#4316) 2023-09-11 19:17:28 +10:00
metalgearsloth 92719aa29f Shutdown grid rendering events (#4234) 2023-08-05 11:38:16 +10:00
Vera Aguilera Puerto 4cde4abbb8 Remove many more static Logger usages from client. 2023-06-10 01:12:22 +02:00
Leon Friedrich 10dea3f3a3 Modify light rendering cvars (#3765) 2023-02-13 03:51:45 +11:00
Pieter-Jan Briers a4a7e754af GetKeyName improvements
Rewrote most of the related code, moved code out of windowing API backends.
SDL2 backend now handles key map change events correctly.
2023-02-06 23:11:53 +01:00
Pieter-Jan Briers d33f26e503 Re-enable threaded windowing on Windows & Linux 2023-02-04 16:59:20 +01:00
Pieter-Jan Briers 4b6ad732b1 CVar to disable threaded windowing API 2023-02-04 16:55:55 +01:00
Leon Friedrich f3364a196c Client-, shared-, and server-side ConfigurationManager (#3477) 2022-12-31 04:04:49 +11:00
Pieter-Jan Briers 36f781d05b Add windowing API to ClydeDebugPanel. 2022-12-03 00:27:56 +01:00
Pieter-Jan Briers 1646297039 Remove most static IoCManager. accesses from engine. (#3466)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-11-15 22:00:28 +11:00
Julian Giebel 9e32eb46e5 Update ImageSharp and fix incompatibilities (#3092) 2022-08-09 13:15:55 +02:00
Leon Friedrich 7a81c7f64a Misc Shader changes (#2974) 2022-07-19 00:32:58 +02:00
Pieter-Jan Briers e7211063e7 Remove unecessary Vertex2D.SizeOf 2022-05-29 01:13:12 +02:00
20kdc 0ee87bc771 Colour batch reduction (#2809)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-05-16 17:28:37 +02:00
Pieter-Jan Briers 41e9d9b08b Client profiling system (#2783)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-14 15:08:46 +10:00
Acruid 31764d3c2d Mark C# events on MapManager as Obsolete (#2586)
* Obsoleted C# grid events from MapManager.GridCollection. Use the ECS EventBus events instead.

* Obsoleted C# events from MapManager.MapCollection. Use the ECS EventBus events instead.
2022-03-07 15:51:00 -08:00
Pieter-Jan Briers ac43cf0de1 Fix GLES2 support. 2022-01-30 20:20:23 +01:00
Pieter-Jan Briers 7f9d08c8f9 Fix duplicate GL init on ANGLE GL context. 2021-11-29 18:35:24 +01:00
20kdc 28e6cdc92f Clyde audio cleanup & fallback if audio device is not available (#2240) 2021-11-17 14:18:04 +01:00
Pieter-Jan Briers 75cd8a0a12 Fix primitive restart on GLES3.
Was detected as incorrect version and didn't distinguish the difference between FixedIndex and not.
2021-10-08 14:54:53 +02:00
metalgearsloth 8b462cc099 Remove 2 unused field dependencies 2021-09-21 00:18:33 +10:00
Pieter-Jan Briers c91170b50e Explicit GL debugger detection to fix ANGLE console spam. 2021-09-20 10:40:30 +02:00
Pieter-Jan Briers 9117f8c776 These IRenderHandle APIs are going public, deal with it. 2021-09-19 23:37:47 +02:00
Pieter-Jan Briers 6938787863 Fix compat mode, fullscreen, more work on ANGLE swap chain. 2021-09-01 01:13:32 +02:00
Pieter-Jan Briers cd3a7ef91e ANGLE+DXGI experiment, window/GL init rewrite (#1982) 2021-08-30 01:35:07 +02:00
metalgearsloth 325f25c547 Fix occluders for moved grid (#1878)
* Refactor occluders

* Copy pasting

* Reduce bounds

* Clear system updates on shutdown
2021-07-22 13:07:45 +10:00
Pieter-Jan Briers 720f1b1d05 Fix a bunch of compiler warnings. 2021-05-12 00:16:12 +02:00
Pieter-Jan Briers 8efffc471d Multi-window support (#1713) 2021-05-02 14:05:50 +02:00
Vera Aguilera Puerto c4946b8466 Viewport Improvements (#1528)
Co-authored-by: 20kdc <asdd2808@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-04-19 09:47:20 +02:00
Acruid 98e009b38f Removed the GameController dependency from Clyde.
Removed the ConfigurationManager dependency from FontManager.
2021-03-25 11:36:57 -07:00
GraniteSidewalk 33a6934582 Large number of changes to Shaders and Overlays (#1387)
* AAAAAAAAAAAAA

* Organization

* Still doesnt work

* Formatting

* It works!!

* More changes to everything

* Beginning of changes to overlays

* Makes the overlay manager GUID based (also it was very messy, still messy but i fixed some of it)

* Stencils are easy

* Questionable changes to overlays

* Minor change to HLR

* Fixed duplicate overlays when calling some commands (Like showbb)

* Fixes misleading message

* Adds a variety of worldspaces for overlays to choose from

* Caching

* Address reviews

* Merging pains

* ah.

* ahhhhh

* minor overlaymanager changes

* Work

* fix

* Merge??

* Fixes null errors

* Force update

* Delete whatever the fuck this is?

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-03-09 01:52:16 -08:00
Alex Evgrashin 393c15c44a Post shader will use real sprite bounding box (#1536)
Co-authored-by: Alex Evgrashin <evgrashin.adl@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-02-23 22:54:48 +01:00
DrSmugleaf 0f1da1ba2a Add window focused callback to Clyde (#1573) 2021-02-19 22:10:03 +01:00
Acruid 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00