Welcome, Guest! Login | Register
How to add steam api in your game
Info
Report
67 Posts

If I want to launch the game on steam then how can I add steam support in my game.
Created on: 1 year ago
Info
Report
232 Posts

You'll have to write the Steam API bindings yourself...
Created on: 1 year ago
Info
Report
144 Posts

steam API is not required to 'launch a game' at all [unless you want steam MP servers/leader boards etc] if it was you'd need a wrapper written specifically for rad to interpret it.

it's as simple as pointing steam to rad's compiled exe from SteamPipeGUI, or SteamCMD batch scripts can be written for automation/advanced processes. you'll also want to tick boxes for required dependencies from your game's steam dev account unless you want users to install them manually for the game to even work.
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
232 Posts

Hi @Jaysonbourn , I might start working on a plugin if you really want to, but this could take me few weeks...
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
144 Posts

wow, that would be cool for the <5 active rad devs on earth. i think steam MP servers/leader board support is the least of problems for such people, but don't let that stop you...steam API for rad!

a more needed plugin is for ram leaks [unless you want to use my arcane CMD solution], as it seems dx9 calls can free said ram [textures/models -not sounds, etc] so it could be done without de/recompiling rad, as d3d9.dll replacements are commonly used by reshade, etc. that said, i think such a solution could be very bug prone, and prevent the use of reshade, etc, and only partly free ram when CMD frees all of it..
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
145 Posts

For C# there is a wrapper already made, that does work as I've used it myself before just to play around and test. Hence the "Space Game" on my Steam account forever... ffs.

Link: https://github.com/rlabrecque/Steamworks.NET
Might help, might not, but it might be a start for you.
Created on: 1 year ago
Info
Report
232 Posts

Patching 3D Rad's memory leaks isn't possible with a plugin. You'll instead need to patch 3D Rad on-the-fly to fix this issue.
Created on: 1 year ago
Info
Report
144 Posts

well, i just know rad ram alloc/free is done with msvcr80.dll or kernel32.dll, may or may not be linked to d3d9.dll imports, but seems rad dev forgot to free ram somewhere there. i have no idea but assume is possible to intercept/log calls to alloc ram on level open, then free it on level exit call, but if not by d3d9 it may not be feasible, since i have not seen any msvcr wrappers, and k32 is a WinOS file.

but even if this worked, it would only be a buggier, pointless convenience over using my more thorough DOS taskkill method...
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
232 Posts

Quote from: thelurker

well, i just know rad ram alloc/free is done with msvcr80.dll or kernel32.dll

Yes, malloc, calloc, and operator new are in msvcr (if 3D Rad is compiled using MSVC) and GloballAlloc, HeapAlloc syscalls are in k32.

Quote from: thelurker


but if not by d3d9 it may not be feasible


No, DirectX9 itself is not responsable for allocating memory. DirectX itself is a interface that must be implemented by a graphics driver. The graphics driver is responsible with allocating VRAM memory and with reading CPU memory.

Quote from: thelurker

i have no idea but assume is possible to intercept/log calls to alloc ram on level open, then free it on level exit call

The operating system is responsible for freeing resources when a program is closed. Ideally you would deallocate resources when unloading a project.
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
67 Posts

I am still in dark. Don't know how to use steam api
Created on: 1 year ago
Info
Report
144 Posts

like i said you don't even need the optional API for steam games, nor will it even work unless Nic makes a plugin for it which he offered to do for you, but only SteamPipe is REQUIRED.

so just use SteamPipeGUI, there's a guide on steamworks help page for it.
Created on: 1 year ago
Edited on: 1 year ago
Info
Report
67 Posts

It would be great if nic can create it.
Created on: 1 year ago
Info
Report
232 Posts

Okay, I will take a look into it.
Created on: 1 year ago
Info
Report
144 Posts

what do you actually plan to user the api for jayburn?
Created on: 1 year ago
Info
Report
67 Posts

@thelurker
i want to give achievement when player plays game
Created on: 1 year ago
Info
Report
144 Posts

it would help if you actually said that in 1st post, 'steam support' is too vague, if you want a certain function it will need to be coded specifically since there are many steam functions, so yeh now wait if nic makes plugin for that, unless he plans to support ALL functions by default...
Created on: 11 months ago
Edited on: 11 months ago
Reply
Preview
Post
Or use the advanced reply form here...