~repos /gdx-studio
git clone https://pyrossh.dev/repos/gdx-studio.git
An IDE for creating Games using libgdx and Java supported on all platforms Android, iOS, Desktop
dd936d5a
—
pyros2097 8 years ago
Create master branch via GitHub
- index.html +277 -15
- params.json +1 -1
index.html
CHANGED
|
@@ -19,30 +19,292 @@
|
|
|
19
19
|
</section>
|
|
20
20
|
|
|
21
21
|
<section class="main-content">
|
|
22
|
-
<
|
|
22
|
+
<h1>
|
|
23
|
-
<a id="
|
|
23
|
+
<a id="deprecated" class="anchor" href="#deprecated" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Deprecated</h1>
|
|
24
24
|
|
|
25
|
-
<p>
|
|
25
|
+
<p>Please use <a href="https://github.com/UnderwaterApps/overlap2d">https://github.com/UnderwaterApps/overlap2d</a> instead. This project could have done pretty well but I didn't get enough time for complete it. Plus since I joined the startup culture I don't get much time to work on open source projects anymore. But the <strong>Idea</strong> was
|
|
26
|
+
really good and you know you could create games in java and json just like that. I thought of crowdfunding this at kickstarter as it seemed pretty good when it was working on my system but then I found out kickstarter is for US citizens only so that was a bummer. Then the I joined Playlyfe. And from then on it was something on the lines like this,</p>
|
|
26
27
|
|
|
27
|
-
<
|
|
28
|
-
<a
|
|
28
|
+
<blockquote>
|
|
29
|
+
<p>I am a busy guy. When I first started this I was out of college searching for a job and had a lot of free time, which is way different from being in The Real World today.
|
|
30
|
+
My life consists of waking up -> getting stuck in a traffic -> working for 4 hours -> lunch for an hour -> working for 5 more hours -> getting stuck in traffic on the way home -> shower and sleep -> repeat 5 days a week. On weekends I have to run errands and research to stay competitive in an incredibly cut throat industry. I have very little time to spare.
|
|
31
|
+
An Excerpt taken from <a href="http://lazyfoo.net/contact.php">http://lazyfoo.net/contact.php</a></p>
|
|
32
|
+
</blockquote>
|
|
29
33
|
|
|
30
|
-
<
|
|
34
|
+
<h2>
|
|
35
|
+
<a id="gdxstudio-071" class="anchor" href="#gdxstudio-071" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>GdxStudio 0.7.1</h2>
|
|
31
36
|
|
|
32
|
-
<
|
|
37
|
+
<p>GdxStudio is used for creating awesome games using libGdx.<br>
|
|
38
|
+
It has all the features of libgdx built-in so you can easily,start creating games with it.<br>
|
|
39
|
+
Tools like Font Editor, Particle Editor, Texture Packer, SceneEditor, MapEditor, ActorEditor, ImagingTools are already built into it.
|
|
40
|
+
It also has a powerful Game Framework based on libGDX inbuilt which allows the game coder to concentrate on the logic of the game and not bother about setting up assets or configuration.<br>
|
|
41
|
+
Automatic Asset Loading including Atlas, TextureRegions, BitmapFonts, Music, Sound.<br>
|
|
33
|
-
|
|
42
|
+
It has the libGdx(v0.9.9) inside it so you don't need to download the libGdx at all, when exporting your game to jar for desktop it automatically loads these libraries into it. </p>
|
|
34
43
|
|
|
35
|
-
<p>
|
|
44
|
+
<p>(Will update this project to latest libgdx since I might get some time to work on this again and fix those issues)</p>
|
|
36
45
|
|
|
37
|
-
<
|
|
46
|
+
<blockquote>
|
|
38
|
-
<
|
|
47
|
+
<p><strong>Disclaimer</strong> This is not an official libdgx project so don't ask them for bug fixes </p>
|
|
48
|
+
</blockquote>
|
|
39
49
|
|
|
40
|
-
<p>
|
|
50
|
+
<p><a href="https://github.com/pyros2097/GdxStudio/wiki">See the Wiki for more details</a> </p>
|
|
41
51
|
|
|
42
|
-
<
|
|
52
|
+
<h2>
|
|
43
|
-
<a id="
|
|
53
|
+
<a id="features" class="anchor" href="#features" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Features</h2>
|
|
44
54
|
|
|
45
|
-
<p>
|
|
55
|
+
<p><strong>1. Automatic Build System</strong><br>
|
|
56
|
+
Uses an Batch Builder system based on eclipse, so on the fly building so you can instantly
|
|
57
|
+
run or debug your application. Using the famous Eclipse Java Compiler(ECJ).<br>
|
|
58
|
+
<strong>2. Automatic File Saving</strong><br>
|
|
59
|
+
All Files are automatically save when you switch tabs or change views. No more wasting time pressing
|
|
60
|
+
CTRL+S or clicking the save button (inspired by Xcode).<br>
|
|
61
|
+
<strong>3. Source Editor</strong><br>
|
|
62
|
+
An eclipse like editor which supports code completion, batch compiling and compile errors as you type.<br>
|
|
63
|
+
<strong>4. Scene Editor</strong><br>
|
|
64
|
+
Completely design your game scenes with effects using the scene editor and access these components
|
|
65
|
+
in the source editor and add your logic code. Your scenes are saved in scene.json file is automatically loaded.<br>
|
|
66
|
+
<strong>5. Map Editor</strong><br>
|
|
67
|
+
All your game maps can be designed using it. This supports 3 map layers and 3 object layers.
|
|
68
|
+
You can drag and drop your custom actors/objects onto the map. There is no fixed size for a map.
|
|
69
|
+
Each tile can be anything you want it to be.<br>
|
|
70
|
+
<strong>6. Actor Editor</strong><br>
|
|
71
|
+
You can create custom actors/objects which consist of the basic widgets like images, sprites etc.
|
|
72
|
+
And you can drag and drop these into your game scenes and maps. Makes it easier instead of doing it by code.<br>
|
|
73
|
+
<strong>7. Export</strong><br>
|
|
74
|
+
All the libgdx libraries and class files are directly exported to your package.
|
|
75
|
+
Your game can be exported to jar for Desktop, apk for android and ipa for iOS<br>
|
|
76
|
+
<strong>8. Platform Independent</strong><br>
|
|
77
|
+
Write Once Deploy Everywhere. You only need to write you game logic for one platform, cross building
|
|
78
|
+
for different platforms and exporting is done automatically.(android and ios not done)<br>
|
|
79
|
+
<strong>9. Dynamic Compilation</strong><br>
|
|
80
|
+
You can edit your scenes and add logic to your game and at the same time see the outcome in the studio.
|
|
81
|
+
Your source files are automatically compiled and loaded into the class loader and displayed in the studio.
|
|
82
|
+
So your don't need to follow the monotonous approach compile->build->run exe. This saves a lot of time. </p>
|
|
83
|
+
|
|
84
|
+
<h2>
|
|
85
|
+
<a id="using" class="anchor" href="#using" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Using</h2>
|
|
86
|
+
|
|
87
|
+
<div class="highlight highlight-source-java"><pre> <span class="pl-c">//This is our first Scene and it shows the libgdx logo until all the assets are loaded </span>
|
|
88
|
+
<span class="pl-c">//then it automatically switches to the Menu scene</span>
|
|
89
|
+
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">Splash</span> <span class="pl-k">extends</span> <span class="pl-e">Scene</span> {
|
|
90
|
+
|
|
91
|
+
<span class="pl-k">public</span> <span class="pl-en">Splash</span>() {
|
|
92
|
+
splashDuration <span class="pl-k">=</span> <span class="pl-c1">5f</span>; <span class="pl-c">// This will make my splash scene to wait 5 seconds after assets are all loaded</span>
|
|
93
|
+
<span class="pl-k">final</span> <span class="pl-smi">Texture</span> bg1 <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-smi">Texture</span>(<span class="pl-s"><span class="pl-pds">"</span>splash/libgdx.png<span class="pl-pds">"</span></span>);
|
|
94
|
+
<span class="pl-k">final</span> <span class="pl-smi">Image</span> imgbg1 <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-smi">Image</span>(bg1);
|
|
95
|
+
imgbg1<span class="pl-k">.</span>setFillParent(<span class="pl-c1">true</span>);
|
|
96
|
+
addActor(imgbg1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
<span class="pl-c">//This is Scene gets called once the assets are loaded</span>
|
|
101
|
+
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">Menu</span> <span class="pl-k">extends</span> <span class="pl-e">Scene</span> {
|
|
102
|
+
|
|
103
|
+
<span class="pl-k">public</span> <span class="pl-en">Menu</span>() {
|
|
104
|
+
<span class="pl-c">//create some actors</span>
|
|
105
|
+
<span class="pl-c">// if you used sink studio and create a scene like Menu.json then</span>
|
|
106
|
+
<span class="pl-c">// it will automatically call load("Menu") it will populate your scene after parsing the json file</span>
|
|
107
|
+
|
|
108
|
+
<span class="pl-c">//you can access these objects like this</span>
|
|
109
|
+
<span class="pl-smi">TextButton</span> btn <span class="pl-k">=</span> (<span class="pl-smi">TextButton</span>) findActor(<span class="pl-s"><span class="pl-pds">"</span>TextButton1<span class="pl-pds">"</span></span>);
|
|
110
|
+
<span class="pl-smi">Image</span> img <span class="pl-k">=</span> (<span class="pl-smi">Image</span>) findActor(<span class="pl-s"><span class="pl-pds">"</span>Image5<span class="pl-pds">"</span></span>);
|
|
111
|
+
|
|
112
|
+
<span class="pl-c">// these actors are loaded from the json file and are give names which allows</span>
|
|
113
|
+
<span class="pl-c">// easy access to them</span>
|
|
114
|
+
}
|
|
115
|
+
}</pre></div>
|
|
116
|
+
|
|
117
|
+
<h2>
|
|
118
|
+
<a id="todo" class="anchor" href="#todo" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Todo</h2>
|
|
119
|
+
|
|
120
|
+
<ol>
|
|
121
|
+
<li>MapEditor</li>
|
|
122
|
+
<li>ActorEditor</li>
|
|
123
|
+
<li>Automatic Updates</li>
|
|
124
|
+
<li>Make a signals/slots method for connecting actors with events (maybe make an interpreter)</li>
|
|
125
|
+
</ol>
|
|
126
|
+
|
|
127
|
+
<h2>
|
|
128
|
+
<a id="credits" class="anchor" href="#credits" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Credits</h2>
|
|
129
|
+
|
|
130
|
+
<p>Thanks to all these awesome frameworks<br>
|
|
131
|
+
<a href="http://libgdx.badlogicgames.com">Libgdx</a><br>
|
|
132
|
+
<a href="http://weblookandfeel.com">WebLookAndFeel</a><br>
|
|
133
|
+
<a href="http://fifesoft.com/rsyntaxtextarea">RSyntaxTextArea</a><br>
|
|
134
|
+
<a href="https://github.com/pyros2097/WebLookAndFeelLite">WebLookAndFeelLite</a><br>
|
|
135
|
+
<a href="https://github.com/pyros2097/Scene3d">Scene3d</a><br>
|
|
136
|
+
<a href="https://github.com/pyros2097/Sink">Sink</a><br>
|
|
137
|
+
<a href="http://download.eclipse.org/eclipse/downloads/">EclipseCompiler</a><br>
|
|
138
|
+
<a href="http://www.antlr.org/">ANTLR</a><br>
|
|
139
|
+
<a href="http://proguard.sourceforge.net">ProGuard</a> </p>
|
|
140
|
+
|
|
141
|
+
<h2>
|
|
142
|
+
<a id="screenshots" class="anchor" href="#screenshots" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Screenshots</h2>
|
|
143
|
+
|
|
144
|
+
<p><img src="https://github.com/pyros2097/GdxStudio/raw/master/shots/shot2.png">
|
|
145
|
+
<img src="https://github.com/pyros2097/GdxStudio/raw/master/shots/shot3.png">
|
|
146
|
+
<img src="https://github.com/pyros2097/GdxStudio/raw/master/shots/shot4.png">
|
|
147
|
+
<img src="https://github.com/pyros2097/GdxStudio/raw/master/shots/shot5.png">
|
|
148
|
+
<img src="https://github.com/pyros2097/GdxStudio/raw/master/shots/shot6.png"></p>
|
|
149
|
+
|
|
150
|
+
<h2>
|
|
151
|
+
<a id="documentation" class="anchor" href="#documentation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Documentation</h2>
|
|
152
|
+
|
|
153
|
+
<h2>
|
|
154
|
+
<a id="scene" class="anchor" href="#scene" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Scene</h2>
|
|
155
|
+
|
|
156
|
+
<pre><code><p>
|
|
157
|
+
It consists of a single Stage2d, Stage3d, Camera2d, and Camera3d which are all initialized based on the config file.
|
|
158
|
+
The root of the stage can be accessed in a statically {@link Scene#getRoot()} and methods related to camera like moveTo, moveBy,
|
|
159
|
+
are also accessed the same way.<br>
|
|
160
|
+
It has extra things like stateTime, gameUptime, pauseState<br>
|
|
161
|
+
|
|
162
|
+
It has automatic asset unloading and disposing and you can use {@link #exit()} to quit your game safely
|
|
163
|
+
|
|
164
|
+
Note: Your TMX maps have to be unloaded manually as they can be huge resources needing to be freed early.
|
|
165
|
+
|
|
166
|
+
It has static methods which can be used for panning the camera using mouse, keyboard, drag.. etc.
|
|
167
|
+
It can also automatically follow a actor by using followActor(Actor actor)<br>
|
|
168
|
+
|
|
169
|
+
This class will register all your scenes based on your scene.json file and then you can switch you scenes by using {@link #setScene}
|
|
170
|
+
method with the sceneClassName.<br>
|
|
171
|
+
All your assets are loaded in the background(asynchronously) in the first scene and then automatically
|
|
172
|
+
the next scene in the list is set.
|
|
173
|
+
You can stop the stage from switching to the next scene by setting Asset.loadAsynchronous = false in your first scene but then
|
|
174
|
+
you have to load all the assets by using the blocking call Asset.loadBlocking()
|
|
175
|
+
|
|
176
|
+
If you want to display your splash screen for more time after the assets have loaded then you can change
|
|
177
|
+
Stage.splashDuration to the amount of time you want you splash screen to show. By default the splash screen's
|
|
178
|
+
lifetime is finished once the assets are loaded and then the next scene is set.
|
|
179
|
+
</p>
|
|
180
|
+
</code></pre>
|
|
181
|
+
|
|
182
|
+
<h2>
|
|
183
|
+
<a id="camera" class="anchor" href="#camera" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Camera</h2>
|
|
184
|
+
|
|
185
|
+
<div class="highlight highlight-source-java"><pre><span class="pl-c">/*</span>
|
|
186
|
+
<span class="pl-c"> * This is to set the offsets of camera position when following the actor</span>
|
|
187
|
+
<span class="pl-c"> * When the camera follows the actor its (x,y) position is set to actor's (x,y) position</span>
|
|
188
|
+
<span class="pl-c"> * based on followSpeed. The offsets are used to position the camera in such a way that the actor</span>
|
|
189
|
+
<span class="pl-c"> * doesn't need to be at the center of the camera always</span>
|
|
190
|
+
<span class="pl-c"> */</span>
|
|
191
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">Rectangle</span> followOffset;
|
|
192
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">boolean</span> usePan;
|
|
193
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">boolean</span> useDrag;
|
|
194
|
+
|
|
195
|
+
<span class="pl-c">/*</span>
|
|
196
|
+
<span class="pl-c"> * This sets the boundary of the camera till what position can it move or pan in the</span>
|
|
197
|
+
<span class="pl-c"> * directions left, right, top, down. This is to prevent is from panning overboard the game area.</span>
|
|
198
|
+
<span class="pl-c"> * Usually the bounds of the camera is like a rectangle. This must be calculated carefully</span>
|
|
199
|
+
<span class="pl-c"> * as the camera's position is based on its center.</span>
|
|
200
|
+
<span class="pl-c">*/</span>
|
|
201
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">Rectangle</span> bounds;
|
|
202
|
+
|
|
203
|
+
<span class="pl-c">/*</span>
|
|
204
|
+
<span class="pl-c"> * Moves the camera to x,y over a time duration</span>
|
|
205
|
+
<span class="pl-c"> */</span>
|
|
206
|
+
<span class="pl-k">public</span> <span class="pl-k">void</span> moveTo(<span class="pl-k">float</span> x, <span class="pl-k">float</span> y, <span class="pl-k">float</span> duration);
|
|
207
|
+
|
|
208
|
+
<span class="pl-c">/*</span>
|
|
209
|
+
<span class="pl-c"> * Moves the camera by amountX, amountY over a time duration</span>
|
|
210
|
+
<span class="pl-c"> */</span>
|
|
211
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> moveBy (<span class="pl-k">float</span> amountX, <span class="pl-k">float</span> amountY, <span class="pl-k">float</span> duration);
|
|
212
|
+
|
|
213
|
+
<span class="pl-c">/*</span>
|
|
214
|
+
<span class="pl-c"> * Moves the camera by amountX, amountY over a time duration and interpolation interp</span>
|
|
215
|
+
<span class="pl-c"> */</span>
|
|
216
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> moveBy (<span class="pl-k">float</span> amountX, <span class="pl-k">float</span> amountY, <span class="pl-k">float</span> dur, <span class="pl-smi">Interpolation</span> interp);
|
|
217
|
+
<span class="pl-c">/*</span>
|
|
218
|
+
<span class="pl-c"> * This makes the camera follow the actor once and only once. Once the camera reaches its</span>
|
|
219
|
+
<span class="pl-c"> * target, it stops following the actor.</span>
|
|
220
|
+
<span class="pl-c"> */</span>
|
|
221
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> followActor(<span class="pl-smi">Actor</span> actor);
|
|
222
|
+
<span class="pl-c">/*</span>
|
|
223
|
+
<span class="pl-c"> * This makes the camera follow the actor continuously, even after the camera reaches its</span>
|
|
224
|
+
<span class="pl-c"> * target, it keeps following the if the actor changes its position.</span>
|
|
225
|
+
<span class="pl-c"> */</span>
|
|
226
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> followActorContinuously(<span class="pl-smi">Actor</span> actor);
|
|
227
|
+
<span class="pl-c">/*</span>
|
|
228
|
+
<span class="pl-c"> * Sets the speed at which the camera follows the actor. By default it moves 1px for a duration of 1f</span>
|
|
229
|
+
<span class="pl-c"> * so its speed is 1px/f. So reduce the duration to increase its speed.</span>
|
|
230
|
+
<span class="pl-c"> * ex: setPanSpeed(0.5) will change its speed to 2px/f</span>
|
|
231
|
+
<span class="pl-c"> * Here: f can/maybe also indicate seconds</span>
|
|
232
|
+
<span class="pl-c"> */</span>
|
|
233
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> setFollowSpeed(<span class="pl-k">float</span> duration);
|
|
234
|
+
|
|
235
|
+
<span class="pl-c">/*</span>
|
|
236
|
+
<span class="pl-c"> * Sets the speed at which the camera pans. By default it moves 1px for a duration a 1f</span>
|
|
237
|
+
<span class="pl-c"> * so its speed is 1px/f. So reduce the duration to increase its speed.</span>
|
|
238
|
+
<span class="pl-c"> * ex: setPanSpeed(0.5) will change its speed to 2px/f</span>
|
|
239
|
+
<span class="pl-c"> * Here: f can/maybe also indicate seconds </span>
|
|
240
|
+
<span class="pl-c"> */</span>
|
|
241
|
+
<span class="pl-k">public</span> <span class="pl-k">void</span> setPanSpeed(<span class="pl-k">float</span> duration);
|
|
242
|
+
|
|
243
|
+
<span class="pl-c">/* If you want to make any elements/actors to move along with the camera </span>
|
|
244
|
+
<span class="pl-c"> * like HUD's add them using this method */</span>
|
|
245
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> addHud(<span class="pl-smi">Actor</span> actor);
|
|
246
|
+
|
|
247
|
+
<span class="pl-c">/* If you want to any elements/actors which was a Hud the use this */</span>
|
|
248
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> removeHud(<span class="pl-smi">Actor</span> actor);
|
|
249
|
+
|
|
250
|
+
<span class="pl-c">/*</span>
|
|
251
|
+
<span class="pl-c"> * Clears all hud's registerd with the camera</span>
|
|
252
|
+
<span class="pl-c"> */</span>
|
|
253
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">void</span> clearAllHud();
|
|
254
|
+
|
|
255
|
+
<span class="pl-c">/*</span>
|
|
256
|
+
<span class="pl-c"> * Returns the x postion of the camera</span>
|
|
257
|
+
<span class="pl-c"> */</span>
|
|
258
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">float</span> getX();
|
|
259
|
+
<span class="pl-c">/*</span>
|
|
260
|
+
<span class="pl-c"> * Returns the y postion of the camera</span>
|
|
261
|
+
<span class="pl-c"> */</span>
|
|
262
|
+
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">float</span> getY(); </pre></div>
|
|
263
|
+
|
|
264
|
+
<h2>
|
|
265
|
+
<a id="asset" class="anchor" href="#asset" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Asset</h2>
|
|
266
|
+
|
|
267
|
+
<p><b>#Important </b> <br>
|
|
268
|
+
All asset files must be lowercase only.. otherwise it causes problems with android <br>
|
|
269
|
+
Automatic Asset Loading the directory Structure should be like this <br>
|
|
270
|
+
This class automatically loads all the assets in the prescribed folders into the appropriate
|
|
271
|
+
class types. All This can be accessed using an neat api.</p>
|
|
272
|
+
|
|
273
|
+
<p>icon.png --- your game icon to be displayed on the window<br>
|
|
274
|
+
atlas/ --- all your Texture Atlas files .atlas and .png go here<br>
|
|
275
|
+
font/ --- all your BitmapFont files .fnt and .png go here<br>
|
|
276
|
+
music/ --- all your Music files .mp3 go here<br>
|
|
277
|
+
sound/ --- all your Music files .mp3 go here<br>
|
|
278
|
+
particle/ --- all your Particle files .part go here<br>
|
|
279
|
+
map/ --- all your TMX map files along with tilesets go here<br>
|
|
280
|
+
pack/ --- all your image files which are to be packed are to be stored here<br>
|
|
281
|
+
so that they are automatically packed by the texture packer and stored in
|
|
282
|
+
the atlas folder</p>
|
|
283
|
+
|
|
284
|
+
<p>All the assets are read from their particular folders and an asset.json file is created with
|
|
285
|
+
the filenames:
|
|
286
|
+
ex: asset.json<br>
|
|
287
|
+
{
|
|
288
|
+
"font": "arial.fnt, font1",
|
|
289
|
+
"atlas": "image.atlas",
|
|
290
|
+
"sound": "click.mp3,gg.mp3",
|
|
291
|
+
"music": "title.mp3,"bg.mp3",
|
|
292
|
+
}</p>
|
|
293
|
+
|
|
294
|
+
<div class="highlight highlight-source-java"><pre><span class="pl-c">//All assets are accessed this way, To load TextureRegion</span>
|
|
295
|
+
<span class="pl-smi">TextureRegion</span> cat <span class="pl-k">=</span> <span class="pl-smi">Asset</span><span class="pl-k">.</span>tex(<span class="pl-s"><span class="pl-pds">"</span>cat<span class="pl-pds">"</span></span>);
|
|
296
|
+
|
|
297
|
+
<span class="pl-c">//To load Animation</span>
|
|
298
|
+
<span class="pl-smi">Animation</span> catAnim <span class="pl-k">=</span> <span class="pl-smi">Asset</span><span class="pl-k">.</span>anim(<span class="pl-s"><span class="pl-pds">"</span>cat<span class="pl-pds">"</span></span>);
|
|
299
|
+
<span class="pl-smi">BitmapFont</span> font1 <span class="pl-k">=</span> <span class="pl-smi">Asset</span><span class="pl-k">.</span>font(<span class="pl-s"><span class="pl-pds">"</span>font1<span class="pl-pds">"</span></span>);
|
|
300
|
+
|
|
301
|
+
<span class="pl-c">//The music and sound files are automatically cached and can be played by invoking:</span>
|
|
302
|
+
<span class="pl-smi">Asset</span><span class="pl-k">.</span>musicPlay(<span class="pl-s"><span class="pl-pds">"</span>musicname<span class="pl-pds">"</span></span>);
|
|
303
|
+
<span class="pl-smi">Asset</span><span class="pl-k">.</span>soundPlay(<span class="pl-s"><span class="pl-pds">"</span>soundname<span class="pl-pds">"</span></span>);
|
|
304
|
+
|
|
305
|
+
<span class="pl-c">//The asset functions will return null for Font, TextureRegion and Animation if the asset cannot be found</span></pre></div>
|
|
306
|
+
|
|
307
|
+
<p><a href="https://bitdeli.com/free" title="Bitdeli Badge"><img src="https://d2weczhvl823v0.cloudfront.net/pyros2097/gdxstudio/trend.png" alt="Bitdeli Badge"></a></p>
|
|
46
308
|
|
|
47
309
|
<footer class="site-footer">
|
|
48
310
|
<span class="site-footer-owner"><a href="https://github.com/pyros2097/GdxStudio">Gdxstudio</a> is maintained by <a href="https://github.com/pyros2097">pyros2097</a>.</span>
|
params.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Gdxstudio",
|
|
3
3
|
"tagline": "An IDE for creating Games using libGDx and Java supported on all platforms Android, iOS, Desktop",
|
|
4
|
-
"body": "### Welcome to GitHub Pages.\r\nThis automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here [using GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/), select a template crafted by a designer, and publish. After your page is generated, you can check out the new `gh-pages` branch locally. If you’re using GitHub Desktop, simply sync your repository and you’ll see the new branch.\r\n\r\n### Designer Templates\r\nWe’ve crafted some handsome templates for you to use. Go ahead and click 'Continue to layouts' to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved.\r\n\r\n### Creating pages manually\r\nIf you prefer to not use the automatic generator, push a branch named `gh-pages` to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.\r\n\r\n### Authors and Contributors\r\nYou can @mention a GitHub username to generate a link to their profile. The resulting `<a>` element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out our [documentation](https://help.github.com/pages) or [contact support](https://github.com/contact) and we’ll help you sort it out.\r\n",
|
|
4
|
+
"body": "#Deprecated\r\nPlease use https://github.com/UnderwaterApps/overlap2d instead. This project could have done pretty well but I didn't get enough time for complete it. Plus since I joined the startup culture I don't get much time to work on open source projects anymore. But the **Idea** was\r\nreally good and you know you could create games in java and json just like that. I thought of crowdfunding this at kickstarter as it seemed pretty good when it was working on my system but then I found out kickstarter is for US citizens only so that was a bummer. Then the I joined Playlyfe. And from then on it was something on the lines like this,\r\n\r\n>\r\nI am a busy guy. When I first started this I was out of college searching for a job and had a lot of free time, which is way different from being in The Real World today.\r\nMy life consists of waking up -> getting stuck in a traffic -> working for 4 hours -> lunch for an hour -> working for 5 more hours -> getting stuck in traffic on the way home -> shower and sleep -> repeat 5 days a week. On weekends I have to run errands and research to stay competitive in an incredibly cut throat industry. I have very little time to spare.\r\nAn Excerpt taken from http://lazyfoo.net/contact.php\r\n\r\n## GdxStudio 0.7.1\r\nGdxStudio is used for creating awesome games using libGdx. \r\nIt has all the features of libgdx built-in so you can easily,start creating games with it. \r\nTools like Font Editor, Particle Editor, Texture Packer, SceneEditor, MapEditor, ActorEditor, ImagingTools are already built into it. \r\nIt also has a powerful Game Framework based on libGDX inbuilt which allows the game coder to concentrate on the logic of the game and not bother about setting up assets or configuration. \r\nAutomatic Asset Loading including Atlas, TextureRegions, BitmapFonts, Music, Sound. \r\nIt has the libGdx(v0.9.9) inside it so you don't need to download the libGdx at all, when exporting your game to jar for desktop it automatically loads these libraries into it. \r\n\r\n(Will update this project to latest libgdx since I might get some time to work on this again and fix those issues)\r\n\r\n>**Disclaimer** This is not an official libdgx project so don't ask them for bug fixes \r\n\r\n[See the Wiki for more details](https://github.com/pyros2097/GdxStudio/wiki) \r\n\r\nFeatures\r\n---------\r\n**1. Automatic Build System** \r\nUses an Batch Builder system based on eclipse, so on the fly building so you can instantly\r\nrun or debug your application. Using the famous Eclipse Java Compiler(ECJ). \r\n**2. Automatic File Saving** \r\nAll Files are automatically save when you switch tabs or change views. No more wasting time pressing\r\nCTRL+S or clicking the save button (inspired by Xcode). \r\n**3. Source Editor** \r\nAn eclipse like editor which supports code completion, batch compiling and compile errors as you type. \r\n**4. Scene Editor** \r\nCompletely design your game scenes with effects using the scene editor and access these components \r\nin the source editor and add your logic code. Your scenes are saved in scene.json file is automatically loaded. \r\n**5. Map Editor** \r\nAll your game maps can be designed using it. This supports 3 map layers and 3 object layers. \r\nYou can drag and drop your custom actors/objects onto the map. There is no fixed size for a map. \r\nEach tile can be anything you want it to be. \r\n**6. Actor Editor** \r\nYou can create custom actors/objects which consist of the basic widgets like images, sprites etc.\r\nAnd you can drag and drop these into your game scenes and maps. Makes it easier instead of doing it by code. \r\n**7. Export** \r\nAll the libgdx libraries and class files are directly exported to your package.\r\nYour game can be exported to jar for Desktop, apk for android and ipa for iOS \r\n**8. Platform Independent** \r\nWrite Once Deploy Everywhere. You only need to write you game logic for one platform, cross building\r\nfor different platforms and exporting is done automatically.(android and ios not done) \r\n**9. Dynamic Compilation** \r\nYou can edit your scenes and add logic to your game and at the same time see the outcome in the studio.\r\nYour source files are automatically compiled and loaded into the class loader and displayed in the studio.\r\nSo your don't need to follow the monotonous approach compile->build->run exe. This saves a lot of time. \r\n\r\nUsing\r\n------\r\n```java\r\n //This is our first Scene and it shows the libgdx logo until all the assets are loaded \r\n //then it automatically switches to the Menu scene\r\n public class Splash extends Scene {\r\n\t\t\r\n\t\tpublic Splash() {\r\n\t\t\tsplashDuration = 5f; // This will make my splash scene to wait 5 seconds after assets are all loaded\r\n\t\t\tfinal Texture bg1 = new Texture(\"splash/libgdx.png\");\r\n\t\t\tfinal Image imgbg1 = new Image(bg1);\r\n\t\t\timgbg1.setFillParent(true);\r\n\t\t\taddActor(imgbg1);\r\n\t } \r\n }\r\n \r\n //This is Scene gets called once the assets are loaded\r\n public class Menu extends Scene {\r\n \r\n\t\tpublic Menu() {\r\n\t\t\t//create some actors\r\n\t\t\t// if you used sink studio and create a scene like Menu.json then\r\n\t\t\t// it will automatically call load(\"Menu\") it will populate your scene after parsing the json file\r\n\t\t\t\r\n\t\t\t//you can access these objects like this\r\n\t\t\tTextButton btn = (TextButton) findActor(\"TextButton1\");\r\n\t\t\tImage img = (Image) findActor(\"Image5\");\r\n\t\t\t\r\n\t\t\t// these actors are loaded from the json file and are give names which allows\r\n\t\t\t// easy access to them\r\n\t\t}\r\n\t}\r\n```\t\t\t\t \t \t\t\t\t\t \t \t\t\t\t\t \t\r\nTodo\r\n-----\r\n1. MapEditor\r\n2. ActorEditor\r\n3. Automatic Updates\r\n4. Make a signals/slots method for connecting actors with events (maybe make an interpreter)\r\n\r\nCredits\r\n--------\r\nThanks to all these awesome frameworks \r\n[Libgdx](http://libgdx.badlogicgames.com) \r\n[WebLookAndFeel](http://weblookandfeel.com) \r\n[RSyntaxTextArea](http://fifesoft.com/rsyntaxtextarea) \r\n[WebLookAndFeelLite](https://github.com/pyros2097/WebLookAndFeelLite) \r\n[Scene3d](https://github.com/pyros2097/Scene3d) \r\n[Sink](https://github.com/pyros2097/Sink) \r\n[EclipseCompiler](http://download.eclipse.org/eclipse/downloads/) \r\n[ANTLR](http://www.antlr.org/) \r\n[ProGuard](http://proguard.sourceforge.net) \r\n\r\nScreenshots\r\n-----------\r\n<img src = \"https://github.com/pyros2097/GdxStudio/raw/master/shots/shot2.png\">\r\n<img src = \"https://github.com/pyros2097/GdxStudio/raw/master/shots/shot3.png\">\r\n<img src = \"https://github.com/pyros2097/GdxStudio/raw/master/shots/shot4.png\">\r\n<img src = \"https://github.com/pyros2097/GdxStudio/raw/master/shots/shot5.png\">\r\n<img src = \"https://github.com/pyros2097/GdxStudio/raw/master/shots/shot6.png\">\r\n\r\nDocumentation\r\n-------------\r\nScene\r\n-----\r\n```\r\n<p>\r\nIt consists of a single Stage2d, Stage3d, Camera2d, and Camera3d which are all initialized based on the config file.\r\nThe root of the stage can be accessed in a statically {@link Scene#getRoot()} and methods related to camera like moveTo, moveBy,\r\nare also accessed the same way.<br>\r\nIt has extra things like stateTime, gameUptime, pauseState<br>\r\n\r\nIt has automatic asset unloading and disposing and you can use {@link #exit()} to quit your game safely\r\n\r\nNote: Your TMX maps have to be unloaded manually as they can be huge resources needing to be freed early.\r\n\r\nIt has static methods which can be used for panning the camera using mouse, keyboard, drag.. etc.\r\nIt can also automatically follow a actor by using followActor(Actor actor)<br>\r\n\r\nThis class will register all your scenes based on your scene.json file and then you can switch you scenes by using {@link #setScene}\r\nmethod with the sceneClassName.<br>\r\nAll your assets are loaded in the background(asynchronously) in the first scene and then automatically \r\nthe next scene in the list is set.\r\nYou can stop the stage from switching to the next scene by setting Asset.loadAsynchronous = false in your first scene but then\r\nyou have to load all the assets by using the blocking call Asset.loadBlocking()\r\n\r\nIf you want to display your splash screen for more time after the assets have loaded then you can change\r\nStage.splashDuration to the amount of time you want you splash screen to show. By default the splash screen's\r\nlifetime is finished once the assets are loaded and then the next scene is set.\r\n</p>\r\n```\r\nCamera\r\n------\r\n```java\r\n/*\r\n * This is to set the offsets of camera position when following the actor\r\n * When the camera follows the actor its (x,y) position is set to actor's (x,y) position\r\n * based on followSpeed. The offsets are used to position the camera in such a way that the actor\r\n * doesn't need to be at the center of the camera always\r\n */\r\npublic static Rectangle followOffset;\r\npublic static boolean usePan;\r\npublic static boolean useDrag;\r\n\r\n/*\r\n * This sets the boundary of the camera till what position can it move or pan in the\r\n * directions left, right, top, down. This is to prevent is from panning overboard the game area.\r\n * Usually the bounds of the camera is like a rectangle. This must be calculated carefully\r\n * as the camera's position is based on its center.\r\n*/\r\npublic static Rectangle bounds;\r\n\r\n/*\r\n * Moves the camera to x,y over a time duration\r\n */\r\npublic void moveTo(float x, float y, float duration);\r\n\r\n/*\r\n * Moves the camera by amountX, amountY over a time duration\r\n */\r\npublic static void moveBy (float amountX, float amountY, float duration);\r\n\r\n/*\r\n * Moves the camera by amountX, amountY over a time duration and interpolation interp\r\n */\r\npublic static void moveBy (float amountX, float amountY, float dur, Interpolation interp);\r\n/*\r\n * This makes the camera follow the actor once and only once. Once the camera reaches its\r\n * target, it stops following the actor.\r\n */\r\npublic static void followActor(Actor actor);\r\n/*\r\n * This makes the camera follow the actor continuously, even after the camera reaches its\r\n * target, it keeps following the if the actor changes its position.\r\n */\r\npublic static void followActorContinuously(Actor actor);\r\n/*\r\n * Sets the speed at which the camera follows the actor. By default it moves 1px for a duration of 1f\r\n * so its speed is 1px/f. So reduce the duration to increase its speed.\r\n * ex: setPanSpeed(0.5) will change its speed to 2px/f\r\n * Here: f can/maybe also indicate seconds\r\n */\r\npublic static void setFollowSpeed(float duration);\r\n\r\n/*\r\n * Sets the speed at which the camera pans. By default it moves 1px for a duration a 1f\r\n * so its speed is 1px/f. So reduce the duration to increase its speed.\r\n * ex: setPanSpeed(0.5) will change its speed to 2px/f\r\n * Here: f can/maybe also indicate seconds \r\n */\r\npublic void setPanSpeed(float duration);\r\n\r\n/* If you want to make any elements/actors to move along with the camera \r\n * like HUD's add them using this method */\r\npublic static void addHud(Actor actor);\r\n\r\n/* If you want to any elements/actors which was a Hud the use this */\r\npublic static void removeHud(Actor actor);\r\n\r\n/*\r\n * Clears all hud's registerd with the camera\r\n */\r\npublic static void clearAllHud();\r\n\r\n/*\r\n * Returns the x postion of the camera\r\n */\r\npublic static float getX();\r\n/*\r\n * Returns the y postion of the camera\r\n */\r\npublic static float getY();\t\t\r\n```\r\nAsset\r\n-----\r\n<b>#Important </b> <br>\r\nAll asset files must be lowercase only.. otherwise it causes problems with android <br> \r\nAutomatic Asset Loading the directory Structure should be like this <br>\r\nThis class automatically loads all the assets in the prescribed folders into the appropriate \r\nclass types. All This can be accessed using an neat api.\r\n\r\nicon.png --- your game icon to be displayed on the window<br>\r\natlas/ --- all your Texture Atlas files .atlas and .png go here<br>\r\nfont/ --- all your BitmapFont files .fnt and .png go here<br>\r\nmusic/ --- all your Music files .mp3 go here<br>\r\nsound/ --- all your Music files .mp3 go here<br>\r\nparticle/ --- all your Particle files .part go here<br>\r\nmap/ --- all your TMX map files along with tilesets go here<br>\r\npack/ --- all your image files which are to be packed are to be stored here<br>\r\n \t\t\t\t\t so that they are automatically packed by the texture packer and stored in\r\n \t\t\t\t\t the atlas folder\r\n \t\t\t\t\t \r\nAll the assets are read from their particular folders and an asset.json file is created with\r\nthe filenames:\r\nex: asset.json \t\t\t\r\n\t{ \r\n\t \t\"font\": \"arial.fnt, font1\",\r\n \t\t\"atlas\": \"image.atlas\",\r\n \t\t\"sound\": \"click.mp3,gg.mp3\",\r\n \t\t\"music\": \"title.mp3,\"bg.mp3\",\r\n\t}\r\n```java\r\n//All assets are accessed this way, To load TextureRegion\r\nTextureRegion cat = Asset.tex(\"cat\");\r\n\r\n//To load Animation\r\nAnimation catAnim = Asset.anim(\"cat\");\r\nBitmapFont font1 = Asset.font(\"font1\");\r\n\r\n//The music and sound files are automatically cached and can be played by invoking:\r\nAsset.musicPlay(\"musicname\");\r\nAsset.soundPlay(\"soundname\");\r\n\r\n//The asset functions will return null for Font, TextureRegion and Animation if the asset cannot be found\r\n```\r\n\r\n[](https://bitdeli.com/free \"Bitdeli Badge\")\r\n\r\n",
|
|
5
5
|
"note": "Don't delete this file! It's used internally to help with page regeneration."
|
|
6
6
|
}
|