Twometer / neko-engine

🧊 3D game engine using Kotlin and LWJGL
Apache License 2.0
16 stars 1 forks source link

Packaging of Ultralight #1

Open daniel-lerch opened 3 years ago

daniel-lerch commented 3 years ago

The Neko Engine requires the contents of the bin folder of an Ultralight SDK to be located at assets/Natives/Ultralight for every game. While you're absolutely right, not to add these libraries to source control, I'm wondering whether there is a better solution.

The optimal solution would be to bundle Ultralight binaries in your Maven package or maybe in a separate Maven package if you want to support more platforms than just Windows out of the box.

If you can't embed resource files in Maven packages you could think about a script for projects like Among Us 3D which downloads and extracts Ultralight automatically.

Twometer commented 3 years ago

The Ultralight DLLs should definitely be packaged along with the maven package. LWJGL does this with its natives as well, so this should work. However, I don't know if this conforms to Ultralight's proprietary license model.

There is a similar problem with other resources. The neko engine requires a baseline set of shaders and other resource files. Those must be copied to the output folder manually each update. While this allows easy editing of the built-in shaders, it also does not separate engine code and user code.

daniel-lerch commented 3 years ago

This update concept for shaders sounds interesting but I can understand that you didn't want to publish a new release of Ultralight for every changed line of code. Anyhow, you don't need to update your shader files in order to run your game while Ultralight binaries are necessary.

The proprietary license of Ultralight is not compatible to LGPL-3.0 which you are using for this engine. However, you could just add a section to your README with a link to their license and mention that this dependency of the Neko Engine requires a license for commercial use by companies with more than $100K gross annual revenue. Legally, this would be even better than the current approach to package Ultralight in games like Among Us 3D without mentioning license details.

Twometer commented 3 years ago

You actually do need the shaders, because if you create a new game with the neko engine and don't copy the shader files, it will show a blank screen and a lot of errors in the console, which is not very nice.

As for the license, I will definitely add a notice to the readme so that there are no legal problems.