SWY1985 / CivOne

An open source implementation of Sid Meier's Civilization.
http://www.civone.org/
Creative Commons Zero v1.0 Universal
244 stars 49 forks source link

Windows build shows only black ({R,G,B} of {0,0,0}) #268

Closed AlexFolland closed 7 years ago

AlexFolland commented 7 years ago

I have just attempted to follow https://github.com/SWY1985/CivOne/wiki/How-to-build-and-run-on-Windows%3F step by step very carefully. I have the latest git commit of CivOne, I have VS Code, and it even built the project with no errors. I have the built civone.dll file in E:\games\civone\bin\Debug\netcoreapp1.1.

image

As my screenshot shows, I have all the dependencies VS Code complains about when trying to use "Launch Game", but it doesn't seem to work with them anyway. I suspect this is due to debugging not working in Windows, or the build being 32-bit, or something else like that. I try to use 64-bit tools and builds wherever possible, though I couldn't find a 64-bit version of Visual Studio Code, but everything else I'm aware of is 64-bit. I am not sure where the problem lies.

AlexFolland commented 7 years ago

Oh! Clicking "Debug" -> "Start Without Debugging" (Ctrl+F5) does run the game! However, the game displays nothing but black {0,0,0} currently. I am using the latest commit, ec76d0f62dfdeab979da3d13967613abd3edd7bc.

image

AlexFolland commented 7 years ago

I've added a line to the Windows build guide about "Start Without Debugging".

SWY1985 commented 7 years ago

Debugging should work, but I have only tested on Windows 10. Does the precompiled version from the website work for you? http://www.civone.com/files/civone-0.1.0pre-alpha1-r888-winx64.zip

AlexFolland commented 7 years ago

That one also runs, but also exhibits this black screen bug.

I am using an Nvidia GTX 690, for the record.

SWY1985 commented 7 years ago

Very odd... I experience the same issue with Linux and macOS but I thought it wasn't an issue on Windows. I will need to look into this, but it's very hard to reproduce.

AlexFolland commented 7 years ago

Now that I can build it, I can bisect to see when it started. I'll do that.

SWY1985 commented 7 years ago

It probably started the moment I switched to .NET Core and OpenTK. The OpenTK.Core package might be broken... I may need to reconsider that move, even though it brought a lot of performance improvements.

SWY1985 commented 7 years ago

Thanks for making me look into this, I've fixed it... and now it all runs on macOS without problems (will test Linux tonight). I've switched the OpenTK window from OpenGL 4.0 to OpenGL 1.0, which probably also disabled shaders (I believe that caused the problem). Can you update the sources and see if this fixed it, please?

AlexFolland commented 7 years ago

That has indeed fixed this issue! However, there is a couple of new issues related to the software cursor.