britzl / steamworks-defold

Steamworks support for Defold using the Defold extension system
34 stars 6 forks source link

Still worth doing #1

Closed subsoap closed 6 years ago

subsoap commented 6 years ago

This project is still worth doing right. An issue with DefSteam is it doesn't translate the ffi cdata, it returns it raw, and it doesn't handle callbacks. It was EZ mode to add some basic Steam features like achievements but I'm not sure it's best for everything else. I'm still looking at options though but doing it all as a native extension and adding features as needed may be best...

subsoap commented 6 years ago

I'm going to do some more work on DefSteam to try to make it as usable as it needs to be for now.

subsoap commented 6 years ago

Yeah.. I think there's no way to do this right for the callbacks to work in DefSteam other than with a native extension / making a DLL with the right stuff for FFI to use. Easiest thing for me to do probably would to make a native extension which can work alongside the FFI functions to enable callbacks then slowly move over to fully using the native extension.

subsoap commented 6 years ago

Was this NE made with a pre-release version of native extensions? Could you try to update it so it builds? I tried updating everything, and it builds, but the game engine immediately closes. This is the log output

Registered steamworks Extension
INFO:DLIB: Log server started on port 60971
INFO:ENGINE: Engine service started on port 60972
INFO:ENGINE: Defold Engine 1.2.134 (b2ef3a1)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device 'default'

DEBUG:SCRIPT: STAT_TYPE_AVERAGERATE 2
DEBUG:SCRIPT: set_user_stat_value   function: 0x1e9c9760
DEBUG:SCRIPT: get_achievement_names function: 0x1e9c9640
DEBUG:SCRIPT: STAT_TYPE_FLOAT   1
DEBUG:SCRIPT: get_achievement_info  function: 0x1e9c95e0
DEBUG:SCRIPT: final function: 0x1e9c9590
DEBUG:SCRIPT: set_listener  function: 0x1e9d1d10
DEBUG:SCRIPT: STAT_TYPE_INT 0
DEBUG:SCRIPT: request_leaderboard_info  function: 0x1e9c97c0
DEBUG:SCRIPT: get_user_stat_value   function: 0x1e9c9700
DEBUG:SCRIPT: init  function: 0x1e9c94f0
DEBUG:SCRIPT: update    function: 0x1e9c9540
DEBUG:SCRIPT: get_user_info function: 0x1e9c96a0
DEBUG:SCRIPT: calling init
britzl commented 6 years ago

Yeah, this is an old NE. I can take a look this week.

britzl commented 6 years ago

I've updated the extension now so that it builds with the current extension system. I also updated to the latest Steam SDK (1.42)

subsoap commented 6 years ago

Nice, I'll test it out soon.

subsoap commented 6 years ago

It's not working for me, doing the same thing when I tried to update it. The x86_64-win32 has the wrong dll also it should be steam_api64.dll and steam_api64.lib yeah?

subsoap commented 6 years ago

Going to test it again now see if I can get more info out of it.

subsoap commented 6 years ago

Got it to run, was a dll/lib issue

2018-08-31 16_40_52-defold editor 2 0 - steamworks

I'll work on this more this weekend, made a pull request to fix the windows issues. Windows builds need those dlls in the same folder as the game.project file. The batch file needs to be fixed too.