Steam

Hello. I was wondering why Steam has separate versions of games for Windows, OS X and Linux? Why cant it work in such a way that devs just make one universal game that's Steam compatible and have it run cross platform?

I was thinking about this while i was playing some SNES games in an emulator. The games are all coded the same but made available cross platform through the emulators. Why cant Steam work in the same way? I'm sure devs would support this idea.

Why is it the way it is now? Seems backwards and outdated :/

Chris.
 
the games don't run 'on' steam they run 'on' the operating system...
Making a game cross compatible takes a LONG time, and considering the audience size of both the other platforms it's no surprise it's only really just starting to get to the point where it works.

Microsoft has a lot of stuff they won't let you run on a mac, like Directx stuff for example, I believe (Correct me if i'm wrong) that it's a windows only thing. So, if you've made a game that utilises this, it's much more difficult to port it over.
 
If you add another layer of abstraction you are reducing the availability of the lower level APIs available to the developers. This is going to affect performance greatly.

Direct3D is one of the most common HALs developers use. It means they don't have to code for every GPU available but will lose some performance.
 
the games don't run 'on' steam they run 'on' the operating system...
Making a game cross compatible takes a LONG time, and considering the audience size of both the other platforms it's no surprise it's only really just starting to get to the point where it works.

Microsoft has a lot of stuff they won't let you run on a mac, like Directx stuff for example, I believe (Correct me if i'm wrong) that it's a windows only thing. So, if you've made a game that utilises this, it's much more difficult to port it over.

I understand that the games run on the OS. I think maybe i worded it badly. What i meant was why cant Steam act like a kind of translator for the games which points things in the right direction?

Clearly i have little to no understanding of how all of this works but it just seems silly the way it is now.

If you add another layer of abstraction you are reducing the availability of the lower level APIs available to the developers. This is going to affect performance greatly.

Direct3D is one of the most common HALs developers use. It means they don't have to code for every GPU available but will lose some performance.

"Whoooooosh" is the sound it made as all of that went over my head lol. Thanks for trying though.

This is generally how programming works. When the game is being coded it's much easier for the developers to use something called an API that hooks into the native OS to do something than coding it themselves.
So let's say we need to draw a cube on the screen - it's much easier and much faster (to develop) to use code that someone else has already created, so it could be as simple as calling the method drawCube(int x, int y, int z) to make it appear on screen rather than going through the effort to write the code yourself.

The reason games are primarily run on Windows is because Microsoft has done an incredible amount of work on it's APIs called DirectX (or more specifically - Direct3D for gaming). So game developers use those APIs (that hook into Windows) when creating their games as it's much easier, so it can only run on Windows because Direct3D won't run on Linux.

Yes i understand that, I've played around and made a couple of basic iPhone apps in the past.

But, of course, if the game is only calling drawCube and expecting the API behind it to do all the heavy lifting and work with the native OS, why doesn't someone create an API that people can use that would work with all systems? Say hello to OpenGL. It's what Valve are using to put their games (like CS and Portal) onto all platforms.

Though this explanation is ignoring the fact that some languages only work on some OS's too, so keep that in mind if you want to look into it further.

I know of OpenGL. As i understand it many devs are moving to it, or at least, i read that somewhere. In the end though theres still a different version for each platform. I dont understand why it cant be like an .MP3 or other universal formats that work cross platform.

If the game is run in an emulator it can't perform as well as if it were to be written natively (which is obviously very important if you're talking about framerates). You can naively think of your emulator as another operating system inside the one you're currently running which means it requires more resources to run.
Though this idea isn't new and is actually used in the Java programming language (what Minecraft uses). When you run something in Java it's running inside the Java Virtual Machine (JVM) which means it can be run on different platforms without any extra work on the part of the developer, because the JVM does all the work in interacting with the OS that it's on rather than the programmer having to do that. This is one of the reasons some people don't like Java - especially for game development - because the performance can often suffer.

Like i said earlier, perhaps the emulator was a bad example? What i meant was the games are the same no matter what platform you play them on. Maybe the .MP3 was a better example? I'm not talking about these things directly, i'm just trying to get my thoughts across the best i can (and seemingly picking bad examples). Is it simply that a cross platform solution can't be optimised for each platform? Surely it would be down to the drivers, software or whatever to make the idea of cross platform games work well? Do you know what i'm trying to say? For example lets pretend these cross platform games are ".Game" files. Wouldn't it be down to the "player" (app, drivers, whatever) to make them play and play well? What makes a game different is my question (i guess)?

Thanks for the detailed reply by the way :)

Chris.
 
Last edited by a moderator:
an mp3 is just a storage format it's not really an execution file. The issue is windows, linux and unix all talk to the hardware using different languages which is the root issue here. An mp3 is just data, a game/program is a set of instructions to run, that needs to be translated in a way as such at the hardware can interpret it, and each OS does this a completely(for the most part) different way.

By saying steam, i assume you mean valve as Steam is just a store / shopfloor really, it's just a place where people sell their stuff. It can't nor will it ever be a emulator/virtual machine. Yes there is this Steam gaming machine which is apparently based on linux but that will mean the games need to be written/ported to that and i doubt a lot of the windows based stuff will work straight out of the box unless they have something pretty ridiculous up their sleeve. (although, knowing Valve and Gabe they probably do)
 
Last edited:
What i meant was the games are the same no matter what platform you play them on.
On the surface they'll look the same, but under the hood they each have their own way of doing things. So to do the same thing (eg, put something on screen) they actually have to do something different for each platform.

Is it simply that a cross platform solution can't be optimised for each platform? Surely it would be down to the drivers, software or whatever to make the idea of cross platform games work well?
Pretty much.

In a perfect world you'd have your games programmers creating methods like pickupItem or shootGun that deals with the things they want (like adding an item to your inventory or reducing your ammo count) and merely calling an API like OpenGL that can dynamically load what it needs to (Windows, Linux, OS X) depending on what the OS is.

If Steam were to act as an emulator (or virtual machine) type thing then games could be programmed once (using a Steam API) and then ran crossplatform - leaving the difficult work for Valve to implement in the Steam 'wrapper' but you would lose performance because of the overhead of having Steam doing this extra processing rather than doing it through an API yourself.


If you've created an iOS app just think about the differences between iOS, Android and Windows Phone 8. It's pretty much the same deal with graphics programming.
 
By saying steam, i assume you mean valve as Steam is just a store / shopfloor really, it's just a place where people sell their stuff.

Just for reference, there is a Steam API which all Steam apps utilise and so it is more than just a store.
https://partner.steamgames.com/documentation/

EDIT: Anyway if any of this did happen it would definitely not be done at runtime so it would be transparent to the user for the most part (the redist would be installed alongside the game, like DirectX). Most game engines support compiling for different platforms.

There are already tools available to do this for mobile development, namely Marmalade.
 
Last edited:
an mp3 is just a storage format it's not really an execution file. The issue is windows, linux and unix all talk to the hardware using different languages which is the root issue here. An mp3 is just data, a game/program is a set of instructions to run, that needs to be translated in a way as such at the hardware can interpret it, and each OS does this a completely(for the most part) different way.

Arh i see. So basically what I'm suggesting would have to be an emulator of sorts which will reduce performance.

By saying steam, i assume you mean valve as Steam is just a store / shopfloor really, it's just a place where people sell their stuff. It can't nor will it ever be a emulator/virtual machine. Yes there is this Steam gaming machine which is apparently based on linux but that will mean the games need to be written/ported to that and i doubt a lot of the windows based stuff will work straight out of the box unless they have something pretty ridiculous up their sleeve. (although, knowing Valve and Gabe they probably do)

I'm not really sure what i mean to be honest lol. I guess i thought it was a little more than a store because of the Steam console i've heard about.

I wonder if the Steam console could be emulated? As i understand it the hardware will be pretty low end anyways, so on a decent machine it shouldn't matter that it's being emulated? Or am i completely wrong?

Whatever happens i'm looking forward to see what they release.
 
In a perfect world you'd have your games programmers creating methods like pickupItem or shootGun that deals with the things they want (like adding an item to your inventory or reducing your ammo count) and merely calling an API like OpenGL that can dynamically load what it needs to (Windows, Linux, OS X) depending on what the OS is.

Why isn't this happening then? Is it that devs have just gotten attached to DirectX/3D? Am i wrong in saying people are starting to move to OpenGL? I seem to remember reading that somewhere.

If Steam were to act as an emulator (or virtual machine) type thing then games could be programmed once (using a Steam API) and then ran crossplatform - leaving the difficult work for Valve to implement in the Steam 'wrapper' but you would lose performance because of the overhead of having Steam doing this extra processing rather than doing it through an API yourself.

Would the performance hit really be noticeable though? I played Crysis 2 in a virtual machine and it didn't seem to play any worse than it did natively.

If you've created an iOS app just think about the differences between iOS, Android and Windows Phone 8. It's pretty much the same deal with graphics programming.

I have no idea what the differences are haha. I just watched tutorials and read up on what i wanted to do and followed instructions if i'm honest.
I know what you mean about calling things though. Instead of coding an entire web browser you can just use "UiWebView" in XCode, for example.
 
Last edited:
Just for reference, there is a Steam API which all Steam apps utilise and so it is more than just a store.
https://partner.steamgames.com/documentation/

EDIT: Anyway if any of this did happen it would definitely not be done at runtime so it would be transparent to the user for the most part (the redist would be installed alongside the game, like DirectX). Most game engines support compiling for different platforms.

There are already tools available to do this for mobile development, namely Marmalade.

I thought there was something different about steam. I remember reading that devs were having to decide between the App Store and Steam on OS X. Two different versions apparently. :S
 
Back
Top