Desktop + Steam

Hey All,

I have a potential project which will need to target desktop with steam integration. I’ve found the following plugins which I think would help enable this:

https://www.defold.com/community/projects/79565/ - DefOS for extra native windowing functionality
https://www.defold.com/community/projects/86864/ - DefSteam for a nice steamworks bridge

I’ve not used either and have no experience of releasing a game onto steam so I’m not sure what user expectations are in terms of being able to change resolutions in-game / switch to full screen and so on.

I wondered if anybody else has shipped a game to steam with Defold and what their experience was and any tips they might have.

Many thanks all!

3 Likes

We have not shipped yet, but we’re also working on a desktop title. The user expects full screen/windowed so that they can choose how immersed they are and and some way to tune the rendering resolution for performance reasons. (You’ll find even a relatively simple 2D game can drop frames at 4k on a regular laptop with integrated graphics)

So far we implemented switching full screen with defos and resolution scaling (1x 0.75x 0.5x 0.25x) by rendering everything to a render target in our render script. DefOS doesn’t support resolution switching and honestly, I don’t think it is needed. See my arguments here: https://github.com/subsoap/defos/issues/88

2 Likes

I’m working on a proper native extension for Steamworks: GitHub - britzl/steamworks-defold: Steamworks support for Defold using the Defold extension system

It’s not on the Asset Portal yet as I’d like to get some user feedback before promoting it further. Also, it doesn’t support the full Steamworks SDK yet, but I believe many of the most important parts of the SDK are there, and it is possible to add more if needed. I’d be happy to work with you on missing features if needed.

Not to my knowledge, but @Pkeod is working on a game for Steam I think.

8 Likes

Many thanks for the replies @dapetcu21 and @britzl

@dapetcu21 Just been reading your comments on github, I never considered the argument for not changing resolutions like how you proposed before. An using a render target then up-scaling it obviously we get the performance increases if the user needs them, I like your approach a lot :slight_smile:

@britzl Yes, would be very interested in working together. I’m not sure of exact timescales but will keep in touch regarding it as things progress. I’m thinking of trying a small casual game first just to bed in the process so hopefully it won’t take too long before I can look at steam and come back to you.

One other question, 16:9 looks like the most popular aspect ratio for PC and steam users:

https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam

To simplify things for a scaling solution if its not 16:9 I’m thinking black bars (the horror :)) for a scaling solution just to keep things simple for now, does that cause issues with users? I only have experience with mobile and on there its unacceptable due to small amount of screen estate. Is it different for PC?

Thank again all, appreciate the help.

2 Likes

DefSteam will be depreciated in favor of @britzl’s version. DefSteam won’t be deleted but it won’t be updated by me either and is already more cumbersome to use / simply cannot support some features because it uses FFI and so callbacks with it are impossible.

I have multiple games nearing release on Steam which were made with Defold. Some original, some ports of games written with other engines that are already on Steam but are getting replaced with Defold versions because of how good Defold is. Basically just ported everything over, and we get better performance, more stability, easier cross platform deployment on these legacy projects.

If you have any questions about needed desktop features you can ask and most likely get an answer as I’ve already needed them to and found solutions.

7 Likes

@Pkeod This is great news, looking forward to seeing your releases and good to know Defold is able to publish to steam with some help along the way :wink:

I don’t think my games are going to take over the world but I’d like to start to build a little catalog and gain some experience to springboard into a larger project.

Many thanks again all!

2 Likes

@britzl
Hi Bjorn, I am trying to integrate your steam lib, but got this error:

dyld: Library not loaded: @loader_path/libsteam_api.dylib
Referenced from: /Users/ivan/Projects/Perky Little Things/build/x86_64-osx/dmengine
Reason: image not found

any ideas?

Is this when you do Project->Build? The error is likely caused by missing libraries. The libs are located in steamworks/bundle and will be included in the application bundle when you bundle the application. You can build, get the error message and then manually copy the lib and launch. There’s a run_osx.sh, run_x86_64-linux.sh and run_x86_64-win32.bat in the root of the GitHub project that you can use to automate this.

2 Likes

If I copy files to build/default it works, building .app is also ok.
But is there any way just to run the game from the editor? At least with auto-disabled steam.

PS. Now I have ERROR:SCRIPT: /main/steam.script:11: attempt to index global ‘steamworks’ (a nil value)

The extension is configured to load the libraries from the same path as the executable. Not sure if that can be changed. I’m going to check with Mathias.

Hmm, that is strange. You’re testing on a Mac? Same result if you bundle?

Yes, Mac. Bundle is ok.

The extension is configured to load the libraries from the same path as the executable.

It would be nice the game still run even if libraries is missing. Maybe some kind of a check in NE?

We don’t seem to copy bundle resources to the build directory when you build from the editor Probably not a good solution.

1 Like

Delete build folder, rebuild - now it works again, but now I take dmengine from x86_64-osx as there is no x86_64-darwin

@britzl, but listener never executes, here is all the log:

INFO:DEFAULT: Init
Setting breakpad minidump AppID = 811890
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198027896423 [API loaded no]
INFO:DLIB: SSDP: Started on address 192.168.100.6

PS, sorry, forget about update! :blush: IT WORKS!

4 Likes