GodotSteam / GodotSteam

An open-source and fully functional Steamworks SDK / API module and plug-in for the Godot Game Engine.
http://godotsteam.com/
MIT License
2.68k stars 179 forks source link

GodotSteam with Godot 3.1 RC #63

Closed Fischer96 closed 5 years ago

Fischer96 commented 5 years ago

So, was just compiling Godot 3.1 RC with GodotSteam module and it's not working correctly and i'm also not quite sure what to change in GodotSteam actually. The engine itself is running and the Steam singleton is found but it crashes without any information or does nothing when calling Steam functions. Any ideas?

Gramps commented 5 years ago

Hmm, I got it working in test with just the normal Godot 3 version and Godot beta 10 without issue. Using it right now actually. The only thing I noticed when compiling was that it complained about the missing env variable in the config.py but that didn't stop it from compiling or working.

Come to think of it, I didn't actually test any of the Steam functionality because the game I'm working on right now is super new.

I'm working on a port of my last game to Godot 3.1 today so I'll see what I can find out. However, there shouldn't be anything that would really break it.... that I know of.

Fischer96 commented 5 years ago

Hmm thats weird. Compiled it for 3.0 without any problems and it worked flawless but not with 3.1 RC sadly. I have a multiplayer button which creates a Steam lobby and sets some lobby data and calls all the relevant signals but at that point it just crashes instantly. And when i export my game to an exe it doesn't even start with the new export templates.

Gramps commented 5 years ago

Hmm, that is strange indeed. I wonder what changed in 3.1 RC. Couldn't have been anything too significant.

About to port my new game over to Godot 3.1 and compile GodotSteam for Windows so I should have a better answer soon!

Gramps commented 5 years ago

And just to be clear, you pulled the master branch from Godot Engine's Github?

Fischer96 commented 5 years ago

Si

Gramps commented 5 years ago

OK, sounds good. Just finished downloading the master branch and gonna compile this beast!

Fischer96 commented 5 years ago

Yeah i cloned the master branch from godot engine and compiled the engine with

scons -j8 platform=windows

and the template with

scons -j8 platform=windows tools=no

And before i copied the godotsteam folder and steamworks sdk files like your readme says into the modules folder.

Gramps commented 5 years ago

Hmm, that should have worked fine. Didn't see any weird warnings or errors during compiling? Also, what does the -j8 flag do?

Fischer96 commented 5 years ago

-jX where X is a number compiles with X threads. I have 8 so i use that or sometimes 6 when i don't want to kill my machine

Gramps commented 5 years ago

Oh. Hmm, I feel like I should have been using that this whole time. Thanks for the tip!

If my test compiles fine, with no issue, I'll push my local Godot 3.1 version to master (like I planned on doing yesterday). I'll also upload my pre-compiles for Windows 32/64-bit first. Linux will come later this evening.

Fischer96 commented 5 years ago

Like i said, before pushing try the Lobby features for example

Gramps commented 5 years ago

Gotcha. Any in particular that crashed it?

Oh, you mentioned creating lobby.

Fischer96 commented 5 years ago

Yeah, creating lobby and setting lobby data

Gramps commented 5 years ago

Well, luckily that is the exact stuff I am trying to re-implement into my game! So it'll be the first thing I test out.

Gramps commented 5 years ago

Hmm, OK. So I have a test project named Server Test that I use to run through various lobby and server function with GodotSteam. Much like with Godot 3.0.6, the Godot RC1 version of GodotSteam didn't crash anywhere unexpected. It did, however, crash when I send a lobby message but all version of GodotSteam currently do that.

So, as far as I can tell, everything is good to go. Why it crashes in your instance I'm not totally sure. Do you mind sharing some code where you call the function that causes the crash?

Fischer96 commented 5 years ago

Could you provide your engine and template first so i can rule out a compile error on my side?

Gramps commented 5 years ago

Sure, compiling the template right now. Will the Windows 64-bit version work? If not, I should have a Linux compile in like 20 minutes or so.

Fischer96 commented 5 years ago

Yep, windows 64 is good!

Gramps commented 5 years ago

OK, cool. Shouldn't be too much longer. The template is at 65% complete. Then I just gotta upload it to the releases section. I'll holler back when it's up!

Gramps commented 5 years ago

You're all good to go, sir! Pre-compiles for Windows 64 are ready to test!

Fischer96 commented 5 years ago

Works perfectly, guess i broke something while compiling. Could you also compile a headless version for CI for me?

scons -j 8 platform=server tools=yes like this

Fischer96 commented 5 years ago

When i run the game in the editor it works but when i compile it with your template it just exits on launch

Gramps commented 5 years ago

Sure, let me give it a go!

Oh, do you have debugging enabled when exporting? I always turn it off.

Gramps commented 5 years ago

Hmm, when I do platform=server it just tells me the only platforms detected are windows. Is there something else I need to have?

Fischer96 commented 5 years ago

Debugging is disabled, doesnt work sadly and are you compiling on windows?

Gramps commented 5 years ago

Just exported my server test project with the template in releases and it worked fine.

Yep, compiling on Windows. Doesn't seem to have server as an optional platform. I think I'm missing something to allow that.

Fischer96 commented 5 years ago

Mh thats weird

And yeah, i think compiling server is only available on linux

Gramps commented 5 years ago

Ah, OK. I will do that once my Linux compile is done! I will add it to the pre-compile section. Is it just the editor version and no template?

That is weird. Not sure why it would just crash like that. Can you run it from command line and get some kind of output?

Fischer96 commented 5 years ago

Yeah no template just platform=server and tools=yes, should be enough

When i run the game with cmd line it says that it can't find the resources like scenes and so on

Gramps commented 5 years ago

Will do.

Hmm, I have no idea what's going on with that. Let me try exporting my game instead of the server test project.

Gramps commented 5 years ago

Well, my game exports fine with that template and runs. There's a weird little animation glitch when my main menu opens, but that was due to the conversion from 3.0.6 to 3.1 RC1.

Your game runs fine with the 3.0.6 version? Provided you still have an applicable copy that works with 3.0.6.

Fischer96 commented 5 years ago

Yep, running fine on 3.0.6. When i launch the game with cmd line like godot in project dir then it launches correctly. I really don't know whats going on

Gramps commented 5 years ago

What the. Something wonky going on indeed. I'm not totally sure where to start troubleshooting. The 3.1 module only really has one minor different from the 3.0.6 version, so they should work pretty much identically. Since we're both using the same editor and template, you shouldn't have any issues.

To ask a dumb question, you have the steam_api.dll and steam_appid.txt in there with the exported game?

Also, I have my Linux laptop compiling the server build for you.

Fischer96 commented 5 years ago

Yep, it's all the same, i just used the editor you compiled and the template for building the game. I have no freaking idea how to debug that

Gramps commented 5 years ago

Me neither really. Not sure where to proceed from here. Any way you can either screenshot or copy/paste the errors you get?

Gramps commented 5 years ago

Also the game runs fine in the 3.1 compiled editor?

Fischer96 commented 5 years ago

Nope, i dont get any errors, thats the problem. It just quits and yeah..

Yep, runs totally fine in 3.1 editor

Gramps commented 5 years ago

Hmm, then something is definitely wonky during export. I don't think there's any weird options in the export menu that would cause it... and, even more weird, why it works for me and not you.

Fischer96 commented 5 years ago

Would it be possible for you to compile debug templates so i have the console when running the built game?

Gramps commented 5 years ago

Can do. Is that with tools=yes or a different target flag? I usually make Windows templates with: scons platform=windows target=release tools=no

Gramps commented 5 years ago

Ah, nevermind. I'm dumb. It's target=release_debug!

Fischer96 commented 5 years ago

Got it myself and i now have output for the built game:

There are some lines like this: No loader found for resource: res://Resources/Textures/SingleWall.png

ERROR: ResourceInteractiveLoaderText::poll: res://Scenes/MainMenu.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Prefabs/Tilemap.tres

ERROR: Failed loading resource: res://Scenes/MainMenu.tscn ERROR: Failed loading scene: res://Scenes/MainMenu.tscn

And i dont know why

Gramps commented 5 years ago

Ah, you beat me to the chase! Had it compiling.

Hmm, yeah, seems like it can't find those files but are clearly in there. Under the resources tab in the export menu, is it set to export all resources?

Fischer96 commented 5 years ago

Yeah, its all correct

Gramps commented 5 years ago

Might it be related to this? https://www.reddit.com/r/godot/comments/88s7n8/exported_game_wont_run_as_an_exe_but_runs_fine_on/

You said it exports fine in 3.0.6 though.

Fischer96 commented 5 years ago

Wow, it was a problem with my tilemaps i use because importing my project to 3.1 changed some paths in the tilemap. Fixed it now, thank you very much!

Gramps commented 5 years ago

Hey, sorry, had to go eat. Sweet, glad you got it fixed! Also, I got the Linux server pre-compile uploaded too.