~repos /gdx-studio

#libgdx#java#desktop

git clone https://pyrossh.dev/repos/gdx-studio.git
Discussions: https://groups.google.com/g/rust-embed-devs

An IDE for creating Games using libgdx and Java supported on all platforms Android, iOS, Desktop


0e2d6bb8 pyrossh

HEAD -> master

2 months ago
remove index.html
Files changed (1) hide show
  1. index.html +0 -319
index.html DELETED
@@ -1,319 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-us">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Gdxstudio by pyros2097</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
- <link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
8
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
9
- <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
10
- <link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
11
- </head>
12
- <body>
13
- <section class="page-header">
14
- <h1 class="project-name">Gdxstudio</h1>
15
- <h2 class="project-tagline">An IDE for creating Games using libGDx and Java supported on all platforms Android, iOS, Desktop</h2>
16
- <a href="https://github.com/pyros2097/GdxStudio" class="btn">View on GitHub</a>
17
- <a href="https://github.com/pyros2097/GdxStudio/zipball/master" class="btn">Download .zip</a>
18
- <a href="https://github.com/pyros2097/GdxStudio/tarball/master" class="btn">Download .tar.gz</a>
19
- </section>
20
-
21
- <section class="main-content">
22
- <h1>
23
- <a id="deprecated" class="anchor" href="#deprecated" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Deprecated</h1>
24
-
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>
27
-
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 -&gt; getting stuck in a traffic -&gt; working for 4 hours -&gt; lunch for an hour -&gt; working for 5 more hours -&gt; getting stuck in traffic on the way home -&gt; shower and sleep -&gt; 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>
33
-
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>
36
-
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>
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>
43
-
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>
45
-
46
- <blockquote>
47
- <p><strong>Disclaimer</strong> This is not an official libdgx project so don't ask them for bug fixes </p>
48
- </blockquote>
49
-
50
- <p><a href="https://github.com/pyros2097/GdxStudio/wiki">See the Wiki for more details</a> </p>
51
-
52
- <h2>
53
- <a id="features" class="anchor" href="#features" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Features</h2>
54
-
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-&gt;build-&gt;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>&lt;p&gt;
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.&lt;br&gt;
160
- It has extra things like stateTime, gameUptime, pauseState&lt;br&gt;
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)&lt;br&gt;
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.&lt;br&gt;
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
- &lt;/p&gt;
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>
308
-
309
- <footer class="site-footer">
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>
311
-
312
- <span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
313
- </footer>
314
-
315
- </section>
316
-
317
-
318
- </body>
319
- </html>