Suggestion I think we're going to need a steam API?

dawlane

Well-known member
CX Code Contributor
Joined
Jun 21, 2017
Messages
856
Could be tricky. SDL2 is one of the main requirements on Linux for the Steam. Trying to mix SDL2 and GLFW probably would cause a few head-aches with memory leaks. It's one reason why I gave up on adding file requester's for Linux. For those you needed either a pure GTK+/Qt target with OpenGL support for it to work correctly.

Ryan Gordon from Icculus gave a lecture on SDL2 back in 2014
 

muruba

New member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Patreon Silver
Joined
Jul 5, 2017
Messages
230
I know people were selling games written in java with bundled jvm (that is using some weird unknown combination of direct x/opengl renderers) so CX is in a good shape for it. Actually I am planning to release my super weird color game for Steam in the next few months :) Actually working on landscape view of it right now!
 

muruba

New member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Patreon Silver
Joined
Jul 5, 2017
Messages
230
Also I read in the last release of SDL some of Audio functionality was broken with no real plans to fix it and people going mad. But yeah, SDL is a behemoth in the world of low level x-platform programming no doubt (with valve behind it, I saw Sam himself making commits recently which is bloody awesome i guess :)
 

Martin

Active member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Joined
Jun 19, 2017
Messages
334
Well ya, that's a different beast made with Unity. Should do that indeed. Thanks for reminding me!
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,167
I mean if we can add Steam support to CX, it would be awesome!
 

Martin

Active member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Joined
Jun 19, 2017
Messages
334
I haven't thought about Linux with this one actually. So sorry dawlane for that one. ;) I simply guess that Linux almost plays no role compared to Windows for gaming, even MacOS is just... a tiny fraction.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,167
So a SDL2 target is basically mandatory to add Steam support to CX?
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,167
It would be for it to work under Linux.
As we shouldn't have to deal with two frameworks for desktop, I would suggest a complete move to SDL then for all platforms that use GLFW. But I could imagine that this is a big job to do.

Anyway, Steam support would be awesome for CX. So far I only know of Gamemaker Studio which supports all Steam features out of the box. Are there any other tools that have full support for Steam?
 

dawlane

Well-known member
CX Code Contributor
Joined
Jun 21, 2017
Messages
856
As we shouldn't have to deal with two frameworks for desktop, I would suggest a complete move to SDL then for all platforms that use GLFW. But I could imagine that this is a big job to do.
I tried to google for any information on using GLFW with the Steam API. My search yielded very little on the subject apart from a bug on using the overlay and mouse input, as well as using the Steam controller and GLFW vs SDL.

I guess it would require asking a lot of question on the Steam dev forums on the subject and scrutinising the Steamworks documentation.

One post on reddit said it should be nearly a simple task to change the code from GLFW to SDL and visa-versa.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,167
Also Steam ships with the SDL libraries so you don't need to add them I think.
 

muruba

New member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Patreon Silver
Joined
Jul 5, 2017
Messages
230
Aren't we mixing 2 things -> using SDL as a graphics renderer vs integrating game to Steam services?
 

dawlane

Well-known member
CX Code Contributor
Joined
Jun 21, 2017
Messages
856
using SDL as a graphics renderer vs integrating game to Steam services?
Depends on what SDL2 sub-systems are used by Steam.
The SDK documentation for Linux install says that Steam uses SDL2 for a number of Steam games to handle windowing and provides the back-end for the Steam Controller API. What I've read so far for the use of GLFW and Steam's own controllers is to use the Steam Controller API, that should mean that the SDL controller sub-system would be called on Linux.

Now the question is would the GLFW and those parts of the SDL sub-system work well together, or would it be better just to go SDL for the most part. Probably the best way to answer that would be to write a pure GLFW application with Steam integration.
 

EdzUp

New member
Joined
Jun 21, 2017
Messages
37
Mixing rendering engines is going to be a pain GLFW and SDL don't mix well together as others have said.

Isn't there a raw C++ route to get steam in the system as I can't think SDL being the only option.

This doesn't mention SDL even on the Linux page
https://partner.steamgames.com/doc/sdk
 
Top Bottom