noxworld-dev / opennox

OpenNox main repository.
GNU General Public License v3.0
463 stars 25 forks source link

Does not work #583

Closed SilentMRG closed 1 year ago

SilentMRG commented 1 year ago

Hello...

I copy and paste the files in the root directory, run "opennox.exe" and get a window that quickly opens and closes. No error message and no process open in task manager.

What am I missing?

I'm using a Laptop with an i5 2.67GHz, 4GB of memory and Windows 7 Ultimate 64bit with an Intel HD Graphics. The game runs great with this setup when I used cnc-ddraw to play two years ago.

Thanks in advance!

dennwc commented 1 year ago

Can you please upload a file logs/opennox.log?

SilentMRG commented 1 year ago

I would have done this if a log was created. There is no log or anything other than a window that opens and closes quickly.

Evengard commented 1 year ago

Did you try to run with admin permissions? Just to check if it is a permission issue.

SilentMRG commented 1 year ago

Did you try to run with admin permissions? Just to check if it is a permission issue.

Yes, I ran it as an administrator and even disabled the antivirus, because sometimes it could be the antivirus blocking something.

Which backend does OpenNox use? Intel HD Graphics supports DX10 and OpenGL 3.0. Sometimes the "problem" is the non-compatible backend.

Evengard commented 1 year ago

We're using OpenGL 2.x (can't remember the exact version, but definitely not higher than OpenGL 3)

SilentMRG commented 1 year ago

Hmm... So this error is a mystery. I've never seen anything like it. Are you using any specific version of Visual Studio? I tried running "opennox.exe" again and no log was created. I also tried to run the executable in HD and neither the window that opens and closes quickly appeared, no log, or process in the task manager. Really, weird...

vvs- commented 1 year ago

From the readme:

cnc-ddraw does not support Direct3D/Glide, it will only work with games that use a DirectDraw (Software) renderer.

That reminds me of the recent discussion in #573

Evengard commented 1 year ago

Nah, looks like something different. Maybe some dlls missing and failing to init or smth.

SilentMRG commented 1 year ago

From the readme:

cnc-ddraw does not support Direct3D/Glide, it will only work with games that use a DirectDraw (Software) renderer.

That reminds me of the recent discussion in #573

I can run Nox with cnc-ddraw in its latest version without problems. I just tried the OpenNox installation file and I have the same problems... It's a shame...

SilentMRG commented 1 year ago

Nah, looks like something different. Maybe some dlls missing and failing to init or smth.

Could be... But what exactly? The game doesn't even create a log. It's laughing so as not to cry. XD

vvs- commented 1 year ago

Nah, looks like something different. Maybe some dlls missing and failing to init or smth.

That's what I mean, if you would think about dlls in e.g. graphics driver. Nobody actually checked that it works.

I can run Nox with cnc-ddraw in its latest version without problems. I just tried the OpenNox installation file and I have the same problems... It's a shame...

If you mean original Nox from Westwood then I should remind again that it does not use Direct3D. But opennox does (only OpenGL).

For lack of a better option I would check everything I could. What if there is a problem in graphics driver installation? Also, I would try it on another computer to verify that those files are not corrupted and there is no other non-obvious mistake.

SilentMRG commented 1 year ago

If you mean original Nox from Westwood then I should remind again that it does not use Direct3D. But opennox does (only OpenGL).

For lack of a better option I would check everything I could. What if there is a problem in graphics driver installation? Also, I would try it on another computer to verify that those files are not corrupted and there is no other non-obvious mistake.

The Nox I play was purchased from GOG. And I'm using cnc-ddraw precisely because Nox (original) works in Ddraw. Yes, I know... That's why I asked which backend OpenNox uses, and according to Evengard it uses OpenGL 2.x, and Intel HD Graphics, as I said above has support for DX10 and OpenGL 3.0. Drivers are up to date. All the games I have here work and when they don't at least show an error message, something OpenNox refuses to do.

vvs- commented 1 year ago

All the games I have here work and when they don't at least show an error message, something OpenNox refuses to do.

You didn't say which games are working there. If there are 32-bit ones and they also use OpenGL then it should be fine. Also, there is a small probability that there is a bug or incompatibility in graphics driver itself, e.g. Arabian Nights is a good example which works depending on moon's phase. In such cases there's often just a black screen or nothing at all. BTW, why not launch opennox from command line prompt? I know, it's Windows but it still might output some error...

dennwc commented 1 year ago

If no logs are created, try running it from cmd.exe. It should then show the logs in the console at least.

In general, if you see a window quickly appearing and then closing, OpenNox definitely runs. So it's not an issue with libraries. Could be drivers, or something with game data.

In any case, we need to see logs to be sure.

dennwc commented 1 year ago

Alternatively, you could try one of the recent alpha releases.

SilentMRG commented 1 year ago

After a lot of trying behold, a log appears...

2023/03/22 19:07:01 [version]: version: v1.8.11() 2023/03/22 19:07:01 [version]: GET https://ghcr.io/token?scope=repository%3Anoxworld-dev%2Fopennox%3Apull 2023/03/22 19:07:02 [config]: file not found, using defaults 2023/03/22 19:07:02 [registry]: install path at SOFTWARE\WOW6432Node\Westwood\Nox\InstallPath: "D:\Westwood Studios - Nox\Nox\Nox.EXE" 2023/03/22 19:07:02 [registry]: install path at SOFTWARE\Westwood\Nox\InstallPath: "D:\Westwood Studios - Nox\Nox\Nox.EXE" 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\WOW6432Node\Westwood Studios\NOX": The system cannot find the file specified. 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\Westwood Studios\NOX": The system cannot find the file specified. 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\WOW6432Node\GOG.com\Games\1207658964": The system cannot find the file specified. 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\WOW6432Node\GOG.com\Games\1207658964": The system cannot find the file specified. 2023/03/22 19:07:02 [gog]: install path at SOFTWARE\WOW6432Node\GOG.com\GOGNOX\PATH: "D:\Westwood Studios - Nox\Nox\" 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\WOW6432Node\GOG.com\GalaxyClient\paths": The system cannot find the file specified. 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\GOG.com\Games\1207658964": The system cannot find the file specified. 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\GOG.com\Games\1207658964": The system cannot find the file specified. 2023/03/22 19:07:02 [gog]: install path at SOFTWARE\GOG.com\GOGNOX\PATH: "D:\Westwood Studios - Nox\Nox\" 2023/03/22 19:07:02 [registry]: error opening key "SOFTWARE\GOG.com\GalaxyClient\paths": The system cannot find the file specified. 2023/03/22 19:07:02 [path]: setting data dir to: "C:\Users\Downloads\Nox" 2023/03/22 19:07:02 [config]: writing to "C:\Users\Downloads\Nox\opennox.yml" 2023/03/22 19:07:03 [version]: GET https://ghcr.io/v2/noxworld-dev/opennox/tags/list 2023/03/22 19:07:03 [version]: latest on github: v1.8.12-alpha4 2023/03/22 19:07:04 [sdl]: window size: 640x480 2023/03/22 19:07:04 [config]: writing to "C:\Users\Downloads\Nox\opennox.yml"

I just want to make two things clear:

Yesterday I installed the game on the D drive and I had the aforementioned problem. Today I installed it on the C drive in a rather unlikely folder (Downloads). As you can see in the log on both drives C and D the problem is apparently the same.

The second thing is that I downloaded the latest stable version, and not the one in the log (v1.8.12-alpha4) I didn't even download that version and the log showed it, I don't know why.

SilentMRG commented 1 year ago

Another point of interest:

2023/03/22 19:29:08 [version]: version: v1.8.11() 2023/03/22 19:29:08 [version]: GET https://ghcr.io/token?scope=repository%3Anoxworld-dev%2Fopennox%3Apull 2023/03/22 19:29:08 [config]: using file: "C:\Users\Downloads\Nox\opennox.yml" 2023/03/22 19:29:08 [path]: setting data dir to: "C:\Users\Downloads\Nox" 2023/03/22 19:29:08 [config]: writing to "C:\Users\Downloads\Nox\opennox.yml" 2023/03/22 19:29:10 [version]: GET https://ghcr.io/v2/noxworld-dev/opennox/tags/list 2023/03/22 19:29:11 [version]: latest on github: v1.8.12-alpha4 2023/03/22 19:29:12 [sdl]: window size: 640x480 2023/03/22 19:29:12 [config]: writing to "C:\Users\Downloads\Nox\opennox.yml"

The other log was generated after I ran the opennox shortcut, the one above was generated after I ran opennox directly from the directory. Note that this log does not mention any errors. The HD executable generates the same log in both cases. Strange...

Evengard commented 1 year ago

This looks like opennox can't find your Nox install, the original resource files. You can't run opennox without them, as we're legally bound to not redistribute those. Install original Nox through an installer and it should work.

SilentMRG commented 1 year ago

It makes no sense. I have Nox installed. GOG version.

See the pictures...

0 1 2

All the resources are there.

Evengard commented 1 year ago

C:\Users\Downloads\Nox\opennox.yml

Do you have this file? Could you post it's contents?

SilentMRG commented 1 year ago

Of course...

Here goes...

extensions: spells: manual_cast: timeout: 0.5 game: data: . extensions: solo_allow_emotes: true network: lobby: address: http://nox.nwca.xyz:8088 port_forward: true xor: true xwis: register: true server: api_token: "" control: allow_cmds: false allow_map_change: false video: filtering: true gamma: 1 size: height: 768 width: 1024 stretch: false

I opened it with a text editor. Did I do it right?

Evengard commented 1 year ago

Change that line:

data: .

To

data: C:\path\to\your\nox\files

Replace C:\path\to\your\nox\files with the actual path to your Nox directory.

Make sure to not alter the padding!

Evengard commented 1 year ago

We really should document this in the readme...

SilentMRG commented 1 year ago

Let me get this straight... you want me to put the program path in front of "C:\path\to\your\nox\files"?

Or put the program path in front of "data: ."?

I'm kind of new to these things, sorry.

So it would look like this:

"data: C:\Users\Downloads\Nox"

Correct?

Evengard commented 1 year ago

yep, you are correct. Maybe the problem is different, then... Weird, seems like you're doing it correctly. You didn't change the padding?

SilentMRG commented 1 year ago

Change padding? I don't even know what that is. I didn't mess with any files.

How do I save the file in .yml?

SilentMRG commented 1 year ago

I managed to convert the file and I did what you said, but the error persists.

If it helps, here it is:

extensions: spells: manual_cast: timeout: 0.5 game: data: C:\Users\Downloads\Nox extensions: solo_allow_emotes: true network: lobby: address: http://nox.nwca.xyz:8088 port_forward: true xor: true xwis: register: true server: api_token: "" control: allow_cmds: false allow_map_change: false video: filtering: true gamma: 1 size: height: 768 width: 1024 stretch: false

I won't even post the log because the same one from the other post was generated. Seriously, I've never seen an error like this.

Evengard commented 1 year ago

Honestly, I'm at a loss. Only thing I can think off is debugging remotely over remote controlling software.

SilentMRG commented 1 year ago

Maybe it's some kind of curse. Sometimes Hecubah is in the realm of Nox doing some kind of spell that prevents me from running opennox. XD

Think... Sometimes she is not happy to know that Nox became open Nox, hehehe.

dennwc commented 1 year ago

Looking at this log, it cut exactly after writing a config. This usually means it crashes after that point (either on audio or video init).

@SilentMRG Did you manage to run via cmd.exe?

SilentMRG commented 1 year ago

Yes, running through cmd results in the log already posted. Nothing new, unfortunately.

dennwc commented 1 year ago

Hmm, okay, then we'll need to produce a Windows debug build which will show the console when OpenNox starts. I'll do it this weekend.

vvs- commented 1 year ago

I've just compiled it from source code on Linux. It definitely doesn't run on OpenGL 2.1 and GLSL 1.20. I was able to run it only on OpenGL 3.3 and GLSL 1.50.

SilentMRG commented 1 year ago

That's what I thought... That's why I asked which backend he used. My laptop's Intel HD Graphics support OpenGL 3.0, opennox doesn't run due to backend incompatibility, if opennox requires OpenGL 3.3, so then the problem is on my side.

I would not have opened this issue if this information had been documented in the readme.

Evengard commented 1 year ago

Probably my fault. For some reason I thought it is OpenGL 2.3, not 3.3. Indeed, found that we refer OpenGL 3.3

SilentMRG commented 1 year ago

Don't worry... These things happen. =)

SilentMRG commented 1 year ago

So I'm closing this issue due to backend incompatibility. As previously said, the problem is not opennox, but the integrated card of my Laptop. Thank you all for your help and patience!

Evengard commented 1 year ago

As a possible workaround, you might try actually compile Mesa on your PC and try to run through that. Altough we never tested that, but Mesa have a high chance of helping you.

Evengard commented 1 year ago

If you're on Windows, you can try that: https://github.com/pal1000/mesa-dist-win#installation-and-usage

vvs- commented 1 year ago

Better yet I've slightly changed the shaders to make them GLSL 1.20 compatible. Mesa won't allow you to run unchanged shaders on GPU, so no hardware acceleration possible otherwise.