tag:blogger.com,1999:blog-53911684477248773632024-03-13T07:59:00.815-07:00PolInc GamesPolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5391168447724877363.post-34350341995314893662018-12-11T01:18:00.000-08:002018-12-14T01:41:32.504-08:00Steam achievements in Java(libgdx). Step by step for dummies. <br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Steam achievements in Java(libgdx). Step by
step for dummies. <o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">In this
tutorial I will present in a rather comprehensive way the implementation of
Steam's achievements in Java. I used the libgdx framework, but the tutorial
should apply regardless of the technology used, if it is java.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The
tutorial was tested only for a desktop game (Windows). I must also mention
that I tested adding achievements on a game that had been already released, but the same
procedure should also apply to a game in a beta <span lang="EN-US" style="font-size: 12pt;">state</span>. In addition, I used
Eclipse and the standard structure of projects for libgdx, i.e. 3 projects
for desktop, core and android (which contains the assets folder).<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">1. Steam achievements<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Achievements
are a Steam's service that allows you to extend the functionality of our game. It's
something to strive to "achieve". Instead of doing the main campaign
you can also attempt to get the achievements which add to your game completion
on your steam profile. This is a simple way to increase the value and vitality
of our game.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">2. Before we start - links<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Before we
start </span><span style="font-size: 12pt;">the </span>implementation of achievements, please read the official documentation
about the achievements provided by Valve. It is available here:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements">https://partner.steamgames.com/doc/features/achievements</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">and here<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://partner.steamgames.com/doc/features/achievements/ach_guide">https://partner.steamgames.com/doc/features/achievements/ach_guide</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">However, it
should be emphasized that the above documentation is quite useless, especially
from the point of view of Java. Even the Step by Step guide does not explain
exactly what steps to take.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">3. What we need -
libs<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">We will
need two types of libraries to take advantage of the achievements. First it’s
the <span lang="EN-US" style="font-size: 12pt;">core </span>library that connects to Steam service. It is available here:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://github.com/rlabrecque/Steamworks.NET/releases">https://github.com/rlabrecque/Steamworks.NET/releases</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">We need to
download the Standalone version. Direct link is here:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://github.com/rlabrecque/Steamworks.NET/releases/download/11.0.0/Steamworks.NET-Standalone_11.0.0.zip">https://github.com/rlabrecque/Steamworks.NET/releases/download/11.0.0/Steamworks.NET-Standalone_11.0.0.zip</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">At the time
of reading the version may be higher.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">In the
archive you will find 3 folders:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Linux OSX-64<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Windows64<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Windows32<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">We are only
interested in folders for WIN. Inside each folder you will find three files:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">for Win32<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Steamworks.Net.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">for Win64<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Steamworks.Net.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">From these
two folders we will need 3 files: steam_api.dll, steam_api64.dll and
steam_appid.txt.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Let's
create a 'steam' folder (the name actually does not matter) wherever we want
(later we copy it to the assets folder) and copy these files there. The txt
file is a simple text file containing the id of our application.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The second
library is of course a library for Java. It is available here:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://github.com/code-disaster/steamworks4j">https://github.com/code-disaster/steamworks4j</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">On the
page, click on the ‘Clone or Download’ button and then ‘Download ZIP’. Among all
folders, we will only be interested in "java-wrapper". More
specifically, we are interested in libraries from the 'java-wrapper \ src \
main \ resources' folder:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.dylib<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.so<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">As I mentioned
earlier, this is a tutorial for Windows, so we will only need the last two
files. If our goal is OSX or Linux, I suspect that you should also copy the .so
and .dylib files. As for Windows, we will need both </span>steam_api files regardless of the version of our game. The files will be copied to the previously
mentioned 'steam' folder.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">At this
stage, we should have the 'steam' folder with the following content (files for
OSX and Linux </span><span style="font-size: 12pt;">are</span> optional).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.dylib<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.so<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The second
thing we need from steamworks4j is the source code that will allow us to
connect to libraries and the Steam service. It is here "java-wrapper \ src
\ main \ java". We need to copy the whole 'com' folder to our source folder,
ie 'src'. In my case, the 'src' folder is in the libgdx 'core' project.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Of course,
we also need the Steam Client installed on the computer and our own game in the
library. It will be available without buying if you log in from the developer
account. It does not have to be released. It is also not required for the game to
be uploaded on Steam for testing.<o:p></o:p></span><br />
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span>
<div class="MsoNormal">
<b><span lang="EN-US">UPDATE</span></b><span lang="EN-US"> !!!<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US">It turns
out that all libraries are available via Maven from this link.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US"><a href="https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j">https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US">We need to
download one jar file. At the time of writing, the latest version is 1.8.0.
Direct link here:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US"><a href="http://central.maven.org/maven2/com/code-disaster/steamworks4j/steamworks4j/1.8.0/steamworks4j-1.8.0.jar">http://central.maven.org/maven2/com/code-disaster/steamworks4j/steamworks4j/1.8.0/steamworks4j-1.8.0.jar</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US">To get the
dlls just open the jar file (you can simply change the extension to .zip and use
WinRar or 7zip).<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<span lang="EN-US" style="mso-ansi-language: EN-US;">
</span><br />
<div class="MsoNormal">
<span lang="EN-US">The jar
file contains the steamworks4j classes and all necessary dll libraries.
However, this jar can not be used to get rid of the 'steam' directory with
libraries. You can only replace the source code in the 'src' directory by copying the jar file to the 'libs' directory
of the android project. In Eclipse, you should also point out this jar file - Eclipse
-> Right click Core Project -> Properties -> Java Build Path -> Add
external jars.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">4. Placement of the libraries<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The 'steam'
folder you created earlier should be placed directly in the assets folder. If
you use a configuration like me, this folder is in the Android project. So the
assets folder should look like this:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">-<b style="mso-bidi-font-weight: normal;">assets</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--models<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--images<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--icons<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">...<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">5. App id <span style="mso-spacerun: yes;"> </span>and steam_appid.txt <o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The text
file which we have placed in the 'steam' folder contains the number 480, which
is supposed to be the id of Steam’s test application. We need to change this
number to the id <span style="mso-spacerun: yes;"> </span>of our application.
This number can be found by logging in to Steamworks
(https://partner.steamgames.com) where in the list of applications we have an
item such as Game (123456). This number is also available in the link to the
game’s page on Steam, e.g. https://store.steampowered.com/app/123456. Therefore,
we put only this number in the file.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">We also
need to change the location of this file. It can not be in the 'steam' folder.
We have to move it up to the assets folder directly. So the assets folder
should look like this: <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">-<b style="mso-bidi-font-weight: normal;">assets</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--models<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--images<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--icons<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam_appid.txt<o:p></o:p></b></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">...<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">I should
make one note here. According to the documentation, the steam_appid.txt file is
for testing only and should be removed in the production version. Of course,
there is no need to delete it, because it does not contain any secret
information. However, I noticed that without this file you can not run
achievements even in the production version (more about this below). I do not
know if it is always or only in the version of the game using steamworks4j.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">6. Creating achievements<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">At this
point, we should have all the files needed to implement the achievements. Achievements
in Steam are defined by a graphic element (icons) and a text element (name and
description). Each achievement requires two icons (achieved and unachieved) in
jpg format at 64x64 resolution. It is recommended that the unachieved icon was
gray and achieved in color.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">In
addition, for each achievement, we need to come up with its name and a brief
description of how to get a certain achievement. Both elements will be visible
to the player from the level of the Steam Client. Also, you should come up with
a unique identifier for each achievement, through which we will identify the
achievement from the code level. The identifier is a String variable. It is
suggested to use capital letters and snake_case eg ACHIEV_BATTLE_1, ACHIEV_BATTLE_2
etc.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">We have
been doing things offline so far. To define achievements, we must log in to our
Steam partner account (https://partner.steamgames.com). Then choose our
application. In the main window we're looking for a link to define achievements.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV-iYybUU-1ZwM3ONdL7bXiXHGx-bCDVIRXMQvPThcFDb3Ip0yShvzMzPgC9o8sH92xaLp-jU4l_tLe-9dAWG0-MZfFcxqcqTtYJRi91qStTaJUFqL-6gQZKT5aSi5K5vjfXUXZ4_6rR8/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="970" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV-iYybUU-1ZwM3ONdL7bXiXHGx-bCDVIRXMQvPThcFDb3Ip0yShvzMzPgC9o8sH92xaLp-jU4l_tLe-9dAWG0-MZfFcxqcqTtYJRi91qStTaJUFqL-6gQZKT5aSi5K5vjfXUXZ4_6rR8/s320/1.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGq164psQYn8XX4RGRdnhYAG71p_zdV59017A2opoYS4mrRrCliWHbY6wjHFobThpeFBifeeW62_0Wzo9ZOzSfAMbwTJX_PR5fBl9OYQAulaf3sM5z0dCmF7pqPbBWqdJUQC9dzZConsY/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="696" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGq164psQYn8XX4RGRdnhYAG71p_zdV59017A2opoYS4mrRrCliWHbY6wjHFobThpeFBifeeW62_0Wzo9ZOzSfAMbwTJX_PR5fBl9OYQAulaf3sM5z0dCmF7pqPbBWqdJUQC9dzZConsY/s320/2.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Now, for
each achievement, click the blue 'New Achievement' button, fill in the form and
press Save.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkHRx4MsKQKEZp23b1nDhxhSuaCO7i05My9oyszlceXMxzLF3b1OGAdg1-ot6WbqmQdcE0PFGfIfQW91R1x5sYJGZS8FazTU8YMJ0URLrPjYv5MVO4FIPLUKsx-GbJJxTdGOz9Mg27EdU/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="1285" height="40" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkHRx4MsKQKEZp23b1nDhxhSuaCO7i05My9oyszlceXMxzLF3b1OGAdg1-ot6WbqmQdcE0PFGfIfQW91R1x5sYJGZS8FazTU8YMJ0URLrPjYv5MVO4FIPLUKsx-GbJJxTdGOz9Mg27EdU/s320/3.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><b>Warning</b>!
Unfortunately, there is a bug (or feature) is the Steam platform which appears
when you try to save an achievement. While completing the form, you can not
upload icon files. An error occurs during the attempt. To fix it - first, fill
out the form without icons, Save, then click on the Edit button and point to
the icons and Save.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRL7o28uxwGjfjQxsOxZW-LPgz7X-E8W1QaamoFS_us08v3oFJ5CRiJFSPIQGo8BrIdTMrGNYMNYZpuylEDQVxC_s5V0hdeCfrAzrXQKkjJKBhZ4w4MEu1XIQokAqmZIvDeqzcz4XmnaA/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="97" data-original-width="513" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRL7o28uxwGjfjQxsOxZW-LPgz7X-E8W1QaamoFS_us08v3oFJ5CRiJFSPIQGo8BrIdTMrGNYMNYZpuylEDQVxC_s5V0hdeCfrAzrXQKkjJKBhZ4w4MEu1XIQokAqmZIvDeqzcz4XmnaA/s320/4.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">After
defining all the icons, you <b style="mso-bidi-font-weight: normal;">MUST</b>
publish the changes. Otherwise, the achievements will not be visible to us. To
make the achievements visible in the Steam client you have to log out and log
in again to the Steams Client(not the web platform). If this does not help,
please try uninstalling and reinstalling your game.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">7. Code - preparation<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Having all
libraries and defined achievements, you can proceed to implement achievements
in our game. The use of achievements in the game consists of three stages:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">- loading
libraries and initiation<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">- settings achievement
<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">- closing libraries<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">While the
first stage is necessary, the last one does not seem to be a must. Of course,
you can set an unlimited number of achievements between start and closing.
Initiations and closing are carried out once in the game. I set the initiation in the main menu (right after the Loading page), and closing when leaving the
game also from the main menu.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Warning</span></b><span lang="EN-US" style="mso-ansi-language: EN-US;">! When testing achievements in the game, you <b style="mso-bidi-font-weight: normal;">MUST</b> have the Steam client switched on.
It seems that the game connects to the client and not directly to the Steam
servers.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Testing setting
of the achievement can be done in the IDE without the need to compile and put
the game on the Steam.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">8. Code – the class<o:p></o:p></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Let's start
creating of the code by defining a general class. It will be very simplified
code, especially when it comes to exceptions. The client is defined as a static
class in the main menu.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The class
will be called SteamClient:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">public class SteamClient {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Then we
will add the necessary imports. Of course, they refer to the previously added
source code.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import com.codedisaster.steamworks.SteamAPI;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import
com.codedisaster.steamworks.SteamException;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import com.codedisaster.steamworks.SteamID;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import
com.codedisaster.steamworks.SteamLeaderboardEntriesHandle;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import
com.codedisaster.steamworks.SteamLeaderboardHandle;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import com.codedisaster.steamworks.SteamResult;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import
com.codedisaster.steamworks.SteamUserStats;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import
com.codedisaster.steamworks.SteamUserStatsCallback;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">import com.codedisaster.steamworks.SteamUtils;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Then we
will add 3 variables:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">private SteamUtils
utils;<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">private SteamUserStats userStats;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">public boolean isOnline=false;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Next, we
need to define an ID for each achievement. As mentioned above, it is a String
value. We define them as static variables.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">static public String achievBattle1SteamId=
"ACHIEV_BATTLE_1"; <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">static public String achievBattle2SteamId=
"ACHIEV_BATTLE_2"; <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">static public String achievBattle3SteamId=
"ACHIEV_BATTLE_3"; <o:p></o:p></span></i></div>
<div class="MsoNormal">
...</div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">In
addition, we must define one callback within our SteamClient class. We do not
have to handle the callback methods in any way.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">SteamUserStatsCallback
steamUserStatsCallback=new SteamUserStatsCallback()<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 2;"> </span>public </i><i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">void onUserStatsReceived(long gameId, SteamID steamIDUser,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>SteamResult
result)<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 3;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onUserStatsStored(long gameId, SteamResult result) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onUserStatsUnloaded(SteamID steamIDUser) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onUserAchievementStored(long gameId,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>boolean
isGroupAchievement, String achievementName,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>int
curProgress, int maxProgress) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onLeaderboardFindResult(SteamLeaderboardHandle leaderboard,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>boolean
found) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onLeaderboardScoresDownloaded(<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>SteamLeaderboardHandle
leaderboard,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>SteamLeaderboardEntriesHandle
entries, int numEntries) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onLeaderboardScoreUploaded(boolean success,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>SteamLeaderboardHandle
leaderboard, int score,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 4;"> </span>boolean
scoreChanged, int globalRankNew, int globalRankPrevious) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span>public
void onGlobalStatsReceived(long gameId, SteamResult result) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span></span>}<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>};<o:p></o:p></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">In the next
step, we define three basic methods corresponding to the 3 required stages.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">public boolean initAndConnect(){}; <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">public boolean setAchiev(String achivName) {};<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">public void
disconnect()</i><i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">{};</span><o:p></o:p></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">9. Code - </b><b><span lang="EN-US" style="font-size: 13.5pt;">initiation</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The first
initAndConnect () method must properly <span lang="EN-US" style="font-size: 12pt;">initiate </span>the Steam libraries.
Therefore, it must contain the following code (loading the libraries is carried
out with a parameter indicating the name of the folder where you previously
placed the dll libraries):<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>try {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>SteamAPI.loadLibraries("./steam");<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>catch
(SteamException e1)<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>System.out.println("Load libraries
error");<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span></span>}<span style="mso-tab-count: 1;"> </span> <o:p></o:p></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Initiation of a connection with the Steam client:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span></span>try
{<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-spacerun: yes;"> </span></i><i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">if (!SteamAPI.init())<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span>System.out.println("Initialisation
failed");<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span>isOnline=false;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span>return
false ;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}
catch (SteamException e) <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span></span>{<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>e.printStackTrace();<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Getting the
client achievements statistics. Here we indicate the previously defined
callback:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">//Get stat object<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-spacerun: yes;"> </span></i><i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">userStats = new SteamUserStats(
steamUserStatsCallback);<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>//A must
before setting achievements <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span></span>userStats.requestCurrentStats();<o:p></o:p></i></div>
<div class="MsoNormal">
<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;">
</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Setting the
flag to indicate that the library <span lang="EN-US" style="font-size: 12pt;">initiation </span>has been done correctly.<o:p></o:p></span></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">isOnline=true;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">10. Code - setting an achievement<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">To set an
achievement, simply call the setAchiev (String achivName) method anywhere in
the game with an appropriate achievement name. We have previously defined the
names in the class using static identifiers. In addition, the call of the
method is conditioned by the correct initiation of libraries.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span></div>
<div class="MsoNormal">
Our method:</div>
<div class="MsoNormal">
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> public boolean setAchiev(String achivName)<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
try {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> //set<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> userStats.setAchievement(achivName);<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> //save<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> boolean result=userStats.storeStats();<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> return result;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
catch ( Exception e) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> isOnline=false;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> return false; <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<br />
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> }<o:p></o:p></span></i></div>
</div>
<div class="MsoNormal">
And the call:</div>
<div class="MsoNormal">
<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">//Steam<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>if(SteamClient.isOnline)<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;">
</span>SteamClient.setAchiev(SteamClient.achievBattle1SteamId );<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">And that’s
pretty much all that is necessary for setting achievements.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<div class="MsoNormal">
<b><s><span lang="EN-US">Warning</span></s></b><s><span lang="EN-US">! Even if you correctly set the achievement
during the test, it is possible that it will not appear immediately in the
Steam Client application. I do not know what is causing the delay. It is
possible that the client sends information to the server from time to time. The
best way to check if achievement is set correctly is to log out and log in
again.<o:p></o:p></span></s></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<b><span lang="EN-US">UPDATE</span></b><span lang="EN-US"> !!! The lack of an immediate appearance of the
achievement in Steam Client is the result of not calling storeStats() after
setAchievement (). If this method is called correctly, the achievement will
immediately appear in the Steam Client.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">11. Disconnection<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">To disconnect,
you must call the shutdown method. As mentioned, this is not absolutely
necessary.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">public void
disconnect()<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>SteamAPI.shutdown();<o:p></o:p></i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span></i><i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">12. Deployment<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">When
testing achievements in IDE, everything will work properly. Unfortunately, if
we create a jar file (Runnable Jar) our game will either crash or the
achievements will not be set. The problem is the location of the 'steam' folder
and the steam_appid.txt file. As indicated earlier, the 'steam' folder and txt file
are in the assets folder (and now inside the jar file). Unfortunately, the game
can not see them. Therefore, you need to copy the ‘steam’ folder and
steam_appid.txt file and place it next to the file that starts our game. To clarify
how it should be done, it will show my game file structure. In my game folder,
I only have an exe file and a lib folder containing jre and the jar of my game.
Exe calls only jar file by referring to java.exe. It looks like this:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">-MyGame<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--mygame.exe<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--lib<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">So if you
want to add the 'steam' folder and the steam_appid.txt file, they must be
located directly in the MyGame folder. They should be copied and <b style="mso-bidi-font-weight: normal;">not</b> removed from the assets folder.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
-MyGame</div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--mygame.exe<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--lib<o:p></o:p></span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">--steam<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">--steam_appid.txt<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">With this
configuration, the achievements should work in production.<o:p></o:p></span><br />
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span>
<div class="MsoNormal">
<b><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">UPDATE!!!<o:p></o:p></span></b></div>
<span lang="EN-US" style="mso-ansi-language: EN-US;">
</span><br />
<div class="MsoNormal">
<span lang="EN-US">According
to the author's note (code-disaster): </span><i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">“The
probable cause for this is how you launch your game. On startup, the Steam
client "injects" into the game's process. If your executable just
invokes "java -jar ..." and exits, there's nothing left to identify
your application on Steam.init() - it's a new, pristine process, and needs to
look for steam_appid.txt as a fallback.”.</span></i><span lang="EN-US"><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">13. Errors<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Below I
present the most common errors (both during testing and in production).<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">A. Can not find
libraries.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Exception in thread "LWJGL
Application" com.badlogic.gdx.utils.GdxRuntimeException:
java.lang.UnsatisfiedLinkError: Can not load library: .... \ android \ assets \
steam \ steam_api.dll<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;">During testing this error will occur if we do not place the steam folder
in the assets folder. In production, this error will occur if we do not put the
folder next to the exe file. In addition, an error occurs when the
SteamAPI.loadLibraries ("./ steam") method indicates an invalid folder
name.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">B. Win32 and Win64<o:p></o:p></span></b></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Exception in thread "LWJGL
Application" com.badlogic.gdx.utils.GdxRuntimeException:
java.lang.UnsatisfiedLinkError: ... \ android \ assets \ steam \ steam_api.dll:
Can not load AMD 64-bit .dll on a IA 32-bit platforms<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;">This error will occur when we put the steam_api.dll file only for the
Win32 version or vice versa.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Warning</span></b><span lang="EN-US" style="mso-ansi-language: EN-US;">! In my case testing in Eclipse
required Win32, but in the production the Win64. In both cases I used the same
computer. I do not know what is causing this. Maybe I'm using the old version
of Eclipse.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">C. SteamAPI.init ()
returns false<o:p></o:p></span></b></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;">This error is caused by the Steam Client applications failing to log in
to their account during testing. In addition, it results from the lack of the
steam_appid.txt file both in the assets folder and the main folder next to the
exe file.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">D. Not loaded libraries<o:p></o:p></span></b></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">com.codedisaster.steamworks.SteamException:
Native libraries not loaded.<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Ensure to call
SteamAPI.loadLibraries () first!<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">at
com.codedisaster.steamworks.SteamAPI.init (SteamAPI.java:44)<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Exception in thread "LWJGL
Application" com.badlogic.gdx.utils.GdxRuntimeException:
java.lang.UnsatisfiedLinkError:<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">com.codedisaster.steamworks.SteamAPI.getSteamUserPointer
() at com.badlogic.gdx.backends.lwjgl.LwjglApplication $ 1.run
(LwjglApplication.java:133)<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<i style="mso-bidi-font-style: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Caused by:
java.lang.UnsatisfiedLinkError:
com.codedisaster.steamworks.SteamAPI.getSteamUserPointer ()<o:p></o:p></span></i></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<br /></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;">This error occurs when we try to call the SteamAPI.init () method before
calling the SteamAPI.loadLibraries ("./ steam") method.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;">It seems that the earlier version of the Java API did not require a calling
of SteamAPI.loadLibraries () which could be the source of the problem.<o:p></o:p></span></div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">14. The end<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">I hope that
the tutorial will be helpful. If you want to see my game in which I implemented
achievements according to this tutorial, check this link:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://store.steampowered.com/app/955620/Battle_Arena_Euro_Wars">https://store.steampowered.com/app/955620/Battle_Arena_Euro_Wars</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Follow me
also on Twitter:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://twitter.com/polincgames"><span lang="EN-US" style="mso-ansi-language: EN-US;">https://twitter.com/polincgames</span></a><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">15. Helpful links<o:p></o:p></b></div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements">https://partner.steamgames.com/doc/features/achievements</a></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements/ach_guide">https://partner.steamgames.com/doc/features/achievements/ach_guide</a></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/api">https://partner.steamgames.com/doc/api</a></div>
<div class="MsoNormal">
<a href="https://github.com/code-disaster/steamworks4j">https://github.com/code-disaster/steamworks4j</a><br />
<div class="MsoNormal">
<span style="font-size: 11.0pt;"><a href="https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j">https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j</a><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<a href="https://steamworks.github.io/steammanager/">https://steamworks.github.io/steammanager/</a></div>
<div class="MsoNormal">
<a href="https://steamworks.github.io/installation/">https://steamworks.github.io/installation/</a></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/releases">https://github.com/rlabrecque/Steamworks.NET/releases</a></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/issues/83">https://github.com/rlabrecque/Steamworks.NET/issues/83</a></div>
<br />PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com1tag:blogger.com,1999:blog-5391168447724877363.post-90645340516278796582018-12-10T01:36:00.001-08:002018-12-14T01:32:08.230-08:00Achievementy Steam w Java(libgdx). Przewodnik krok po kroku.<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
W
tym tutorialu przedstawię w dość całościowy sposób implementacji achiementów
Steama dla języka java. Używałem frameworka libgdx, ale tutorial powinien mieć
zastosowania bez względu na użytą technologie o ile to java. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
Tutorial
był testowany tylko dla gry na desktop (Windows). Muszę także wspomnieć, że
testowałem dodawanie achievementów na grze już opublikowanej, ale ta sama
procedura powinna odnosić się także do gry w wersji beta. Ponadto używam
Eclipse i standardowej struktury projektu dla libgdx czyli 3 projekty desktop,
core i android (który zawiera katalog assets).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">1. Steam achievements<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Achievementy to usługa Steama pozwalająca na rozszerzenie funkcjonalności
naszej gry. To coś do czego dążymy w grze. Zamiast przechodzić główną kampanię
można także starać się osiągnąć achievementy, które są widoczne na twoim
profilu Steama. <span style="mso-spacerun: yes;"> </span>To prosty sposób na
zwiększenie wartości i żywotności naszej gry. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">2. Zanim zaczniemy -
linki <o:p></o:p></b></div>
<div class="MsoNormal">
<span style="text-align: justify;">Zanim
zaczniemy implementacje achievementów należy zapoznać się z oficjalną
dokumentacją na temat achievementów zapewnioną przez Valve. Dostępna jest tutaj.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements">https://partner.steamgames.com/doc/features/achievements</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
oraz tutaj</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements/ach_guide">https://partner.steamgames.com/doc/features/achievements/ach_guide</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Należy jednak podkreślić, że powyższa dokumentacja jest dość
bezużyteczna, zwłaszcza z punktu widzenia Javy. Nawet przewodnik Step by Step
nie wyjaśnia jakie dokładnie kroki należy podjąć. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">3. Czego potrzebujemy
- libs<o:p></o:p></b></div>
<div class="MsoNormal">
<o:p> </o:p>Dla skorzystania z achievementów będziemy potrzebowali dwóch
rodzajów bibliotek. Po pierwsza to właściwa biblioteka łączącą się ze Steam.
Dostępna jest tutaj:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/releases">https://github.com/rlabrecque/Steamworks.NET/releases</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Musimy pobrać wersję Standalone. Bezpośredni link tutaj:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/releases/download/11.0.0/Steamworks.NET-Standalone_11.0.0.zip">https://github.com/rlabrecque/Steamworks.NET/releases/download/11.0.0/Steamworks.NET-Standalone_11.0.0.zip</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
W momencie czytanie wersja może być wyższa. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
W archiwum znajdziemy 3 katalogi. <span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
OSX-Linux-64</div>
<div class="MsoNormal">
Windows64</div>
<div class="MsoNormal">
Windows32</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Interesują nas tylko katalogi dla WIN. Wewnątrz każdego
katalogu znajdziemy trzy pliki</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">dla Win32<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Steamworks.Net.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">dla Win64<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Steamworks.Net.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Z tych dwóch folderów będziemy potrzebowali 3 pliki:
steam_api.dll, steam_api64.dll i steam_appid.txt.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Stwórzmy katalog 'steam' (sama nazwa nie ma akurat znaczenia)
gdziekolwiek chcemy (później przekopiujemy do katalogu assetów) i skopiuj tam
te pliki. Plik txt to zwykły plik tekstowy zawierający numer naszej aplikacji.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Druga biblioteka to oczywiście biblioteka dla Javy. Dostępna
jest tutaj</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://github.com/code-disaster/steamworks4j">https://github.com/code-disaster/steamworks4j</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Na stronie należy kliknąć na przycisk Clone or Download, a
następnie Download ZIP. Pośród wszystkich katalogów będzie nas interesował
tylko "java-wrapper". Dokładniej interesują nas biblioteki z katalogu
'java-wrapper\src\main\resources' czyli:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
libsteamworks4j.dylib</div>
<div class="MsoNormal">
libsteamworks4j.so</div>
<div class="MsoNormal">
steamworks4j.dll</div>
<div class="MsoNormal">
steamworks4j64.dll</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
Jak
wspomniałem wcześniej to tutorial dla Windows dlatego będziemy potrzebować
tylko tych dwa ostatnie pliki. Jeżeli naszym celem jest OSX lub Linux
podejrzewam, że należy skopiować też plik .so i .dylib. Odnoście Windows
będziemy potrzebowali obu plików <span style="font-size: 12pt;">steam_api </span>bez względu na wersję naszej gry. Pliki skopiujemy do
wcześniej wspomnianego katalog ‘steam’.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Na tym etapie powinniśmy mieć utworzony katalog ‘steam’ z
następującą zawartością (pliki dla OSX i Linuxa opcjonalnie).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_appid.txt<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steam_api64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">steamworks4j64.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.dylib<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">libsteamworks4j.so<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Drugą rzeczą<span style="font-size: 12pt;">, którą potrzebujemy</span> ze steamworks4j to kod źródłowy, który umożliwi
nam połączenie z bibliotekami i usługą Steam. Znajduje się tutaj
"java-wrapper\src\main\java". Musimy skopiować cały katalog 'com' do
naszego katalogu ze źródłem gry tj. 'src'. W moim przypadku katalog ‘src’ znajduje
się<span style="mso-spacerun: yes;"> </span>w projekcie <span style="font-size: 12pt;">libgdx</span> 'core'.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Oczywiście potrzebujemy także zainstalowanej na komputerze aplikacji
klienta Steam oraz własnej gry w bibliotece. Będzie ona dostępna bez kupowania
jeżeli zalogujemy się z konta deweloperskiego. Nie musi być opublikowana. Nie
jest także wymagane, aby gr już była załadowana na Steam. <span style="mso-spacerun: yes;"> </span><br />
<span style="mso-spacerun: yes;"><br /></span>
<span style="mso-spacerun: yes;"><br /></span>
<br />
<div class="MsoNormal">
<b><span style="font-size: 11.0pt;">UPDATE</span></b><span style="font-size: 11.0pt;">!!!<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;">Okazuje się, że całość
bibliotek jest dostępna poprzez Maven z
tego linku:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;"><a href="https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j">https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;">Musimy pobrać jeden plik jar.
W momencie pisania najnowsza wersja to 1.8.0. Bezpośredni link tutaj:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;"><a href="http://central.maven.org/maven2/com/code-disaster/steamworks4j/steamworks4j/1.8.0/steamworks4j-1.8.0.jar">http://central.maven.org/maven2/com/code-disaster/steamworks4j/steamworks4j/1.8.0/steamworks4j-1.8.0.jar</a>
<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;">Aby pobrać biblioteki dll
wystarczy otworzyć jara (można po prostu zmienić rozszerzenie na .zip i użyć WinRara
lub 7zip).<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 11.0pt;">Plik jar zawiera klasy steamworks4j
oraz wszystkie potrzebne biblioteki dll. Jednak tym jarem nie można zastąpić katalogu
‘steam’ z bibliotekami. Jedynie zamiast umieszczania kodu źródłowego w katalogu
‘src’ można załączyć jara kopiując go do katalogu ‘libs’ projektu android. W Eclipsie
należy także wskazać tego jara - </span><span style="font-size: 11pt;">Eclipse -> Prawy klik Core
Project -> Properties -> Java Build Path </span><span style="font-size: 11pt;"> </span><span style="font-size: 11pt;">-> Add external jars</span></div>
<span style="mso-spacerun: yes;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">4. Umieszczenie
bibliotek<o:p></o:p></b></div>
<div class="MsoNormal">
Utworzony wcześniej katalog 'steam' należy umieścić w
bezpośrednio w katalogu assetów. Jeżeli używasz konfiguracji jak ja katalog ten
znajduje się w projekcie Android. Zatem katalog assets powinien wyglądać tak:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">-<b style="mso-bidi-font-weight: normal;">assets</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--models<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--images<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--icons<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">...<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">5. Id aplikacji <span style="mso-spacerun: yes;"> </span>i steam_appid.txt <o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
Plik
tekstowy, który umieściliśmy w katalogu ‘steam’ zawiera numer 480, który ma być
numerem testowej aplikacji Steam. Musimy zamienić ten numer na numer naszej
aplikacji. Numer ten znajdziemy bez problem logując się Steamworks (https://partner.steamgames.com)
gdzie na liście aplikacji mamy pozycję np. Game (<b style="mso-bidi-font-weight: normal;">123456</b>). Numer ten jest także dostępny w linku do strony na Steam
np. https://store.steampowered.com/app/<b style="mso-bidi-font-weight: normal;">123456</b>.
Zatem umieszczamy tylko ten<span style="mso-spacerun: yes;"> </span>numer w
pliku.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Musimy także zmienić lokalizację tego pliku. Nie może się on
znajdować w katalogu ‘steam’. Musimy przenieść go poziom wyżej bezpośrednio do
katalogu assets. Zatem katalog assets powinien wyglądać tak:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">-<b style="mso-bidi-font-weight: normal;">assets</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--models<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--images<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--icons<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam_appid.txt<o:p></o:p></b></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">--<b style="mso-bidi-font-weight: normal;">steam</b><o:p></o:p></span></div>
<div class="MsoNormal">
...</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
W tym momencie należy uczynić jedną uwagę. Zgodnie z
dokumentacją plik steam_appid.txt służy jedynie testom i powinien być usunięty<span style="mso-spacerun: yes;"> </span>w wersji produkcyjnej. Oczywiście nie ma
konieczności jego usuwania, bowiem nie zawiera żadnych tajnych informacji.
Jednakże zauważyłem, że bez tego pliku nie da się uruchomić achievementów nawet
w wersji produkcyjnej (o tym poniżej). Nie wiem czy jest tak zawsze czy tylko w
wersji gry używającej steamworks4j.<span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">6. Tworzenie
achievementów<o:p></o:p></b></div>
<div class="MsoNormal">
W tym momencie powinniśmy mieć wszystkie pliki potrzebne do
implementacji achievementów. Achievementy w Steam określone są przez element
graficzny(ikony) i tekstowy (nazwa i opis). Każdy achievement wymaga dwóch ikon (osiągniętą
i nieosiągniętą) w formacie jpg w rozdzielczości 64x64. Rekomenduje się aby
ikona nieosiągnięta była szara, a osiągnięta kolorowa.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Ponadto, do każdego achievementu należy wymyślić jego nazwę i
krótki opis jak uzyskać dany achievement. Oba elementy będą widoczne dla gracza
z poziom klienta Steam. Ponadto, <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>należy wymyślić unikalny identyfikator dla
każdego achievementa, za pomocą którego z poziomu kodu będziemy identyfikować
dany achievement. Identyfikator to zmiana typu String. Sugeruje się użycie
dużych liter <span lang="EN-US" style="mso-ansi-language: EN-US;">i snake_case np.
ACHIEV_BATTLE_1, ACHIEV_BATTLE_2 itd. <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal">
Do tej pory działaliśmy offline. Aby zdefiniować
achievementy musimy zalogować się na naszym koncie partnera Steam (https://partner.steamgames.com).
Następnie wybieramy naszą aplikację. W głównym oknie szukamy linku do
definiowania achievementów.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLpjK1iIEs5Hqc1U6rbLW8lvINI_bDrGY-KN3ZPIjjals__Ueef218HXtk9NzLIOMEBzgZ1TxDtsft2o48H_fgrFAsDZabSu30ipcvU01mR-fDMxAe6-fOFSCoilh7QALGMf3_3px8wls/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="970" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLpjK1iIEs5Hqc1U6rbLW8lvINI_bDrGY-KN3ZPIjjals__Ueef218HXtk9NzLIOMEBzgZ1TxDtsft2o48H_fgrFAsDZabSu30ipcvU01mR-fDMxAe6-fOFSCoilh7QALGMf3_3px8wls/s320/1.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVEw1HhcYyDoB9s1yyfzyv_JB_JZ9teaLNmR_ub-B4MMYFamg19Hd6HaNrk7mneZKVtRZghtadvFTNMBMhXsTfCGLXIJwkBEEQuI8z-Uy6JWaj738YQ6ASeVsvojp1TjZ99dipnthelVQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="696" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVEw1HhcYyDoB9s1yyfzyv_JB_JZ9teaLNmR_ub-B4MMYFamg19Hd6HaNrk7mneZKVtRZghtadvFTNMBMhXsTfCGLXIJwkBEEQuI8z-Uy6JWaj738YQ6ASeVsvojp1TjZ99dipnthelVQ/s320/2.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Teraz dla każdego achievementu klikamy niebieski przycisk ‘New
Achievement’, wypełniamy formularz i naciskamy Save. </div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGbpMKJqe-5m-K39z_u01TtJJAfiPz08r_ZWAMnjlgneV6h1it6YcF5_O0Xis54kCpqvrre03mbvNktcywnRUpCpfpG6uGamS-reRB9F7dEdkLhwhMba3V5smX169OAS25DB8aHMAuy4/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="1285" height="40" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGbpMKJqe-5m-K39z_u01TtJJAfiPz08r_ZWAMnjlgneV6h1it6YcF5_O0Xis54kCpqvrre03mbvNktcywnRUpCpfpG6uGamS-reRB9F7dEdkLhwhMba3V5smX169OAS25DB8aHMAuy4/s320/3.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Uwaga!</b> Niestety
przy zapisywaniu achievementu pojawia się bug (a może feature) platformy Steam.
Podczas wypełniania formularza nie da się uploadować plików ikon. Przy próbie
pojawia się błąd. Najpierw należy wypełnić formularz bez ikon, zachować,
następnie kliknąć na przycisk Edit i wskazać ikony i ponownie zachować. </div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWOTj-Qkk0Np_5eEqGq4xVKnZszusaN-PNLgmDT_r2fAd9GUsps0YKEkPRS3ovUbVJyoM5bkV8QBaxJbO6uJUt_AYOHSLw_ybeK7UIgCaJRmWEiKCfSGT8r8f8oLrCp8UZsGUuCwTDboI/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="97" data-original-width="513" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWOTj-Qkk0Np_5eEqGq4xVKnZszusaN-PNLgmDT_r2fAd9GUsps0YKEkPRS3ovUbVJyoM5bkV8QBaxJbO6uJUt_AYOHSLw_ybeK7UIgCaJRmWEiKCfSGT8r8f8oLrCp8UZsGUuCwTDboI/s320/4.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
Po zdefiniowaniu wszystkich ikon NALEŻY opublikować zmiany.
Inaczej achievementy nie będą widoczne. Żeby achievementy były widoczne w kliencie
Steam musisz wylogować się i zalogować ponownie <span style="font-size: 12pt;">do klienta (nie platformy webowej)</span>. Jeżeli to nie pomaga proszę
spróbować odinstalować i ponownie zainstalować swoją grę.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">7. Kod - przygotowanie<o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
Mając
już wszystkie biblioteki i zdefiniowane achievementy można przystąpić do implementowania
achievementów w naszej grze. Użycie achievementów w grze składa się z 3 etapów:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
-załadowania biliotek i inicjacja</div>
<div class="MsoNormal">
-ustawienia achievementu</div>
<div class="MsoNormal">
-zamkniecia <span style="font-size: 12pt;">bibliotek</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
O ile pierwszy etap jest niezbędny to ostatni nie wydaje się
być konieczny. Oczywiście pomiędzy rozpoczęciem a zamknięciem można ustawić
nieograniczoną ilość achievementów. Inicjacje i zakończenie przeprowadza się
raz w grze. Ja inicjacje ustawiłem w głównym menu (zaraz po Loading page), a zakończenie
przy wychodzeniu z gry także z poziomu głównego menu. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Uwaga!</b> Testując
achievementy w grze NALEŻY mieć włączonego klienta Steam. Wydaje się, że gra łączy
się z klientem, a nie bezpośrednio z serwerami Steam. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Testowanie ustawiania achievementów może odbywać się w IDE
bez potrzeby kompilowania i umieszczania gry na steamie.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">8. Kod - klasa<o:p></o:p></b></div>
<div class="MsoNormal">
Tworzenie kodu zacznijmy od zdefiniowania ogólnej klasy.
Będzie ona bardzo uproszczona, zwłaszcza jeżeli chodzi o wyjątki. Samego
klienta <span style="font-size: 12pt;">definiujemy</span> jako statyczną klasę w głównym menu. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Klasa będzie nazywała się SteamClient:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>public class SteamClient {</i></div>
<div class="MsoNormal">
<i>}</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Następnie dodamy potrzebne importy. Oczywiście nawiązują do
wcześniej dodanego kodu źródłowego.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamAPI;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamException;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamID;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamLeaderboardEntriesHandle;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamLeaderboardHandle;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamResult;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamUserStats;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamUserStatsCallback;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>import
com.codedisaster.steamworks.SteamUtils;</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Następnie dodamy 3 zmienne:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>private SteamUtils utils;</i></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>private
SteamUserStats userStats;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span lang="EN-US" style="font-size: 12pt;">public </span></i><i>boolean isOnline=false;</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Następnie musimy zdefiniować identyfikator dla każdego
achievementa. Jak wspomniano wyżej to String. Zdefiniujemy je jako zmienne
statyczne. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>static
public String achievBattle1SteamId= "ACHIEV_BATTLE_1"; <o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>static
public String achievBattle2SteamId= "ACHIEV_BATTLE_2"; <o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>static
public String achievBattle3SteamId= "ACHIEV_BATTLE_3"; </i><o:p></o:p></span></div>
<div class="MsoNormal">
...</div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
Ponadto musimy zdefiniować w ramach naszej klasy SteamClient
jeden callback. Nie musimy obsługiwać w żaden sposób metod tego callbacka. <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>SteamUserStatsCallback steamUserStatsCallback=new
SteamUserStatsCallback()</i></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 1;"> </span>{</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 2;"> </span>@Override</i></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 2;"> </span>public
<span lang="EN-US" style="mso-ansi-language: EN-US;">void onUserStatsReceived(long
gameId, SteamID steamIDUser,<o:p></o:p></span></i></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>SteamResult
result)<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 3;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onUserStatsStored(long gameId, SteamResult result) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onUserStatsUnloaded(SteamID steamIDUser) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span><o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onUserAchievementStored(long gameId,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>boolean
isGroupAchievement, String achievementName,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>int
curProgress, int maxProgress) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onLeaderboardFindResult(SteamLeaderboardHandle leaderboard,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>boolean
found) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onLeaderboardScoresDownloaded(<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>SteamLeaderboardHandle
leaderboard,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>SteamLeaderboardEntriesHandle
entries, int numEntries) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onLeaderboardScoreUploaded(boolean success,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>SteamLeaderboardHandle
leaderboard, int score,<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 4;"> </span>boolean
scoreChanged, int globalRankNew, int globalRankPrevious) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>@Override<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 2;"> </span>public void
onGlobalStatsReceived(long gameId, SteamResult result) {<o:p></o:p></i></span></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span></span>}</i></div>
<div class="MsoNormal">
<span style="mso-tab-count: 2;"><i> </i></span></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 1;"> </span>};</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
W kolejnym kroku definiujemy 3 podstawowe metody
odpowiadające 3 wymaganym etapom.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>public
boolean initAndConnect(){}; <o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>public
boolean setAchiev(String achivName) {};<o:p></o:p></i></span></div>
<div class="MsoNormal">
<i>public void disconnect()<span lang="EN-US" style="mso-ansi-language: EN-US;">{};</span></i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">9. Kod - inicjacja<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Pierwsza metoda initAndConnect() musi prawidłowo zainicjować
biblioteki Steam. Dlatego musi zawierać następujący kod (załadowanie bibliotek
z parametrem wskazującym nazwę katalogu gdzie wcześniej umieściliście biblioteki
dll):</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i><span style="mso-spacerun: yes;"> </span><span lang="EN-US" style="mso-ansi-language: EN-US;">try {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>SteamAPI.loadLibraries("./steam");<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;"> </span>catch (SteamException e1)<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>System.out.println("Load libraries
error");<o:p></o:p></i></span></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span></span>}<span style="mso-tab-count: 1;"> </span></i> </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Inicjacja połączenia z klientem Steam:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i><span style="mso-spacerun: yes;"> </span>try {</i></div>
<div class="MsoNormal">
<i><span style="mso-spacerun: yes;"> </span><span lang="EN-US" style="mso-ansi-language: EN-US;">if (!SteamAPI.init())<o:p></o:p></span></i></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span>System.out.println("Initialisation
failed");<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span>isOnline=false;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span>return false ;<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;"> </span>} catch (SteamException e) <o:p></o:p></i></span></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span></span>{</i></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 1;"> </span>e.printStackTrace();</i></div>
<div class="MsoNormal">
<i><span style="mso-tab-count: 1;"> </span>}</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Pobranie statystyk z achievementami. Tutaj wskazujemy
wcześniej zdefiniowany callback:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>//Get stat object</i></div>
<div class="MsoNormal">
<i><span style="mso-spacerun: yes;"> </span><span lang="EN-US" style="mso-ansi-language: EN-US;">userStats = new SteamUserStats(
steamUserStatsCallback);<o:p></o:p></span></i></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;"> </span>//A must before setting achievements <o:p></o:p></i></span></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span></span>userStats.requestCurrentStats();</i></div>
<div class="MsoNormal">
<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
Ustawienie flagi wskazującej, że poprawnie wykonano
inicjacje bibliotek.<span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="mso-ansi-language: EN-US;">isOnline</span>=true;</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">10. Kod - ustawienie
achievementu<o:p></o:p></b></div>
<div class="MsoNormal">
Aby ustawić achievement wystarczy wywołać metodę
setAchiev(String achivName) w dowolnym miejscu w grze z odpowiednią nazwą achievementu.
Nazwy wcześniej zdefiniowalismy w klasie za pomocą statycznych identyfikatorów.
Dodatkowo wykonanie metody warunkowane jest poprawnym zainicjowaniem bibliotek.<br />
<br />
<div class="MsoNormal">
Nasza metoda:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">public boolean
setAchiev(String achivName)<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> try
{<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> //set<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> userStats.setAchievement(achivName);<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> //save<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> boolean result=userStats.storeStats();<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> return result;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
catch ( Exception e) {<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> isOnline=false;<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> return false; <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;">
}<o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> <o:p></o:p></span></i></div>
<div class="MsoNormal">
<i><span lang="EN-US" style="font-size: 11.0pt; mso-ansi-language: EN-US;"> }<o:p></o:p></span></i></div>
<br />
<div class="MsoNormal">
<br /></div>
</div>
<br />
<div class="MsoNormal">
I wywołanie:</div>
</div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>//Steam<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;"> </span>if(SteamClient.isOnline)<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><span style="mso-spacerun: yes;">
</span>SteamClient.setAchiev(SteamClient.achievBattle1SteamId );</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I to wszystko co jest konieczne dla ustawienia achievementu.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<div class="MsoNormal">
<s><span style="font-size: 11.0pt;">Uwaga! Nawet jeżeli
poprawnie ustawiono achievement w czasie testu możliwe, że nie pojawi się on natychmiast
w aplikacji Steam Client. Nie wiem co jest przyczyną opóźnienia. Możliwe że Klient
wysyła informacje na serwer co jakiś czas. Najlepszą metodą sprawdzenia czy
poprawnie ustawiono achievement jest wylogowanie się i ponowne zalogowanie
przez Klienta. <o:p></o:p></span></s></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<b><span style="font-size: 11.0pt;">UPDATE</span></b><span style="font-size: 11.0pt;">!!!
Brak natychmiastowego pojawienia się achievementu w Steam Klient jest wynikiem
niewywołania <i> storeStats() </i> po <i>setAchievement().
</i>Jeżeli ta metoda zostanie poprawnie wywołana, to achievement od razu pojawi
się w Steam Client. <o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>11. Rozłączenie się<o:p></o:p></b></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Aby rozłączyć się należy wywołać metodę shutdown. Jak
wspomniano nie jest to bezwzględnie konieczne.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>public void
disconnect()<o:p></o:p></i></div>
<div class="MsoNormal">
<i> {<o:p></o:p></i></div>
<div class="MsoNormal">
<i> SteamAPI.shutdown();<o:p></o:p></i></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<i> }<o:p></o:p></i></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">12. Deployment<o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
Testując
achievementy w IDE wszystko będzie poprawnie działało. Niestety jeżeli
utworzymy plik jar (Runnable Jar) nasza gra albo się wysypie albo achievementy
nie będą ustawiane. Problemem jest umiejscowienie katalogu 'steam' oraz pliku
steam_appid.txt. Jak wskazano wcześniej katalog ‘steam’ i plik txt znajdują się
w katalogu assets (a obecnie wewnątrz pliku jar). Niestety gra ich nie widzi.
Dlatego należy skopiować katalog steam i plik steam_appid.txt i umieścić zaraz
obok pliku, który rozpoczyna naszą grę. Żeby wyjaśnić jak to ma wyglądać pokaże
moją strukturę plików gry. W moim katalogu gry mam tylko plik exe oraz katalog
lib zawierający jre oraz jar mojej gry. Exe wywołuje jedynie jara odwołując się
do java.exe. Wygląda to tak</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
-MyGame</div>
<div class="MsoNormal">
--mygame.exe</div>
<div class="MsoNormal">
--lib </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Zatem jeżeli chcemy dodać katalog ‘steam’ i plik
steam_appid.txt muszą się oni znajdować bezpośrednio w katalogu MyGame. Należy
go <b style="mso-bidi-font-weight: normal;">skopiować</b>, a nie usunąć z
katalogu assets. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
-MyGame</div>
<div class="MsoNormal">
--mygame.exe</div>
<div class="MsoNormal">
--lib </div>
<div class="MsoNormal">
--steam</div>
<div class="MsoNormal">
--steam_appid.txt</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Przy takiej konfiguracji achievementy powinny działać po
uplodowaniu gry Steam. <br />
<br />
<div class="MsoNormal">
<b><span style="font-size: 11.0pt;">UPDATE!!!<o:p></o:p></span></b></div>
<br />
<div class="MsoNormal">
Zgodnie z uwagą autora biblioteki (code-disaster) „<i>konieczność umieszczenia katalogu ‘steam’i
pliku txt wynika ze sposobu uruchomienia gry. Na początku klient Steam
‘wstrzykuje’ się w proces gry. Jeżeli plik exe wywołuje "java -jar
..." nie ma niczego, co mogłoby zidentyfikować aplikacje przy wywołaniu
Steam.init()- to nowy process i musi szukać pliku steam_appid.txt jako wyjścia
awaryjne</i>”.<span style="color: #1c1c1c; font-family: "segoe ui"; font-size: 11.0pt;"> </span><span style="font-size: 11.0pt;"><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">13. Błędy<o:p></o:p></b></div>
<div class="MsoNormal">
Poniżej przedstawiam najczęściej występujące błędy (zarówno
w trakcie testowania jak i działania gry).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">A. Nie można znaleźć bibliotek.<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Exception
in thread "LWJGL Application"
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError:
Can't load library: ....\android\assets\steam\steam_api.dll<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal">
W czasie testowania ten błąd wystąpi jeżeli nie umieściliśmy
katalogu steam w katalogu assets. W czasie działania gry ten błąd wystąpi
jeżeli nie umieścimy katalogu obok pliku exe. Ponadto błąd pojawia się gdy
metoda SteamAPI.loadLibraries("./steam") wskazuje nieprawidłową nazwę
katalogu. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">B. Win32 i Win64 <o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Exception
in thread "LWJGL Application"
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError:
...\android\assets\steam\steam_api.dll: Can't load AMD 64-bit .dll on a IA
32-bit platform<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Ten błąd wystąpi gdy umieściliśmy plik steam_api.dll jedynie
dla wersji Win32 lub odwrotnie.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Uwaga!</b> W moim
przypadku<span style="mso-spacerun: yes;"> </span>testowanie w Eclipse wymagało
Win32, a wersja produkcyjna Win64. <span style="mso-spacerun: yes;"> </span>W obu
przypadkach korzystałem z tego samego komputera. Nie wiem co jest tego
przyczyną. Może to, że używam starej wersji Eclipsa. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">C. SteamAPI.init()
zwraca false<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Błąd ten wywołuje brak zalogowania do swojego konta przez aplikacje
Steam Client w czasie testowania. Ponadto wynika z braku umieszczenia pliku steam_appid.txt
w katalogu assets i głównym katalogu obok pliku exe.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">D. Biblioteki nie załadowane<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>com.codedisaster.steamworks.SteamException:
Native libraries not loaded.<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>Ensure to
call SteamAPI.loadLibraries() first!<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>at
com.codedisaster.steamworks.SteamAPI.init(SteamAPI.java:44)</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>Exception
in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException:
java.lang.UnsatisfiedLinkError: <o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i><o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>com.codedisaster.steamworks.SteamAPI.getSteamUserPointer()
at
com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:133)<o:p></o:p></i></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><i>Caused by:
java.lang.UnsatisfiedLinkError: com.codedisaster.steamworks.SteamAPI.getSteamUserPointer()</i><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Ten błąd pojawia się gdy probujemy wywołać metodę
SteamAPI.init() przed wywołaniem metody
SteamAPI.loadLibraries("./steam"). </div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Wydaje się, że wcześniejsza wersja API dla Javy nie wymagała
wywołania SteamAPI.loadLibraries() co może być źródłem problemu.</div>
<div class="MsoNormal" style="tab-stops: 60.5pt;">
<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">14. Zakończenie<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Mam nadzieję, że powyższy tutorial będzie pomocny. Jeżeli
chcesz zobaczyć moją grę w której zaimplementowałem achievementy w powyższy sposób
sprawdź ten link</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://store.steampowered.com/app/955620/Battle_Arena_Euro_Wars">https://store.steampowered.com/app/955620/Battle_Arena_Euro_Wars</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Proszę też o suba na Twitterze.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://twitter.com/polincgames">https://twitter.com/polincgames</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">15. Pomocne linki <o:p></o:p></b></div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements">https://partner.steamgames.com/doc/features/achievements</a></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/features/achievements/ach_guide">https://partner.steamgames.com/doc/features/achievements/ach_guide</a></div>
<div class="MsoNormal">
<a href="https://partner.steamgames.com/doc/api">https://partner.steamgames.com/doc/api</a></div>
<div class="MsoNormal">
<a href="https://github.com/code-disaster/steamworks4j">https://github.com/code-disaster/steamworks4j</a><br />
<div class="MsoNormal">
<span style="font-size: 11.0pt;"><a href="https://github.com/code-disaster/steamworks4j">https://github.com/code-disaster/steamworks4j</a><o:p></o:p></span></div>
<div class="MsoNormal">
<div class="MsoNormal">
<span style="font-size: 11.0pt;"><a href="https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j">https://mvnrepository.com/artifact/com.code-disaster.steamworks4j/steamworks4j</a><o:p></o:p></span></div>
</div>
</div>
<div class="MsoNormal">
<a href="https://steamworks.github.io/steammanager/">https://steamworks.github.io/steammanager/</a></div>
<div class="MsoNormal">
<a href="https://steamworks.github.io/installation/">https://steamworks.github.io/installation/</a></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/releases">https://github.com/rlabrecque/Steamworks.NET/releases</a></div>
<div class="MsoNormal">
<a href="https://github.com/rlabrecque/Steamworks.NET/issues/83">https://github.com/rlabrecque/Steamworks.NET/issues/83</a></div>
<br />PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com1tag:blogger.com,1999:blog-5391168447724877363.post-10426713457371470742018-03-01T23:37:00.003-08:002018-03-01T23:37:50.254-08:00ControlShip's control is carried out by clicking on the screen. Clicking from the side of the ship causes it to turn. Clicking from the front or back causes it to move to the front or back. The movement is carried out with impulses. Depending on the weight of the ship, several impulses are needed to put the ship into motion. The ship is moving in the Newtonian space, which causes the movement to be linear. It mirrors real space movement.<br />
<br />
Clicks are dependent on the ship's position, i.e. clicking at the top of the screen if the ship is pointing upwards moves it forward. But if you rotate the ship by 90 degrees, clicking on the top of the screen will cause it to rotate.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqXfM3cI1oUDFvcxXQhRv__A9nUqg8uNQG-FXBRv01oLRzdkcD7bln-Cny6VWs8wVmPR6z4mWZfW2kprwGFBl2IgHguUrkBAv__in-C-upPLC3m3zVZmUVoZWibbO65BVXDEek5_QPu2s/s1600/9_steering_menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="801" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqXfM3cI1oUDFvcxXQhRv__A9nUqg8uNQG-FXBRv01oLRzdkcD7bln-Cny6VWs8wVmPR6z4mWZfW2kprwGFBl2IgHguUrkBAv__in-C-upPLC3m3zVZmUVoZWibbO65BVXDEek5_QPu2s/s320/9_steering_menu.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Steering is managed by the window "Control". In it you can choose the rotation mode. The "Rotation" mode means that clicking on the sides of the ship will cause the ship to rotate according to its own axis. "Strefe" mode means moving the ship in one direction without turning the ship.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifSAEvoHnLcdPrlTF7vwzcrUSeJ18q09u7-arjL0OXcKKVc_H5kcnfWXA6jdfcxxrZC0pGUf9aS0Hg9mkSmZredtsydXfi1KKZUmhY0p8mO1tRlXUiqLFqp8VllKlFgAqzl4D4sGOjtkY/s1600/9_steering_modes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="801" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifSAEvoHnLcdPrlTF7vwzcrUSeJ18q09u7-arjL0OXcKKVc_H5kcnfWXA6jdfcxxrZC0pGUf9aS0Hg9mkSmZredtsydXfi1KKZUmhY0p8mO1tRlXUiqLFqp8VllKlFgAqzl4D4sGOjtkY/s320/9_steering_modes.png" width="320" /></a></div>
<br />
<br />
In order to make it easier, support lines can be activated with the "Drive" button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQCapB6msBJTq-i77gPCi5etNIF9ib-Zam8GuVUGhAsnK_2dN2yAO8gER8VJyCPDZESA9KHLzF66z83eTn8Jo3iFdcyKmaqxrx4Vi1oEE4lCmwoKwGtW1rCSwz4Ep72QTqLpbg9ud6oE/s1600/9_steering_support.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="801" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQCapB6msBJTq-i77gPCi5etNIF9ib-Zam8GuVUGhAsnK_2dN2yAO8gER8VJyCPDZESA9KHLzF66z83eTn8Jo3iFdcyKmaqxrx4Vi1oEE4lCmwoKwGtW1rCSwz4Ep72QTqLpbg9ud6oE/s320/9_steering_support.png" width="320" /></a></div>
<br />
<br />
Google Play<br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
Amazon Store<br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
More at: <a href="http://www.polinc.pl/">www.polinc.pl</a>PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0tag:blogger.com,1999:blog-5391168447724877363.post-58139533076642965012018-02-22T23:36:00.002-08:002018-02-22T23:37:26.600-08:00ReactorThe reactor is the source of energy for the ship. Information about the reactor is shown in the 'Reactor' window. The reactor is powered by a fuel. The available amount of fuel can be seen under the name "Fuel". This amount changes in time depending on the level of energy supplied (position - Current). The energy from the reactor is divided into three systems: Drive, Shields and Weapons. Total reduction of energy for a particular system results in its complete shutting down. Damage to the rector also results in the shutdown of all systems. Lowering the amount of energy for a specific system increases the buffer level (position Available). This allows you to redirect energy to another system.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUvAC7OG9k3nLpJcdK4dILYOY59MLgruhQxPWA70RzaStEApyMV9KSJ_IYEyy7Ljh3vmbXldRSqI77TVabYupfGnL7OBgOqDq4O8kR55i5kt2BQiHmMQwU-jvo5f-OXVxQn8TjaShdL10/s1600/8.reactor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="497" data-original-width="796" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUvAC7OG9k3nLpJcdK4dILYOY59MLgruhQxPWA70RzaStEApyMV9KSJ_IYEyy7Ljh3vmbXldRSqI77TVabYupfGnL7OBgOqDq4O8kR55i5kt2BQiHmMQwU-jvo5f-OXVxQn8TjaShdL10/s320/8.reactor.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
The level of energy and the amount of fuel can be adjusted using the Efficiency slider.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgafO6TioTHyK3hpIWhu0JLn0ZIEIY1s7DCW2iEywiwtzK5yFDjUMSO7xe9eV8IPXHjYaqW2R8zi5agk1ucPt1pcbhIrNWfcQJbQARrayIEN8R2bmFgMZPc8EdGrcNlhjhbooVjUyW2TLk/s1600/8.reactor_efficiency.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="495" data-original-width="793" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgafO6TioTHyK3hpIWhu0JLn0ZIEIY1s7DCW2iEywiwtzK5yFDjUMSO7xe9eV8IPXHjYaqW2R8zi5agk1ucPt1pcbhIrNWfcQJbQARrayIEN8R2bmFgMZPc8EdGrcNlhjhbooVjUyW2TLk/s320/8.reactor_efficiency.png" width="320" /></a></div>
<br />
<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a>PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0tag:blogger.com,1999:blog-5391168447724877363.post-32782592854917736872018-02-06T23:47:00.001-08:002018-02-22T23:37:40.720-08:00Weapons: cannonAll information relating to the Laser weapon also apply to the Cannon. What differs the Laser from the Cannon is, as a rule, the higher conversion factor. Thus, a larger quantity of the energy is transferred to the shiels or hull of an enemy ship. Like a laser, the Cannon has the energy buffer loading speed. In addition, the Cannon shares the energy buffer with the Laser, in the sense that increasing the amount of energy for the Cannon causes a reduction of energy input for the Laser.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBtFKKKiL8ddTh_13Jq-7MHBp8FIBec7zwhaPIZ440noI_cV0wNxkaL48ZwhDrG9S-uc7GtYF1omTZaiych0GsQpbOPbpnx-ZwlGJcGXa5N2fAHNOXUiSP4e73XyQPwNgTee713I0pMHg/s1600/7.cannon_shared_energy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="798" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBtFKKKiL8ddTh_13Jq-7MHBp8FIBec7zwhaPIZ440noI_cV0wNxkaL48ZwhDrG9S-uc7GtYF1omTZaiych0GsQpbOPbpnx-ZwlGJcGXa5N2fAHNOXUiSP4e73XyQPwNgTee713I0pMHg/s320/7.cannon_shared_energy.png" width="320" /></a></div>
<br />
<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl </a><br />
<br />PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0tag:blogger.com,1999:blog-5391168447724877363.post-33119018181856942992018-01-30T23:48:00.001-08:002018-02-19T23:38:14.888-08:00Weapon: laser part IIJust like the Cannon, the Laser needs time to load the energy needed to fire the shot. The loading speed depends on the class of the ship. The system does not require the laser buffer to be fully charged to deliver the shot. Just 50% of the buffer is required. Below this level, the system does not allow you to shoot.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYhSNFOnL1WRdstkCr-hXcfO4Id0swYIg1BXnjQB_hL3lNlswKskm1qAiuhrU3pU4oiwrdD9nf2rgU5Ny4MngihBOgZZejcXfWtrvq7Ldfi-8HYOh7933ut-DAiPClmzybp21LrMs_gB0/s1600/6_laser_charging.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="802" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYhSNFOnL1WRdstkCr-hXcfO4Id0swYIg1BXnjQB_hL3lNlswKskm1qAiuhrU3pU4oiwrdD9nf2rgU5Ny4MngihBOgZZejcXfWtrvq7Ldfi-8HYOh7933ut-DAiPClmzybp21LrMs_gB0/s320/6_laser_charging.png" width="320" /></a></div>
<br />
<br />
The laser does not transmit full energy from the buffer in the laser beam. The amount of energy transferred to the enemy ship's shields or hull depends on the conversion parameter, which depends on the class of the ship. Generally, this is only about 10% of the buffer energy.<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a>PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0tag:blogger.com,1999:blog-5391168447724877363.post-59348178056878024952018-01-27T22:19:00.000-08:002018-02-19T23:38:38.861-08:00Weapons: laserAll ships are equipped with a laser system. In each ship this functions is the same although each ship has different parameters. The laser is powered from the reactor. The amount of energy depends on the setting of the Weapons option in the Reactor window. Laser shares this amount of energy with the Cannon. The amount of energy consumed by both systems must not exceed the amount specified in the Reactor window.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjjXSXiGoDcRdzCkENV-GhyphenhyphenKK96QrJUCMwNr1TBwYgePhJKg29ri_J89tA-pGtXFjmx780cHaPaRlMVPbmcoQ2eTxZfYNBfE5QGoEyTJygSx8vrvvHY5plI0hRSfXearAOZ48MhWO4d8/s1600/5_laser.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="799" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjjXSXiGoDcRdzCkENV-GhyphenhyphenKK96QrJUCMwNr1TBwYgePhJKg29ri_J89tA-pGtXFjmx780cHaPaRlMVPbmcoQ2eTxZfYNBfE5QGoEyTJygSx8vrvvHY5plI0hRSfXearAOZ48MhWO4d8/s320/5_laser.png" width="320" /></a></div>
<br />
<br />
The Laser, just like the Cannon has a specific Capacity. It is a parameter depending on the class of the ship. Capacity indicates what is the maximum amount of energy the system can take. This value has been shown in the Weapons window and in the Laser window.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9vjvIPL66dv2YphDB9Zjev0lXDa7DaElEXPbKtNKN8kUOiDnesj-s5ba3ajuet6uKLl86HUmuavAIjPEeT7UYavroQtD2FA1LqpB4XL9cS0RBMAwueCnqLlQElro-mgV415cRdikOcGU/s1600/5_laser_reactor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="799" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9vjvIPL66dv2YphDB9Zjev0lXDa7DaElEXPbKtNKN8kUOiDnesj-s5ba3ajuet6uKLl86HUmuavAIjPEeT7UYavroQtD2FA1LqpB4XL9cS0RBMAwueCnqLlQElro-mgV415cRdikOcGU/s320/5_laser_reactor.png" width="320" /></a></div>
<br />
<br />
The parameter of weapon systems is also Efficiency. It determines what is percentage of energy will end up in the system.<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a><br />
<br />
<br />
<br />
<br />PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com1tag:blogger.com,1999:blog-5391168447724877363.post-9731659605937236912018-01-17T00:21:00.001-08:002018-02-19T23:38:54.595-08:00Weapons: rocketsAll warships in the game are equipped with rockets as a weapon system. Depending on the class, the ship may contain 3 types of rockets M1, M2, M3. The number of rockets also depends on the class of the ship. Access to the missile system is possible through the "Weapon" menu and then "Rocket". The selection of the rocket type takes place in the "Rockets" window.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje-KrKcjMUj-0-aEGMZraZgUPOUlc-W_u6rWJn8DsboteiRHPBcBsHr00pVqGnIRLhvGDMnqNfu__OBo4xLsX9hBpP3GWFy2q6gEhTcInz3v5GT6AVnPtmjgLqfR-eDGUVmnGgde-ydo8/s1600/4.rockets_system.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="794" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje-KrKcjMUj-0-aEGMZraZgUPOUlc-W_u6rWJn8DsboteiRHPBcBsHr00pVqGnIRLhvGDMnqNfu__OBo4xLsX9hBpP3GWFy2q6gEhTcInz3v5GT6AVnPtmjgLqfR-eDGUVmnGgde-ydo8/s320/4.rockets_system.png" width="320" /></a></div>
<br />
<br />
<br />
Rocket classes differ in the following parameters: speed, range, maneuverability and energy. The values for individual classes are given below (they may change over time).<br />
<b><br /></b>
<b>M1</b><br />
speed=1.7;<br />
range=20;<br />
maneuverability=2;<br />
energy=7;<br />
<br />
<b>M2</b><br />
speed=2.2;<br />
range=25;<br />
maneuverability=5;<br />
energy=5;<br />
<span style="white-space: pre;"> </span><br />
<b>M3</b><br />
speed=1.2;<br />
range=20;<br />
maneuverability=2;<br />
energy=55;<br />
<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com1tag:blogger.com,1999:blog-5391168447724877363.post-2866846446519524632018-01-08T23:11:00.000-08:002018-02-19T23:39:02.415-08:00ATU logoIn the previous post I wrote about the KEMI's logo. Now a few words about the ATU's logo.<br />
<br />
It is much simpler. Half of the circle represents the northern hemisphere of the globe where ATU originated, ie North America and Europe. In the semi-circle, 3 letters are written: A, T and U. The main support of the whole organization is the letter T because ATU is based on trade.<br />
<br />
The letter A and U are smaller because the union itself as well as its geographical location is of lesser importance. The main part of the organization is based on the letter T. The letter T also protects the organization.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDrC3ZAgwOy3GjShoxCULzD4Uzw2xkr0HHMjsRah7o5WRO8guhDPm1LR5wvNq0jYrSPkcIvnBwBOLbtJg8lXqSjE12BnwX0WcjlTsitCh-tZPItX20fkufzaBLTFUtd3MaVvyRaVlw5hE/s1600/3.atu_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="400" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDrC3ZAgwOy3GjShoxCULzD4Uzw2xkr0HHMjsRah7o5WRO8guhDPm1LR5wvNq0jYrSPkcIvnBwBOLbtJg8lXqSjE12BnwX0WcjlTsitCh-tZPItX20fkufzaBLTFUtd3MaVvyRaVlw5hE/s320/3.atu_logo.png" width="256" /></a></div>
<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a>PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0tag:blogger.com,1999:blog-5391168447724877363.post-37922679921947119192017-12-26T23:39:00.000-08:002018-02-19T23:39:11.859-08:00KEMI logoToday I will tell you a few words about how the KEMI logo was created. At first glance, the shape inscribed in a circle resembles a spider.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH_fCPaNk9g7KbBmSqAl3Pu8SBbxYmEoOOL2p5uqpfjnPqeZlMSHRswWEkrfHEoxnVDmYK7YPtCH9FolCR_zYOZkq8jSa6apxKXDpuIK2Bz5_X87hSFa8EVB4bOQfV-Opz86dLMUmelMo/s1600/2.kemi_logo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="400" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH_fCPaNk9g7KbBmSqAl3Pu8SBbxYmEoOOL2p5uqpfjnPqeZlMSHRswWEkrfHEoxnVDmYK7YPtCH9FolCR_zYOZkq8jSa6apxKXDpuIK2Bz5_X87hSFa8EVB4bOQfV-Opz86dLMUmelMo/s320/2.kemi_logo.jpg" width="256" /></a></div>
<br />
<br />
As indicated in the information contained in the game, KEMI is a form of the korean word QOMI / QOEMI, which means a spider. And so it is.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4N-gh9b8NOxhNmlxd0ltzgYjsIel6OrOBxOqDdmRNQrRr5a_VwF7iM0IXljYHTLgSc9Cg5Hi3wTlHIbPdrEEuKqtUP6T1e-vFz2zZCsGAfJordmsGBhA-DlOvsdo7-DkWl8uWV3Aj1A/s1600/2.kemi_translation.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4N-gh9b8NOxhNmlxd0ltzgYjsIel6OrOBxOqDdmRNQrRr5a_VwF7iM0IXljYHTLgSc9Cg5Hi3wTlHIbPdrEEuKqtUP6T1e-vFz2zZCsGAfJordmsGBhA-DlOvsdo7-DkWl8uWV3Aj1A/s1600/2.kemi_translation.jpg" /></a></div>
<br />
<br />
However, the spider also hides the name KEMI in the korean alphabet hangul.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5mioXiGBdFH3c6LyVdBlbVQVrhH3lKZKsi5oEWXvKeRt8CBGyOILIG9cJaH88Rsdd3msr6Z7KVY-63lkpbLagcGAAgkGzQhuqgOqq8CXK2s6tYSVh5OW-eFOigOvYtwdtYFvFr0wIUqc/s1600/2.kemi_rotate.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5mioXiGBdFH3c6LyVdBlbVQVrhH3lKZKsi5oEWXvKeRt8CBGyOILIG9cJaH88Rsdd3msr6Z7KVY-63lkpbLagcGAAgkGzQhuqgOqq8CXK2s6tYSVh5OW-eFOigOvYtwdtYFvFr0wIUqc/s1600/2.kemi_rotate.jpg" /></a></div>
<br />
<br />
If you turn the logo 45 degrees to the right, we will see that it corresponds to the word KEMI.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpbCCveuJRo_6VHsy3IrGFkFGWMFs2d6TjJmPOi7y6MPBNhlU5oIWiJ6SoAXqf-dpqNV5Jya49ifJ3CdIs__CySIiEwLl9p7_crAgg5Q_Pe9eOBJf3RdJJSV8z1RcAvS5HQVihZwlWZdc/s1600/2.kemi_compare.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="264" data-original-width="399" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpbCCveuJRo_6VHsy3IrGFkFGWMFs2d6TjJmPOi7y6MPBNhlU5oIWiJ6SoAXqf-dpqNV5Jya49ifJ3CdIs__CySIiEwLl9p7_crAgg5Q_Pe9eOBJf3RdJJSV8z1RcAvS5HQVihZwlWZdc/s320/2.kemi_compare.jpg" width="320" /></a></div>
<br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a>PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com2tag:blogger.com,1999:blog-5391168447724877363.post-55417982899528508982017-12-20T00:10:00.001-08:002018-02-19T23:39:24.782-08:00Making of "The Collapse: Space Supremacy" gameHi,<br />
In the first post I would like to give you a quick rundown on the 5 month of making the Collapse: Space Supremacy.<br />
<br />
<b>TIME</b><br />
<br />
I started in June 2017. The whole process took abount 5-6 month. The coding took about 60-70% of that time. The rest was:<br />
-graphics,<br />
-physics, particles, skinning,<br />
-promo: screenshots, videos,<br />
-making accounts on promo media (youtube etc),<br />
-making accounts on app stores.<br />
<br />
<b>TECH</b><br />
<b><br /></b>
Of course knowledge of Java is a must. No frameworks or special libs are required though. Just simple old Java - also no fancy things from Java 8.<br />
As for the LibGDX, no special expertise is required. I started after 2 weeks of learning it (before that I hadn't even known about LibGDX). All my knowledge comes mainly from a book "Learning LibGDX Game Development" by Suryakumar Balakrishnan Nair and Andreas Oehlke. It's not perfect but it's a good start. Also of course a lot of the Internet.<br />
I didn't use any special libs except for postprocessing by Bitfire. It actually cause more problems than was of a benefit.<br />
<br />
<b>OBSTACLES</b><br />
<b><br /></b>
The most obstacles were caused by Box2d and my lack of knowledge of it. It was really hard to compose world units with screen units. Also adding admob service was like a nightmare.<br />
<br />
<b>DEVELOPMENT</b><br />
<b><br /></b>
I used Eclipse Luna and gdx-setup.jar installer. Then I imported everything using Grandle import. The above mentioned book has good tutorial on installing, but I would lie if I said that everything went just as it was described.<br />
<br />
<b>LIBGDX</b><br />
<br />
LibGdx is a good library. No one has said it was perfect and it isn't. It doesn't have steep learning curve. My biggest charge against libgdx is the memory management. It is not very forgiving when it comes to releasing resources.<br />
<br />
I hope this short text can help someone choose the LibGDX as his/her first game library.<br />
<br />
Feel free to test my game.<br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
Also check out how gameplay looks like<br />
<a href="https://www.youtube.com/watch?v=yzAqrFgQDTA">https://www.youtube.com/watch?v=yzAqrFgQDTA</a><br />
<br />
Current info on the game can be always found at <a href="http://www.polinc.pl/">www.polinc.pl</a><br />
<br />
<b>Google Play</b><br />
<a href="https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss">https://play.google.com/store/apps/details?id=com.polinc.thecollapse.ss</a><br />
<br />
<b>Amazon Store</b><br />
<a href="http://www.amazon.com/gp/product/B07889TCQT">http://www.amazon.com/gp/product/B07889TCQT</a><br />
<br />
<b>More at</b>: <a href="http://www.polinc.pl/">www.polinc.pl</a><br />
<br />
<br />
<br />PolInc Gameshttp://www.blogger.com/profile/06779680391730181128noreply@blogger.com0