C++ Wrapper?

Blitz3D Forums/Blitz3D Programming/C++ Wrapper?

EpicElrod(Posted 2015) [#1]
My Indie game is going to be put on Steam GreenLight and I am going to use their SteamWorks feature. I need a C++ wrapper, one that can use raw C++ in the B3D compiler maybe...


Gabriel(Posted 2015) [#2]
My Indie game is going to be put on Steam GreenLight and I am going to use their SteamWorks feature.

If you had the wrapper right now this minute, you still wouldn't be able to use it until your game is approved for Steam. Without an application ID, Steamworks will not function.

I need a C++ wrapper, one that can use raw C++ in the B3D compiler maybe...

That really doesn't make any sense. If you could use raw c++ in the B3D compiler, you wouldn't need a wrapper. You seem to be getting way ahead of yourself here. You have plenty of time. Focus on your game and getting it through Greenlight. Steamworks is nothing. You'll implement the whole thing in a few hours. I know it's tantalizingly out of reach and it feels like something you'd rather have done early, but it's far easier than you expect it to be. When you've done the game, you'll have the skills you need and Steamworks will be a breeze.


_PJ_(Posted 2015) [#3]
As mentioned, if C++ could be used directly in B3D, then it could work directly with the Steamworks API.

However, sine it doesn't, I had assumed all that was required was a declarations file for the relevant functions within the steam.dll or CallDll()

I would be interested if anyone has actually done so as yet.


Gabriel(Posted 2015) [#4]
Simon Armstrong maintains a wrapper which works for BlitzMax, but I'm not sure how much work would be required to make it work for B3D.

The reason that it's not as simple as a DECLS file is Steam uses callbacks. B3D doesn't really support function pointers, although I gather there are some hacky workarounds which may or may not (depending on who you listen to) work nicely. So I think at the very least, you would need a DLL to handle the callbacks for you. As I say, it's not something you can test in any way until you have a Steam App ID.


ThePaiva(Posted 2015) [#5]
Someone posted a Steamworks DLL and DECLS for Blitz3d, somewhere... Haven't tried it yet, so if it works for you, please share your experience with the community.

Link: http://www.mediafire.com/download/wo4r7ib17hjx0q5/BlitzSteam-master.zip

Edit: oops, just checked it and there's no DLL cause you got to add your steamid in the C code.
Btw, I found it here: http://www.blitzbasic.com/Community/posts.php?topic=104556