Steamworks4j - just starting out on steam and have a few questions

Current status - I’ve written the games I want to sell but now need to integrate them into the steam environment. I’ve set up my company on steam, paid the money and am now waiting to be verified etc. I don’t have an AppId as yet.

Q1) I’m looking at using steamworks4j. Is this my best choice? I only need to find out whether the player has paid for the game or just testing it, store a status string for the user, store scores on the leaderboard and perhaps have achievements but this could come later. I’m really after the simplest interface available (I’m a bit stupid when it comes to other folks interfaces). Are there any easy to read examples available on the web?

Q2) is there anything I can do while I’m waiting? can I set up a store in advance? can I integrate with an existing test game and test the calls (I’ve heard Space Wars might allow this).

Q3) what are the calls? (did I mention I was a bit stupid)

Q4) is there a developer forum on Steam? I’ve searched but couldn’t find anything though this might be because I don’t have my AppId etc yet.

Q5) is there anything to watch out for when releasing java games via steam?

Q6) I have 4 games at present and wondered if there was a way to get the leaderboard info from each game to have an overall leader. I know I’m getting way ahead of myself but is this possible via steam?

Apologies for the totally random questions and thanks for reading.

Mike

A1) I’m biased obviously, but one primary goal of steamworks4j is to stay as close as possible to the C++ API. So maybe it’s not the easiest to use solution on the planet, but should allow you to follow any documentation you can find about the C++ SDK, or even Steamworks.NET (which uses a similar approach for C#).

A2) I wasn’t aware until now, but apparently you can use the SpaceWar AppID (480) to start testing w/o being a registered developer first.

A3) To get started, the documentation is publicly available now: https://partner.steamgames.com/doc/home

A4) Yes, there’s a developer forum you’ll get access to when accepted. Tons of questions, and sometimes even a useful answer. :wink:

A5) Only the usual PC/Java/AV-software shenanigans if you ship with a bundled JRE (and optionally a launcher like packr). Nothing specific to Steam.

A6) I don’t think so. This may need a separate service to collect the data (via their Web API, for example), and publish it to some self-hosted web page.

Thanks for getting back to me. I’ll admit the more I read, the more confused I get :slight_smile: Hey ho.

With help I got everything to compile together but I’m getting an error when calling restartAppIfNecessary.

I pulled your latest jar file and placed it in the same directory as the rest of my code and then ran the following:

E:\Dropbox\Projects\CloudMiner>javac -cp ".;tinysound-1.1.1.jar;steamworks4j-1.7.0.jar" CloudMiner.java

E:\Dropbox\Projects\CloudMiner>jar -cfm CloudMiner.jar Manifest.txt *.class *.png *.wav

E:\Dropbox\Projects\CloudMiner>java -cp ".;CloudMiner.jar;tinysound-1.1.1.jar;steamworks4j-1.7.0.jar" -Dsun.java2d.noddraw=true CloudMiner
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.codedisaster.steamworks.SteamAPI.restartAppIfNecessary(I)Z
        at com.codedisaster.steamworks.SteamAPI.restartAppIfNecessary(Native Method)
        at CloudMiner.init(CloudMiner.java:1470)
        at CloudMiner.main(CloudMiner.java:1291)


Looking on the web this appears to be because it can’t find the native libraries called by steamworks so I’ve obviously done something wrong.
Any clues?

Mike

Congratulations, you found a weak point! ;D

You need to call SteamAPI.init() first. The problem is that this function does two things: loading the native libraries, and calling native SteamAPI::init(). Now it is legal to call restartAppIfNecessary() before init(), but the Java wrapper doesn’t allow this … yet. It’s fixed already in 1.7.1-SNAPSHOT.

edit: in case you try to use the snapshot build, the correct order will be (omitting error checks):

SteamAPI.loadLibraries();
SteamAPI.restartAppIfNecessary();
SteamAPI.init();

That was an easy fix!

It now starts my game and connects to steam fine. As a small bonus it also starts the game SpaceWar up as well but I guess that’s what happens when you pass the 480 AppId across.

My plan of action is:

  • wait to be approved by steam (should be within the week)
  • get an appId for the game
  • set up the store page, description, videos and have a beta of the game available
  • find out how to see if user has bought the game or is just trying it out
  • save and receive a string to steam cloud to keep game status etc
  • save score via steam leaderboard
  • I’ll have a shot at achievements later

This is all quite exciting!
Thanks again for your help.