hiulit / Unofficial-Godot-Engine-Raspberry-Pi

Unofficial Godot Engine binaries for the Raspberry Pi.
MIT License
284 stars 11 forks source link

Server builds? #2

Closed irishgreencitrus closed 3 years ago

irishgreencitrus commented 3 years ago

Would it be possible to use one of these as a server? I think it'd be best to get a dedicated server build as it would not require a desktop environment or even a graphics driver

hiulit commented 3 years ago

I'm sorry, I'm not familiar with "server builds". What are those? What are they used for?

irishgreencitrus commented 3 years ago

A server build is a binary which is commonly used to run dedicated servers and doesn't require a graphics driver. I've built one myself, and it runs surprisingly well and can easily handle 10-20 players (but that of course depends on your game). These are the scons arguments I used. scons platform=server target=release tools=no use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" -j4 Godot docs on dedicated servers Godot docs on compiling dedicated server builds

hiulit commented 3 years ago

OK, I see. To clarify then, you suggest that I compile server builds to distribute in this repo besides the one I already have?

irishgreencitrus commented 3 years ago

Yes, basically. I think it'd be useful for testing network multiplayer or even running small games off of it. (BTW, they aren't export templates, you build it and run it with a main .pck file)

hiulit commented 3 years ago

I'm compiling both headless and server builds right now ;)

irishgreencitrus commented 3 years ago

Cheers!

hiulit commented 3 years ago

Do you think I could strip the server build? Like I do with my export templates?

irishgreencitrus commented 3 years ago

Don't know what that is sorry

hiulit commented 3 years ago

This https://docs.godotengine.org/en/stable/development/compiling/optimizing_for_size.html#stripping-binaries And yes, we can :)

hiulit commented 3 years ago

Headless and server builds are up! ;)

irishgreencitrus commented 3 years ago

Guess thats the issue over then. Thanks for doing this again!

hiulit commented 3 years ago

No problem. Let me know if the builds work if you ever try one :)

irishgreencitrus commented 3 years ago

Just tried a 3.2.3 build and it says no file or directory when running. Output of file command makes it seem like one is 32bit and the other 64bit. I was running on 64bit ubuntu server 20.10 but I assume they will work on 32bit pi os. If you think this warrants a reopen do so but I think majority of people will be using raspberry pi os, so maybe not relevant?

hiulit commented 3 years ago

I don't understand the error. I just tried running both the headless and the server 3.2.3 builds and they work fine.

Do you think, or are you suggesting that because my builds are 32 bits they won't work work on a 64 bits environment? They should, shouldn't they?

Or is it because Ubuntu Server 20.10 doesn't have 32 bit support?

If that's the case I don't think I can do anything about it because I'm compiling on Raspberry Pi OS 32 bits. Maybe I could give the Raspberry Pi OS 64 bits a try so I could compile 32c and 64 bits builds, but it's beta, so I would wait until it's out of beta.

irishgreencitrus commented 3 years ago

If you want i could compile the 64 bit builds and send them your way. Yeah ubuntu server doesn't have 32 bit support for some reason even though it is supported on the board.

hiulit commented 3 years ago

Yeah, sure! Thanks, that would be great :) Do you think if they are compiled on Ubuntu Server 20.10 they will work on Raspberry Pi OS?

irishgreencitrus commented 3 years ago

I don't see why not, but I can always check. Raspberry Pi OS is based on ubuntu and they'd both be 64bit. Is there anywhere I can send them once done?

hiulit commented 3 years ago

Maybe a WeTransfer or something like that? Because they won't fit in an email I think. Or if you have Google Drive or the like, you could upload them there and I'll downloaded them from there.

irishgreencitrus commented 3 years ago

@hiulit https://drive.google.com/file/d/13DTSTxtzT_8vBfZRQHwYBq2_LLZKkjJt/view?usp=sharing

hiulit commented 3 years ago

Hey! Thank you @irishgreencitrus :) I'll add them when I have the time

hiulit commented 3 years ago

BTW @irishgreencitrus did you strip the binaries? Because I think their could be smaller by stripping the debug symbols. Simply run strip binary_name.llvm and you should see how its size gets smaller.

irishgreencitrus commented 3 years ago

I'm not sure. I think i might of done. I'm currently working on a tool to do all of this automatically. Check out this Shameless I know.