Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless GodotSteam build #413

Closed
Arcnor opened this issue Feb 5, 2024 · 20 comments
Closed

Headless GodotSteam build #413

Arcnor opened this issue Feb 5, 2024 · 20 comments
Assignees
Labels
server Related to the server build

Comments

@Arcnor
Copy link

Arcnor commented Feb 5, 2024

Hi! I'm trying to use GodotSteam 3.5.3 with the prebuilt packages, but I'm using it on an environment where there is no UI, in this case, Ubuntu Server.

Official Godot has packages for "Linux Server" that can run headless (https://godotengine.org/download/3.x/server/), --video-driver shows Dummy when running those. I've tried to use both GodotSteam as well as GodotSteam-Server but both only accept GL or GLES as video drivers, and fail to load on my server.

Is there something I'm missing, or do I need to build my own from scratch?

Thanks in advance!

@Gramps Gramps self-assigned this Feb 5, 2024
@Gramps Gramps added the server Related to the server build label Feb 5, 2024
@Gramps
Copy link
Member

Gramps commented Feb 5, 2024

Hey there! Hmm, I have never tried to do this but not sure why it wouldn't work. Exactly what happens when you run it? You mention it fails to load but does nothing happen at all? Do you get an error?

@Arcnor
Copy link
Author

Arcnor commented Feb 5, 2024

Yeah, so basically the issue is that because there is no headless video driver (only GLES3 and GLES2), Godot tries to load X11, so you get a

ERROR: X11 Display is not available

This also happens with the official Godot 3.5 builds unless you use the headless one I posted above (which replaces all video drivers with the Dummy one), and I was wondering if there was one for GodotSteam as well.

@Gramps
Copy link
Member

Gramps commented Feb 5, 2024

Ahhh, OK. Gotcha. Hmm, there is not such a version for GodotSteam but I didn't realize this was an issue; never came up until now. I guess this would be something to do with the server version of GodotSteam, as that is what is meant for.

This is probably a relatively easy thing to do, so I will check it out! Most likely just compiling them differently. I'm working on the next patch currently so I can slip this in during my compiling tests and upload something for you to try out.

@Arcnor
Copy link
Author

Arcnor commented Feb 5, 2024

That will be really helpful indeed, thanks!

@Gramps
Copy link
Member

Gramps commented Feb 5, 2024

No problem! Thanks for bringing this up! I should have a test either later today or tomorrow, providing my patching goes well.

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

OK, finally got the rest of the updates done and now onto the server stuff. Here is a test headless build, let me know if this works for you!

If so, I'll start creating those kinds of builds for the Server version.

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

Thanks for that! So this build "runs" and it actually finished packaging somehow, but I'm getting this error when compiling. I know almost nothing about Godot, so really sorry in advance if this is due to something else, but from what I understand, using the GodotSteam precompiled version should take care of finding the Steam module?

SCRIPT ERROR: Parse Error: The identifier "Steam" isn't declared in the current scope.

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

Hmm, this error happens when you run it? That usually means there is no Steamworks present and can happen if you export with a normal Godot template and not one of ours when using GodotSteam pre-compiled editors.

For what I sent you, I think you'd need a template from the same build, which I didn't make yet but can!

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

No, not when running but when building (you can see it says "SCRIPT ERROR" instead of "Parse Error" which from what I understand is what you get when running).

As for the template I used the normal ones you generated yesterday for the non-server version, but again, this error happens before Godot checks those templates from what I understand :).

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

The server build should be using SteamServer, I think, in any scripts.

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

Ok, then maybe that's my issue. Will it be possible to get a normal build with the Dummy video driver instead?

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

Built with server? We typically don't make server builds of the regular version since it doesn't have any Steam server functionality at all and no one ever requested one. I'm not sure if it has a server flag in the SCons file. Not that any of those are huge, blocking issues.

EDIT: Actually it does have the server option in there! Haha.

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

Well, I'm not sure what "server" means in this context. What I'm trying to do is just packaging of games, so I only need the normal editor (I don't think I need the "Server" one) but with the Dummy video driver option. The games packaged with it will be regular games, not "server" ones, if that helps. (Just trying to run this on a CI)

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

Ah, I think I follow. Yeah, the server builds would be something like a dedicated server that can run without any kind of video output in headless mode. This changed a bit in Godot 4 where you can just use the --headless flag instead of compiling it with the server flag for platform.

I'm not exactly sure what adds the dummy video stuff if not the actual server platform. I can't seem to find anything about it specifically.

And you are trying to run the exported game on command line? No video output?

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

Hehehe, no. I'm just trying to package a game, and for that I need the dummy video output for the editor (that headless you talk about there, but using 3.5.3).

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

By the way, after building with the current Server editor + non-server templates, the game seems to work just fine, even the Steam parts that got errored out when building, so I guess Godot doesn't care about script errors and will happily build the scripts anyway?

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

OK, I think we may be on the same page now. Haha, it takes me a few minutes, clearly. This is for a pipeline of exporting game automatically? If so, then this all makes sense... or I'm still way off base, haha.

Hmm, you should be getting errors if you used that server editor but exported with non-server templates... maybe GodotSteam templates could work but vanilla Godot templates should give you some kind of warning when you run the exported game.

@Arcnor
Copy link
Author

Arcnor commented Feb 7, 2024

That's what I did, using the Server you compiled but using the templates from the GodotSteam package. It seems to work, so the only missing thing seems to be that error when compiling.

@Gramps
Copy link
Member

Gramps commented Feb 7, 2024

Huh, well, if it works it works! Haha. I need to investigate further is that is the only way to get the dummy video stuff in there.

@Gramps
Copy link
Member

Gramps commented May 22, 2024

This is quite an old issue! Have you checked out the newest builds? We have headless versions for GodotSteam Server packaged up. Due to the age, I'll close this for now unless there is more to add!

@Gramps Gramps closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Related to the server build
Projects
None yet
Development

No branches or pull requests

2 participants