2
\$\begingroup\$

Is it possible to set or 'unlock' a Steam achievement via LibGDX or with a native Java solution?

If so, how it this possible. Furthermore, what would be a good implementation for 'saving' achieved achievements when you were offline. For example, when I enable the airsafe mode on my laptop and then run the game, be really good at it and unlock an achievement, how can it be saved the next time I have WiFi?

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

Since Steamworks is a C++ API, you'd need to write a wrapper. You can use the Java Native Interface (JNI) for this, or possible the Java Native Access API instead. The JNI is the "classical" method, the JNA thing seems to be newer and I know less about it.

The Steamworks SDK is not public, so I can't link you directly to the interface you'd want to wrap, but all the ones you'd want to wrap are probably located in ISteamUserStats.h.

Fortunately, Steamworks is so popular that there are already wrappers other people have written for you, such as steamworks4j.

Steamworks services support an offline mode themselves, so you should not need to do anything specific yourself to deal with tracking and recording achievements when the user is offline.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .