A game I want to publish on steam
We can't integrate the SteamSDK with a little amount of tool setup.
Why:
Directory structure:
Packaging:
Loading modules
Implement DLL API for standard SDK files like SourceSDK.dll
https://docs.google.com/document/d/1-bxJ0CZb6_Ceuv-SmGCO4YV-lse8NjmRQWvGFlDvL6Y/
var module = load_module("SteamAPI")
func authentication_response(user_data : UserStruct, status : String):
print(“User has authenticated “ + user_data.name)
)
var authenticate = module.bind(“authenticate_steam”, authentication_response)
Please see this document for the below points:
https://docs.google.com/document/d/1-bxJ0CZb6_Ceuv-SmGCO4YV-lse8NjmRQWvGFlDvL6Y
no
it is core
First questions that pops to my mind: how should GDScript handle native types without any translation layer that is created manually when you wrap 3rd party libraries into modules/gdnative classes?
We'd most likely use something like this as a good template for the implementation:
handles all the potential cases for binding c structs correctly, which at first would be good enough to me.
There is the pinvoke method too from csharp but we probably wouldn't use it as a template, the ctypes system is so similar to gdscript it could be used as a template, and we could make further simplifications, if we don't need all the bells and whistles it has.
Another option is using an FFI (this has less performance issues with JIT compilation, should GDScript add it later)
https://luajit.org/ext_ffi.html
They're always faster than using c functions from a jit compiled language. (since standard c calls to c functions are always slower when you have JIT compilation, as it interrupts the jit compilation. which was a constant source of frustration with garrysmod for example because the jit compilation would die every time you called back into the C++ code the FFI prevents this slowdown if memory serves me correctly.
Ideally we start small though, with something very simple and work from there.
Most helpful comment
Another option is using an FFI (this has less performance issues with JIT compilation, should GDScript add it later)
https://luajit.org/ext_ffi.html
They're always faster than using c functions from a jit compiled language. (since standard c calls to c functions are always slower when you have JIT compilation, as it interrupts the jit compilation. which was a constant source of frustration with garrysmod for example because the jit compilation would die every time you called back into the C++ code the FFI prevents this slowdown if memory serves me correctly.
Ideally we start small though, with something very simple and work from there.