scemino / engge

Open source remake of Thimbleweed Park's engine
https://scemino.github.io/
MIT License
148 stars 15 forks source link

Version 0.7.0 Beta does not work on Windows #232

Closed Mac1512 closed 3 years ago

Mac1512 commented 3 years ago

Hello scemino, I have seen that you have done a lot of work in engge. I have had a little time and I have tried the version 0.7.0 Beta that you have released, but in Windows it does not work. So after struggling with cmake and adding the libraries by hand, I've managed to compile engge (I'll open an issue for you to help me create a cmake that works properly). After some corrections, I have managed to make engge work a little, I will tell you my steps, what I have seen and where I have stayed.

Well, first of all I saw that an exception gave me, in the file Window.cpp, the following function:

GL_CHECK(glGenVertexArrays(1, &m_vao));

This I corrected by adding in the same file:

glewExperimental = GL_TRUE;

before glew initialization.

being that way:

glew_experimental

From this, I start engge, when executing in dedug mode in Visual Studio, I saw that I got the following errors:

`Error 'GL_INVALID_VALUE' at D:\engge_2021\engge-0.7.0-beta\extlibs\ngf\src\Graphics\Texture.cpp:137 for expression 'glTexSubImage2D(type, 0, 0, 0, size.x, size.y, getGlFormat(m_format), GL_UNSIGNED_BYTE, data)': A numeric argument is out of range. ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader! ERROR: 0:1: '#version' : version number '2' not supported by current context

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader! ERROR: 0:1: '#version' : version number '2' not supported by current context

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program! (with GLSL '#version 130 ') Attached vertex shader is not compiled.

[2021-02-01 20:43:12.573] [log] [error] TODO: exCommand EX_BUTTON_HOVER_SOUND: not implemented Error 'GL_INVALID_OPERATION' at D:\engge_2021\engge-0.7.0-beta\extlibs\ngf\src\Graphics\Shader.cpp:36 for expression 'program = glCreateProgram()': The specified operation is not allowed in the current state. [2021-02-01 20:43:45.814] [log] [error] unknown character: , [2021-02-01 20:43:45.814] [log] [error] unknown character: , [2021-02-01 20:43:45.831] [log] [error] unknown character: ) [2021-02-01 20:43:45.832] [log] [error] unknown character: ) [2021-02-01 20:43:45.873] [log] [error] TODO: exCommand EX_OPTIONS_MUSIC: not implemented [2021-02-01 20:43:46.323] [log] [error] TODO: markProgress: not implemented [2021-02-01 20:43:46.324] [log] [error] TODO: refreshUI: not implemented [2021-02-01 20:43:46.504] [log] [error] TODO: markStat: not implemented Error 'GL_INVALID_OPERATION' at D:\engge_2021\engge-0.7.0-beta\extlibs\ngf\src\Graphics\RenderTarget.cpp:132 for expression 'glGetIntegerv(GL_FRAMEBUFFER_BINDING, &boundFrameBuffer)': The specified operation is not allowed in the current state. Error 'GL_INVALID_OPERATION' at D:\engge_2021\engge-0.7.0-beta\extlibs\ngf\src\Graphics\RenderTarget.cpp:132 for expression 'glGetIntegerv(GL_FRAMEBUFFER_BINDING, &boundFrameBuffer)': The specified operation is not allowed in the current state. Error 'GL_INVALID_OPERATION' at D:\engge_2021\engge-0.7.0-beta\extlibs\ngf\src\Graphics\RenderTarget.cpp:132 for expression 'glGetIntegerv(GL_FRAMEBUFFER_BINDING, &boundFrameBuffer)': The specified operation is not allowed in the current state.

. . . .

D:\engge_2021\engge-0.7.0-beta\build\src\Debug\engge.exe (proceso 12488) se cerró con el código -1. Para cerrar automáticamente la consola cuando se detiene la depuración, habilite Herramientas ->Opciones ->Depuración ->Cerrar la consola automáticamente al detenerse la depuración. Presione cualquier tecla para cerrar esta ventana. . . `

I solved the bug in imgui, in the SdlSystem.cpp file, commenting on the lines of the image and adding the opengl profile to core and 3.0:

Core 3 0

I have not been able to solve the glTexSubImage2D bug, which you see in the text, but it still does not worry me, since it is not used yet, I think it may be because of the opengl context, but I'm not sure.

However when I press start a new game engge quits unexpectedly and throws another exception, I can see the following in the Visual Studio log:

[2021-02-02 23: 37: 48.034] [log] [error] Sorry, an error occurred: Specifed time is tool long

Time too long

excepcion time too long

The failure is detected in the TimeSpan.h file, in the function:

private: static TimeSpan interval (float value, int scale) {

I have commented, the following:

if ((millis> std :: numeric_limits :: max () / TicksPerMillisecond) || (millis <std :: numeric_limits :: min () / TicksPerMillisecond)) throw std :: overflow_error ("Specifed time is tool long");

being that way:

comented timespan

With this I can start a new game, although I receive other exceptions later, one I have not yet been able to determine what it is and the other is also derived from time, since it appears in another function within TimeSpan.h. But, these problems must be solved in order to continue moving forward.

Imgui, I don't see it on the screen, and I pressed the "D" key on the keyboard, and I still don't see it. Is it a fault or should I press another key?

Any modification you make I will try to test it as soon as possible.

Note: I have compiled for 64 bit architecture

Greetings and Happy New Year, scemino :)

Desktop (please complete the following information):

scemino commented 3 years ago

Thank you for this long description, I changed the next milestone to v0.7.1, it will fix the Windows version (with your help).

Imgui, I don't see it on the screen, and I pressed the "D" key on the keyboard, and I still don't see it. Is it a fault or should I press another key?

Now to show the DebugTools Window you need to press Ctrl+D (I need to do it twice the first time, don't know why)

Mac1512 commented 3 years ago

Thank you for this long description, I changed the next milestone to v0.7.1, it will fix the Windows version (with your help).

I'll help you in what i can :)

Now to show the DebugTools Window you need to press Ctrl+D (I need to do it twice the first time, don't know why)

Great, I've already seen it, it works perfect ... To me, it is visualized the first time, when pressing Ctrl + D.

Well, as I mentioned, another exception appears after I start engge, this is when Boris speaks, at the end of the first sentence. I think it is also derived from the functions that control the elapsed time, either in the file timespan.h, or another function that passes the parameters to it. I show you the images that come out in Visual Studio, and what I see when I click on the option "Reintentar (Retry)".

vector out of range

Nothing is seen in the log:

log vector out of range

When pressing "Reintentar (Retry)":

vector ount of range vs 1

vector ount of range vs 2

vector ount of range vs 3

And if I run engge in release mode, the exception described above does not appear, but it gives me the following sporadically:

TimeSpan Overflow

esporadicamente en release

scemino commented 3 years ago

Yeah thank you, there is definitively a bug with TimeSpan in Windows, I'm checking this.

Mac1512 commented 3 years ago

Genial!! If I see something else that can help you in that function, I'll tell you.

scemino commented 3 years ago

OK I think I found the issue, I pushed the modifications, now I have to figure out the issue with Boris: for me it comes from a missing lip file, I will create another issue for this one. Please, can you tell me if it works for you ?

Mac1512 commented 3 years ago

Brilliant!! you've hit the nail on the head, actually it works better than before :)

With the trap that I had made, commenting on the lines in TimeSpan.h, the screen did not appear, where you can select the casual or hard mode, and the initial tutorial did not appear.

Now if it appears in engge:

casualhardmode

tutorial

What does not appear is the title image, I put a screenshot of the original game:

Title

I think that this issue can be closed, and that you open a new one, with the exception that appears in boris. In debug mode it gives that exception and you can no longer do anything other than debug. But in release mode, although there are bugs, it is playable. I will record a video for you so you can see it and see other bugs

If you want, I'll give you the executable file, in release mode

xD

Edited:

I have to say that I have been playing in release mode, and I have finished the part where you drive the ransome clown, but at the end of that part it has unexpectedly closed engge. (I have found a few bug )

I've still come a long way :)

scemino commented 3 years ago

I closed this issue and created 2 issues

233 and #234.

Don't hesitate to create new bugs before I release this new version.