#Collaborating with extensions (Steamworks ext is really annoying)

1 messages · Page 1 of 1 (latest)

inland walrus
#

I've been working on getting steam implemented for a new project and have been running into roadblock after roadblock with it. I feel like I must be doing things wrong and would love some advice from others who work over version control.

For starters, the steam SDK path is part of the project files and can't generally be set differently on different machines, so if my collaborator and I both want to make steam builds but our sdks aren't in exactly the same file path then we end up colliding frequently. I ended up having to set up .gitignores for the relevant extension setting files, which seems to be working, but feels like a weird solve? (I've never had to do that for other parts of the project before).

Secondly, we work with some people who don't make steam builds, like artists and sound designers. However, if Steamworks-Ext in our project, all our builds would fail without a valid steam sdk path on the user's machine. And if we removed the Ext from the build (something I ended up needing to isolate across collaborators using another .gitignore on the extension .yy file) then the build would crash because steam functions that run on startup like steam_initialized() would fail. This seems like it would be a problem for future platform ports too. Previously, when steam features were part of the engine, we'd have steam_* functions all over the place which would simply silently fail on non-Steam platforms, but now we need a way to make sure those functions never run unless we're definitely on steam.

The solution I wound up using is the screenshotted try-catch, which feels SUPER janky. Surely... surely there's a better way for the game to reason around these things, right? I'm aware I could do something with build configs, but I strongly prefer an automatic solution that doesn't require me to remember to set my game to be Steam or not-steam before compiling, especially because we are using configs to segment other aspects of the game like demos, and having a steam vs. non-steam config would be multiplicative with our existing numerous configs.

anyways this is partly a whinge post but I'm genuinely curious if there's a known good workflow for this.

crisp verge
#

for the first part, i structure repos like so:

root
|
|-- SDKs
|   |
|   \-- Steam
|
\-- Project
    |
    |-- project.yyp
    \-- etc.
#

which means i have a copy of the Steam SDK included in the actual repo

#

does this mean i have multiple copies of the Steam SDK distributed across multiple projects? yes, it does. is this gross? yes, it is. do i feel bad about it? not in the slightest

#

it means i don't need to explain how to set up how to compile that game for artists, sound designers, composers, producers, and other gamedev workers who haven't spent the majority of their life reading monospaced text. that is the conceit that GameMaker is meant to operate under and i'm happy to waste a few MBs to achieve that

#

for the SDK path in the extension in the project, i use %YYprojectDir%/../SDKs/Steam/

#

which takes the absolute path for the project, goes up a step (to the root of the repo), then finds the Steam SDK relative to that

#

this shhhooould work no matter what machine/OS you're on

#

given that you now have the Steam SDK available for all users, i believe that addresses your second concern too

#

(additional note: if you call functions from an extension and that extension is marked as not "copying to" the platform you're building for, then the function silently fails and returns 0 / an empty string depending on the designated return type)

#

there might also be a way to modify the building batch scripts to be less strict about the presence of the Steam SDK when building, and then letting Steam functions fail

spare ruin
#

That's great to know, thanks Juju.

inland walrus
crisp verge
#

!!! i do not remember it being that big

halcyon agate
#

What I also thought it was only like 30-80 MB

crisp verge
#

yeah ... no ... dunno where you're getting 4.2GB from ... it's 44MB for me

spare ruin
#

Setting this up for the first time, seems to work well 👍

crisp verge
#

forgot how to do this, came back to find my own post

quiet siren
#

every few months i google something about gamemaker and end up getting served something that i posted

crisp verge
#

oh hello i'm back

storm nest
#

Would it be bad if we just threw the SDK folder inside of the project folder (instead of a root that holds the sdk and project separately)?

crisp verge
#

no, but it'll lead to a very cluttered project directory

dusky sigil