Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / [WIP] DarkSteamworks - Steam integration for DarkBASIC Pro!

Author
Message
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 21st Jan 2014 04:29 Edited at: 2nd Aug 2014 05:52
v1.2 Released: Thread

This thread is now closed. Please relocate to the thread linked above.


DarkSteamworks is a plugin for DarkBASIC Professional, that allows you to access the Steam API so that if and when you get your game on Steam, you will have access to Steam achievements and statistics.

This plugin is essentially complete, minus documentation and one bugfix.
Thus, I am considering this still a WIP.

Current commands (v1.1):
[return type] COMMAND [parameter, ...]

boolean STEAM INIT ()
STEAM RESET
boolean STEAM IS RUNNING ()
boolean STEAM UNLOCK ACHIEVEMENT (AchievementID$ as String)
boolean STEAM LOCK ACHIEVEMENT (AchievementID$ as String)
integer STEAM GET APP ID ()
boolean STEAM IS ACHIEVED (AchievementID$ as String)
boolean STEAM RESTART APP IF NECESSARY (AppID as Integer)
integer STEAM ACHIEVEMENT COUNT ()
string STEAM GET ACHIEVEMENT (AchievementID as Integer)
boolean STEAM STATS AVAILABLE ()
boolean STEAM SET STAT INT (StatID$ as String, Value as Integer)
boolean STEAM SET STAT FLOAT (StatID$ as String, Value# as Float)
integer STEAM GET STAT INT (StatID$ as String)
float STEAM GET STAT FLOAT (StatID$ as String)
boolean STEAM REQUEST STATS ()
boolean STEAM RESET ALL STATS (IncludingAchievements as Boolean)
STEAM RUN CALLBACKS
boolean STEAM DLC OWNED (DLCAppID as Integer)
boolean STEAM DLC INSTALLED (DLCAppID as Integer)
STEAM ACTIVATE GAME OVERLAY Dialog$ as String
STEAM ACTIVATE GAME OVERLAY TO WEB PAGE WebPage$ as String
STEAM SET OVERLAY NOTIFICATION POSITION NotificationPosition as Integer
boolean STEAM IS OVERLAY ENABLED ()

Attached is the current version of the plugin (v1.1 hotfix, 11 Feb 2014). It includes an example project which should help you understand how things work while I get documentation ready.

Download

You can view the source code for the example below:


Special Thanks:
Mnemonic - For the Wintermute Engine Steam plugin, it was used as a reference and base for this plugin
Paril - HUGE amount of help with C++, without Paril's help, this plugin probably wouldn't exist
ShellfishGames
11
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 21st Jan 2014 11:18
Sounds good! Would be great to see a DBPro game with proper Steam support.

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 21st Jan 2014 15:36
Well, the only thing that prevented me from taking one of my "hobby" games and going commercial was the difficulty in integrating into steam. Now I might not have that obstacle....

Is your plan to sell this plugin once finished, or will it remain free? Also, does it only interface with achievements and stats, or is there anything else that it could do and just doesn't yet? (maybe that is all you can interface with, not sure)

You have made me excited to start coding games again. This *might* just pull me away from Skyrim for a bit.

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 22nd Jan 2014 01:22 Edited at: 22nd Jan 2014 01:23
ShellfishGames wrote: "Sounds good! Would be great to see a DBPro game with proper Steam support. "

Yeah, that'd be awesome!

GIDustin wrote: "Is your plan to sell this plugin once finished, or will it remain free?"

I am planning to sell it through TGC under a "free unless used commercially" license if possible, but if that gets declined, it'll be free for all.

GIDustin wrote: "Also, does it only interface with achievements and stats, or is there anything else that it could do and just doesn't yet? (maybe that is all you can interface with, not sure)"

It can do achievements and stats, and also supports using Steam's DRM with the "steam restart app if necessary" command.

I can pretty much implement anything supported by Steam's API, so if there's something you want, ask me and I'll put it in.

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 22nd Jan 2014 02:44
Plugin updated to v1.1, now has commands for DLC and a few Steam overlay-related commands.

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Jan 2014 05:06
Quote: "I can pretty much implement anything supported by Steam's API, so if there's something you want, ask me and I'll put it in."


I would be interested in friends list querying, and steam cloud. I would like to make a game where the player's "avatar" is their steam avatar, and the AI uses avatars of their friends. Additionally, a way to implement the steam cloud would be nice, although realistically, I think I could get away with using stats....

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 22nd Jan 2014 08:10
I'll take a look at implementing the cloud, as at a glance it seems as simple as adding some commands for uploading and downloading files.

Querying the friends list I'm not so sure about. I'll take a look at it.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 22nd Jan 2014 17:44
This is pretty awesome. My current project, I've been using DBP for prototyping with the idea of porting to AGK2 once there is a good stable release. This might change my mind.

Did you also talk to Rick about implementing this into FPSC:R? I know you're putting together a Classic mod which I deff will grab.

I'd easily pay for a license fee.

One thing before downloading what you got, is there a Steam development platform or 'mode' with the steam app for developers? Or do you have to have something setup with Steam? I've never looked into publishing on Steam or Greenlight. Just wondering how we can test these commands out.

Thanks!

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Jan 2014 17:54
To put an app on Steam Greenlight, you pay a one-time $100 developer fee (to keep out the kiddies), and then you can start posting projects to steam.

http://steamcommunity.com/workshop/about/?appid=765§ion=help

I just paid my fee 30 minutes ago. Looking forward to this plugin when finished.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 22nd Jan 2014 17:57
Ah, so once you pay the developer fee you can implement the commands and test? That's awesome. The fee isn't bad either. Think I'll get mine this week.

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 22nd Jan 2014 18:44
oh my, this does look nice. good work man!

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Jan 2014 23:09
Correct me if I'm wrong here zombie killer.

I would think you can test some commands just be having the Steam client running? Such as getting the users steam ID etc.

Also, you would not need this plugin until after you got the go ahead from greenlight?

Good luck with this though, it may inspire more people to finish projects and get them on greenlight knowing this solution is available should they require it.

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 23rd Jan 2014 01:09
Matty H is correct. You can test the commands simply by having Steam running.

You do not need to have a game on Steam to test out the commands (except DLC and Cloud commands).

Quote: "Did you also talk to Rick about implementing this into FPSC:R? I know you're putting together a Classic mod which I deff will grab."

I offered on Lee's Reloaded blog, and he told me to email Rick. I've sent him the source to a currently outdated version, but if they end up using it, I'll gladly give them the latest source.

Quote: "Also, you would not need this plugin until after you got the go ahead from greenlight?"

Yeah, you wouldn't really NEED it, but it would be useful to test out the commands to get a flow for how things work if you are going to put your game on Steam.


Just to clear things up since there is no documentation yet:

* "Steam Run Callbacks" MUST be called every frame.
* You can use Steam app id 480 to test out achievements and stats, see the example project for more info on this

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 3rd Feb 2014 18:13
I used STEAM IS OVERLAY ENABLED() while running as Spacewar and it isn't enabled. Is that a game-specific thing? I was just trying to test it out and see how it works with DBP. And since Spacewar isn't a game I own, I can't view the properties for it to see if I can enable it. Is 480 the only ID we can use to test games? I tried using the AppID for Civ 5 and it stalled the program.

I got my only real working game up on greenlight (Not published yet), but then I got to thinking about how basic of a game it is and whether or not I should even try it.... First impressions and all...

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 6th Feb 2014 07:22
While adding Steam to FPS Creator, I noticed that the overlay only seems to become active when the game is run from Steam (running as a non-steam game works too).

If there is some way to "request" for Steam to inject the overlay, then I'll definitely add it as a function.

As far as I know, 480 is the only number you can use to test.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 6th Feb 2014 17:27 Edited at: 6th Feb 2014 17:28
Wow, very nice! Not thinking that far ahead, but who knows if the future brings me to steam.

Regards Sph!nx
www.mental-image.net
Southside Games
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 7th Feb 2014 06:25
wow dude! this is awesome!
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Feb 2014 13:40
I just had Lee point me to this. I could - quite literally - kiss you on the mouth right now.

Seriously. For reals.

Pucker up.


CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Feb 2014 13:42



CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Feb 2014 14:09
Oooh. I just tried using STEAM DLC OWNED and it returned this error:



Any ideas?


The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 10th Feb 2014 14:15
@CumQuaT
*brofist*

I'm assuming the error is because I've either made a typo in the function name, or renamed it and forgot to reflect the change in the string table. I'll make a fix tomorrow, since it's almost midnight here in Australia and I gotta get some rest.

I should hopefully get the Steam Cloud functions in soon, too.

CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Feb 2014 14:34
A fellow Australian? *double brofist*

I live in Brisbane. I'm still awake because I've been working on Malevolence for 4 years now and just.... just don't sleep... anymore....


The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 11th Feb 2014 09:10
Hotfix 1 uploaded, fixes the issue pointed out by CumQuaT.

CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 11th Feb 2014 11:38
I am proud to count you among my Aussie brethren.


The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 25th Jul 2015 21:27 Edited at: 25th Jul 2015 23:07
WHAT EVER HAPPENED TO THIS?!
it seems like a very good thing, and yet now it's not available?

all the links are broken.

does anyone have a download of this, please?

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 26th Jul 2015 09:06
Ah, so this explains that email I received before claiming the links were dead, people are still using this thread.

This was the work in progress thread, the current one is here.

Although DarkSteamworks has been discontinued, because it has been rewritten from the ground up, as a general-purpose Steam plugin. It currently supports Love2D and DBP.

Source
DBP Build
Love2D Build

It currently lacks documentation though, but by looking through the included example, you should be able to work out the gist of it.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 12th Sep 2015 02:06 Edited at: 12th Sep 2015 02:06
Hi! Nice stuff. Steam is great way to distribute your game.
But I have some questions ( in fact its not about plugin itself )
1) Is it possible to send your game to Steam Greenlight or sell on Steam if it is make in Dbpro? ( and not Unity or C++)
2) How Steam security system and installation system works with your exe? Do you have to connect some Dll to your project or something?

wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 13th Sep 2015 01:02
Quote: "Is it possible to send your game to Steam Greenlight or sell on Steam if it is make in Dbpro? ( and not Unity or C++)"

What are you on about? There have been dbp games on steam for years.

Login to post a reply

Server time is: 2024-03-29 06:39:12
Your offset time is: 2024-03-29 06:39:12