Steam-ready (almost)

News and discussion of the PC port of Oolite.

Moderators: another_commander, winston

Post Reply
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Steam-ready (almost)

Post by another_commander »

The two screenies below show Oolite running under the Steam client. If you are familiar with Steam you will immediately recognize the overlay. Don't worry about Spacewar appearing as the game's name; this is Valve's generic test project that developers can use to emulate how their game would appear on the Steam platform during its development.
Image

Image

Now, I don't mean to imply that Oolite will be going on Steam any time soon. I just did some groundwork and tested the compatibility of the game with the Steam layer - which so far has been with surprisingly few issues. Going on Steam is a complicated affair and requires dedication and persistence: setting up a store page, uploading patches, constant monitoring of reviews, community feedback etc. requires time and lots of effort. But at least the coding part is now there, just in case anyone in the future would be willing to spend all the required time and effort to set all the rest up.

It is noted that Valve discourages projects with GPL licenses on their platform ( see https://partner.steamgames.com/doc/sdk/ ... opensource ). It is not impossible to do this, though. There are things that need to be further clarified license-wise before any thoughts of going live on Steam can be entertained.

For those who want to try it out themselves, the code for running Oolite under the Steam client can be downloaded from D/L link removed and instructions on how to build can be found inside the downloaded zip file. Note: D/L taken down due to GPL violation.

Edit 2022-04-19: Updated the shared zip file to include a precompiled test executable and cleaner file structure.
Edit 2022-04-21: Updated the shared zip file to version 3. Contains the Steam callbacks integration.
Edit 2022-04-25: Download links removed due to GPL violation - PM me if you need setup instructions for this.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Steam-ready (almost)

Post by Cholmondely »

Well done!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 639
Joined: Sat Dec 04, 2021 11:01 pm

Re: Steam-ready (almost)

Post by Old Murgh »

another_commander wrote: Mon Apr 18, 2022 6:29 pm
..But at least the coding part is now there, just in case anyone in the future would be willing to spend all the required time and effort to set all the rest up.
Sounds great. Cool achievement.
I have just very little exposure to Steam, but 'since there are clients for several platforms, it wouldn't be PC-exclusive? Just asking on account of the chosen forum header..
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Steam-ready (almost)

Post by another_commander »

Old Murgh wrote: Mon Apr 18, 2022 11:22 pm
I have just very little exposure to Steam, but 'since there are clients for several platforms, it wouldn't be PC-exclusive? Just asking on account of the chosen forum header..
Right now it is PC exclusive, hence the forum chosen. There are indeed Steam clients for Mac and Linux, but until someone codes the interface / integration between the game and those clients, there can be no Mac or Linux version of Oolite on Steam.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Steam-ready (almost)

Post by another_commander »

Some further progress with the Steam integration to report: Steam asynchronous callbacks are now supported. In plain English, this means that now Oolite can exchange messages with the Steam client while the game is running, which unlocks implementation of features like achievements, stats, leaderboards and others, while supporting integration with the Steam overlay fully. Examples are below.

Image

Image

Ok, not much seem to have changed from earlier shots. But what you cannot see, regrettably, in these shots is that Oolite can now recognize when the Steam overlay has been activated and, when it has, it auto-pauses. The game resumes normally once the overlay is removed. This is the simplest (and one of the most useful) example of interaction with the Steam client via callbacks. In addition to this, the game currently listens for communications from the Steam client whenever user stats are stored and received and when achievements are stored, so that we can react to them, if we want to.

The test executable I have available at the moment also tests the Steam DRM facilities. It requires Steam to be running and the user to be logged in and online in order to run. Of course all those restrictions are not necessary for a single player game, but this is a test, and I am trying to test as many features as I can, so please bear with me. ;-)

In a few hours I will post a zip with all the source code changes necessary to get this working, the test executable used and instructions on how to set this all up.

And with that, for now I'll leave you with one last screenshot from this test run, titled "Steamception".

Image
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Steam-ready (almost)

Post by another_commander »

A demo binary plus source code changes plus instructions can now be downloaded from this link. Download link at first post has been updated to point to this file as well. Note: D/L taken down due to GPL violation.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Steam-ready (almost)

Post by another_commander »

So I did a bit more research on the license situation and I have some good and some bad news.

The good news is that all ports can be uploaded without any problem to Steam, if we so choose. Windows, Linux and Mac versions can all be uploaded in the same form we have been distributing them up to now. There are in fact, many open source projects that are up on Steam and, regardless of their license, the act of uploading them represents no licensing issues whatsoever. It's just a matter of setting up the project and obtaining an appid from Steam (note: it involves a $100 fee per game), setting up a store page and keeping communication channels with the community open. So there is still lots of work to do, but the binaries are certainly not our worry here.

The bad news is that little text above, i.e. "in the same form we have been distributing them up to now." This means that linking the game's executable with the Steamworks API is not an option, as the game code is licensed under GPL v2 and the Steamworks API is proprietary commercial code that belongs to Valve. Therefore, there can be no integration of Oolite with the Steam overlay nor interaction with any of Steam's features, like achievements, workshop etc. Which means that all the work I've been doing on this has been for nothing, really. Actually, precisely because of the license incompatibility, I am forced to take down the previously posted download links with the test executable, because distribution of such executable is a violation of the GPL. Sorry about that, please PM me if you are interested to set up Steam support for your own testing and I will be glad to help you out as much as I can with it.

However, not all is lost. During my research I came across this project on github. This is cross-platform and apparently one (and probably the only) way to interact with the Steam API without violating the GPL. Information on how it works can be found in the project's page on github. Some FOSS projects like megaglest make use of this and are up on Steam with a plethora of Steamworks features already implemented, so it is certainly something that works. However, I think that the effort involved for Oolite does not justify spending any more time with it, unless Steam gets significant consideration in the future. Just dropping this knowledge here in case anyone decides to have another go sometime down the line.

Well, at least it was a very interesting and educational exercise in programming and a working proof of concept, so there's that.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Steam-ready (almost)

Post by Cholmondely »

Just curious - I've gotten nowhere with Steam and sadly fail to understand the hi-falutin' jargon... was this an attempt at multi-player Oolite?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16059
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Steam-ready (almost)

Post by Cody »

Short answer: no!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Steam-ready (almost)

Post by another_commander »

Cholmondely wrote: Tue Apr 26, 2022 9:54 am
Just curious - I've gotten nowhere with Steam and sadly fail to understand the hi-falutin' jargon... was this an attempt at multi-player Oolite?
A slightly longer answer:

No, it was an attempt to see if it would be possible to integrate Oolite with the world's most popular games digital distribution platform and its services. Steam has currently approx. 26 million concurrent active users and this is just data from the last 48 hours ( see here ).

The verdict is that yes, it is technically possible, but it is very difficult from a licensing point of view and requires dedication with regards to time and community management.
Post Reply