Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[GUIDE] Steam in GameEx


Recommended Posts

I recently got GameEx, and after setting up all my console emulators, I started looking for a way to integrate my library of Steam games into GameEx. The vast majority of my Steam titles have native controller support, so the ability to browse my Steam collection and start PC games from within GameEx using just my controller is VERY nice. I know there are a few other topics out there, but they are very dated and the solutions aren't as elegant as the one I finally game to, so I thought I would share, and hopefully someone finds this useful!

For starters, you just need to set up Steam as an emulator in GameEx using the Advanced Configuration utility:

  • I attached a nice alpha blended Steam logo below that you can simply put in your current (or default) theme's ./MEDIA/LOGOS/ directory. In the emulator configuration you can set the Logo to this filename.
  • Steam uses .url files as shortcuts to installed games, so set the Rom Filter to *.url
  • From within steam you can right click a game in the Library and have it 'Create Desktop Shortcut'. Collect all the .url files for the games you want in GameEx from your desktop and place them into a folder somewhere. You can then specify this folder as the ROM Path in the emulator configuration
  • The shortcuts can be launched directly, so for the Command Line you can just specify "[ROMPATH]\[ROMFILE]"
  • Set Map Keys to 'No', because you will likely want to press esc in game.

With these basic steps complete you can now browse and launch your Steam games from within GameEx, but the difficult part of this process is getting GameEx to recognize when you have quit the launched game so that it can return to the foreground. Using the Advanced Config editor on the second page of the emulator settings will allow you to set process names that GameEx waits to terminate before reappearing. The question is, what process should we use?

The older threads I saw suggested terminating the steam application itself in the Launch After and monitoring steam.exe in the Process Wait section of the Advanced Config editor. I didn't want to do this because I like to keep steam running to communicate with friends, and also because you can launch games much quicker when Steam is already running. Having to stop and restart Steam every time you run a game isn't efficient.

Setting up steam as an emulator with a list of games instead of setting up each Steam game individually is magnitudes more attractive, but it means the emulator config doesn't know what the launched game's executable is, so we can't just wait on that. Fortunately steam has added some features (I think since the most recent forum topic on the subject) that work perfectly for our purposes.

In Steam if you open the properties for a game, you see the option on the first tab to 'Enable Steam Community In-Game'. Enabling this option makes the game have an overlay where you can access your friends list, view CD keys or whatever. The process that provides this overlay starts and stops with each game run, so its a perfect target for monitoring when any launched game has finished. You can find this GameOverlayUI.exe right in the root of your Steam folder.

Unfortunately just specifying this process isn't enough, because the GameOverlayUI process takes a little while to start after launching the Steam game, and GameEx

will immediately check for this process after launching the shortcut .url, and not finding it running (yet) will return to the foreground. So we have to make GameEx wait a while before checking for this process. This can be accomplished by setting the Wait Before Keys value in the emulator configuration. Set it to something like 20000, and GameEx will wait for 20 seconds after running the Command Line even if you don't specify anything under Keys To Send.

So to finish up:

  • Using the Advanced Configuration editor, create a new config ini that just specifies GameOverlayUI under Process Wait (I disabled pretty much everything else).
  • Set Wait Before Keys in the emulator config to something like 20000 (depending on longest time it takes for the Shift+Tab Steam community thing to appear after launching the game).

I think this an elegant solution and I REALLY enjoy the results. Quite enjoyable to be able to sit with just my wireless 360 controller and browse and play any console game or Steam game with little to no keyboard/mouse input required. Oh, and for the icing on the cake, you can get the slick thumbnail images Steam uses for each game off their website if you know the appid of the game. If you open the properties of the shortcut .url for each game you'll find the appid at the end of the url. For example Crysis 2's shortcut url is steam://rungameid/99830, where 99830 is the appid for Crysis 2. You can then go to http://cdn.steampowered.com/v/gfx/apps/99830/header.jpg, and you'll find a slick header image for Crysis 2 that you can convert to a .png and stick in the Snap/Video Path (as specified in the emulator config) with the same filename as the url shortcut to have it appear in GameEx.

Delicious. Thank you GameEx!

EDIT: I noticed the Steam icon below will appear with the bottom half transparent in any GameEx theme that uses color key transparency (which is the majority of them) because the bottom half of the logo is pure black. You can fix this by either using a theme that uses alpha channels (not sure how many are out there) or by increasing the brightness of the png just a hair so there isn't any true black into the logo.

post-8537-0-68300900-1301991994_thumb.pn

  • Like 4
Link to comment
Share on other sites

Couslev - Do you think that this may work similarly with games distributed by Impulse or Windows Live?

I can't say anything about Impulse because I know nothing about it. Essentially Steam has two specific features that make this possible. The centralized launch system that lets you run a .url or .lnk to start various games through the distribution client, and the overlay system that is launched / terminated as a separate process in parallel with the actual game process. I don't expect other distribution channels to have the level of integration Steam has... many users don't like this quality, and would rather just have clean individual games that are launched independently of the distribution client.

Games for Windows Live have a similar 'Overlay', but I don't think this is implemented as a separate process like the Steam overlay is. I have Fallout 3 GOTY and Resident Evil 5 (on Steam) which are GFWL titles... there doesn't seem to be any other process started along with the games.

Link to comment
Share on other sites

Gotcha - thanks! As for the file names for the snaps - can you post an example using Crysis 2 based upon your original post?

Sure. I somehow found out where Steam was pulling the nice looking graphics for the Library's "Grid View" layout. You can find the graphics at:

http://cdn.steampowered.com/v/gfx/apps/<appid>/header.jpg

Where <appid> is the application ID of the game in question. Like for example the appid of Crysis 2 is 99830, so you can find the header at cdn.steampowered.com/v/gfx/apps/99830/header.jpg, if you go to pixlr.com, you can easily load the jpg straight from this url then save it as a png.

The filename is important because it has to match the "rom name" exactly. In our configuration above the "rom names" are the names of the .url shortcuts. So in my ROM Path as specified in the emulator config (in my case "D:\Roms\Steam\Shortcuts\"), I have:

D:\Roms\Steam\Shortcuts\Crysis 2.url

You just need to save the image as a .png with the exact same name as this .url shortcut in the Snap/Video Path as specified in the emulator config (in my case "D:\Assets\Steam\Snaps\"):

D:\Assets\Steam\Snaps\Crysis 2.png

GameEx will then pick up the image as if it were a game snapshot, and display it when browsing your Steam games list. Unfortunately the aspect ratio of these header.jpg files doesn't jive well with GameEx, and it keeps scaling them to 4:3, which makes them look pretty distorted when displayed on the game list (although they look great displayed below the console Logo when displayed on the emulator list). I'm currently struggling to find a solution to the problem... if you have Theme knowledge and are reading this, check out my Alpha Themes thread, and please reply if you can.

Cheers!

EDIT: Oh, and if anyone knows the filename on the Steam server for the smaller images used in the Steam Library's "List View", I'd be interested to know. I launched Steam using the -console command line option, and then disconnected from the internet and tried to refresh the List View hoping to have it report back an error about being unable to get the file, but it kept pulling them from some cached location. I didn't try too hard to find the location of this cache, but whatever.

Link to comment
Share on other sites

You may try saving the image as a layer within another image to form a frame or border. 4:3 aspect ratio can be found in 640x480 resolution for example. Here is one I put together of Crysis 2 using a 640x480 background (with a little mask and dissolve gradient thrown in and the Crysis 2 image given a slight bevel). I also upscaled the image to 500x234.

Try this image and see if you get any of the distortion you noted or if it handled the image OK.

post-5872-0-16544700-1302041345_thumb.pn

Link to comment
Share on other sites

Yeah, this definitely looks good. I figured I could resize the images to the correct aspect ratio by cropping or adding a border, I was just hoping to get them to display correctly without modification (and learn a bit about theme design in the process).

I like how you have the background transparent if alpha is enabled or the gradient if it isn't. I'll probably do something like this for now in a v3 theme. It seems the spec and implementation of v4 themes still have a way to go, eh?

Link to comment
Share on other sites

I prefer working with the V4 themes as there is a little more flexibility (for me at least) and thanks to the latest changes to them can disable color-key and use true alpha channel graphics.

Link to comment
Share on other sites

Is there any way to make the menu items in a v4 theme animate in scale like they do in a v3 theme? Like on the main menu, selecting an item not only makes the animated selector graphic appear on that item, but the item also grows in size. This doesn't happen in the v4 themes I've made, and although a small thing I really like it.

I also wonder why only the start menu does this? I'd really love it if all the lists did this.

Also v4 themes don't seem to have the radio/music scroller text at the bottom left and the audio visualization placement is wonky... can that be remedied?

I agree the v4 theme spec is much more versatile... the image sizes etc make more sense as well.

Link to comment
Share on other sites

Are you referring to an item in list view or snap/vid snap view? I have only witnessed the item "growing" in snap or vid snap view. In the last them I put together (Sins of a Solar Empire) I did not use the default selector editor. Instead, I created one selector.png file and, using GIMP as my image editor, saved it repeatedly for each selector bar graphic. Before saving from one to the next, I decreased the opacity by 20% until I got to a 40% level, then increased subsequent opacity level increases back up to 100%, then repeated down again until all 15 selector images were created. This creates a neat pulsing effect as the selector dims and brightens against the background.

I usually see the item that is Now Playing at the top and just left of center on my themes. I am hoping that this can eventually be a toggled on/off option that will also allow for placing within the theme in a location of choice the same as the rss scroller options.

Link to comment
Share on other sites

I attached some pictures to help show what I mean:

post-8537-0-29350900-1302124023_thumb.pn

In growth.png, you see on the start list the selected Emulated Games item is actually larger than the rest of the list items.

post-8537-0-48445100-1302124051_thumb.pn

In nogrowth.png, you see on the emulator list the selected Sega 32x item isn't any larger than the rest of the list items.

This is a v3 theme, and only the start list scales the selected item like this. In a v4 theme no item is ever scaled, even on the start list. Any ideas? Maybe a theme setting I'm missing in v4? I'd definitely love to see this effect applied to all lists regardless of theme version.

Oh, and having the alpha channel involved in the selector bar animation sounds like a glorious idea. I'm definitely going to play around with that.

Link to comment
Share on other sites

  • 5 months later...

I know that there are probably more titles (not including mods, patches, etc.) from Steam, but I was able to obtain a list of 800 games to present. I also created an .mdb for those with a collection of Steam games so they can add the .url name in the GoodName field (without the extension), update the number of players, and add in the Description field their own game descriptions. This will pull in whatever snaps, boxes, etc. you may have following the naming conventions outlined in Couslev's document and display the pertinent game history and text for the game.

Before anyone says/asks "Game XYZ was released before 12/34/56. Why do you show date 65/43/21?" the dates in the .mdb are the Steam release dates - not the original game release dates! If you want to correct for that, be my guest, however, I think the release date for this category of games by Steam is sufficient.

Other than the Name, Date, Developer and Publisher, all else is empty. If I have time to update all 800, then I will do so. If anyone else wants to pick up where I left off, that is fine. For the sake of consistency, I would stick with the .url name as noted previously if you are using Couslev's excellent guide for the GoodName, and I would probably recommend obtaining descriptions from a reliable source, such as Moby Games.

In the zip file I have also included an Excel Spreadsheet with the Title, Release date, Developer and Publisher info.

EDIT: I am in the process of updating the db to contain the correct release dates and descriptions from Moby Games. If anyone would like to provide me with the url names they have for their Steam games I will be glad to add to the db as well. Thanks!

PC Steam.zip

  • Like 1
Link to comment
Share on other sites

Wow Draco this is awesome! Just yesterday I finally broke down and got a Steam account. (I couldn't resist a free copy of Portal - which is available until September 20 in case anyone wasn't aware). Naturally my first thought (after thinking, "Sweet! I just got Portal for free"), was, "I need to go back and re-read all those GameEx-Steam integration threads." This database addition couldn't be more timely! Thanks again! I'll be keeping a close eye out for any updates.

Link to comment
Share on other sites

Obtaining the .urls as noted in the tutorial will be the crucial part. Since I don't have all 800+ games through Steam, I will have to rely on users such as yourself to provide updates so I can add to the db. I have corrected dates and game details for about 70 out of the 800 thus far.

As for Portal - I wangimmesummadat! B)

Others interested can obtain a copy from here.

Link to comment
Share on other sites

Well the database itself is still more of a shell so don't get too excited! It is a start. I am in the process of adding descriptions (from Moby Games) and correcting release dates, etc. Also, if nobody objects, I am going to use my judgement as to what the "ROM" name should be for the shortcuts and image files to be referenced. With over 800 titles it will take some time but I think that everyone will benefit from it that uses Steam.

EDIT: In retrospect, instead of trying to come up with a different ROM naming convention as Cousalev was using I have decided, since the DB will display the Name of the program, I will stick with the appID that Steam uses in the URL. It will make things decidedly easier on my part, especially if everyone that has Steam games installed can provide me with the Name and URL in the shortcuts the install creates.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...