beardgame / td

Multiplayer Tower Defence game. Systemic component game design. In-depth elemental tech tree. Environmental storytelling. Explosions.
9 stars 1 forks source link

Unable to start the game #396

Closed Zhengyang-Liu closed 3 months ago

Zhengyang-Liu commented 3 months ago

🐛 Bug Report

Hi, I want to try your game, but there seems to be an error that caused the game to crash before it starts.

Error Message: .NET Core version: 8.0.3 Runtime: .NET 8.0.3

Creating behavior factories

Creating game Running game Attempting to load settings from settings file: C:\Users\zhengyl\AppData\Roaming\Bearded.TD/usersettings.json Finished loading user settings. Attempting to save settings to settings file: C:\Users\zhengyl\AppData\Roaming\Bearded.TD/usersettings.json Finished saving user settings. Unhandled exception. System.ApplicationException: Could not load shader: ERROR: 0:412: 'f' : syntax error syntax error

at Bearded.Graphics.Shading.Shader.throwIfCompilingFailed() in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/Core/Shading/Shader.cs:line 34 at Bearded.Graphics.Shading.Shader..ctor(ShaderType type, String code) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/Core/Shading/Shader.cs:line 24 at Bearded.Graphics.Shading.Shader.Create(ShaderType type, String sourceCode) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/Core/Shading/Shader.cs:line 13 at Bearded.Graphics.ShaderManagement.ShaderFile.Load() in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/ShaderManagement/ShaderFile.cs:line 31 at Bearded.Graphics.ShaderManagement.ReloadableShader..ctor(IShaderReloader reloader) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/ShaderManagement/ReloadableShader.cs:line 20 at Bearded.Graphics.ShaderManagement.ReloadableShader.LoadFrom(IShaderReloader reloader) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/ShaderManagement/ReloadableShader.cs:line 15 at Bearded.Graphics.ShaderManagement.ShaderManager.Add(IShaderReloader shader, String name) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/ShaderManagement/ShaderManager.cs:line 71 at Bearded.Graphics.ShaderManagement.ShaderManager.Add(ShaderFile shaderFile) in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/ShaderManagement/ShaderManager.cs:line 66 at Bearded.TD.Utilities.Collections.LinqExtensions.ForEach[T](IEnumerable1 source, Action1 action) in /home/runner/work/td/td/src/Bearded.TD/Utilities/Collections/LinqExtensions.cs:line 49 at Bearded.TD.Rendering.Loading.GraphicsLoader.<>cDisplayClass8_0.gglOperations|1() in /home/runner/work/td/td/src/Bearded.TD/Rendering/Loading/GraphicsLoader.cs:line 192 at Bearded.Utilities.Threading.ManualActionQueue.<>cDisplayClass7_0`1.b0() at Bearded.TD.TheGame.OnLoad() in /home/runner/work/td/td/src/Bearded.TD/TheGame.cs:line 110 at Bearded.Graphics.Windowing.Window.createWindowWithDetachedGLContext() in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/Windowing/Window.cs:line 68 at Bearded.Graphics.Windowing.Window.Run() in /home/runner/work/td/td/libs/awgraphics/Bearded.Graphics/Windowing/Window.cs:line 60 at Bearded.TD.EntryPoint.run(Options options) in /home/runner/work/td/td/src/Bearded.TD/EntryPoint.cs:line 63 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action) at Bearded.TD.EntryPoint.Main(String[] args) in /home/runner/work/td/td/src/Bearded.TD/EntryPoint.cs:line 22

Context

Release: Bearded.TD-v0.26-win-x64 OS: Windows 11

paulcscharf commented 3 months ago

Thanks for the report! I've seen this before somewhere. I think it's hardware specific 🤔

@Zhengyang-Liu what GPU do you have?

paulcscharf commented 3 months ago

Ah, I think I already found it - there's several float literals with an 'f' suffix here: https://github.com/beardgame/td/blob/6b5315def64a74a984e807f0a1c6674697a22114/src/Bearded.TD/assets/mods/core-ui/gfx/shaders/shapes/shapes.fs#L412

I'm 99% sure this is the problem (note matching line number 412 as given in the error message)

I'll fix this in the coming days, but it'll only make it into release 0.28

Zhengyang-Liu commented 3 months ago

sounds good, I'll wait for release 0.28