Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: HTTP POST highscore JSON object with LibGDX on: 2013-11-24 17:41:27
I'd probably do something like this (no need to make a stream of your string based content):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
HttpRequest httpPost = new HttpRequest(HttpMethods.Post);
httpPost.setUrl("http://highscore-server.net/highscore-accepting-script.php");
httpPost.setHeader("Content-Type", "application/json");
httpPost.setContent(yourJsonString);

Gdx.net.sendHttpRequest (httpPost, new HttpResponseListener() {
   public void handleHttpResponse(HttpResponse httpResponse) {
      status = httpResponse.getResultAsString();
   }

   public void failed(Throwable t) {
      status = "failed";
   }
 });
2  Game Development / Newbie & Debugging Questions / Re: Libgdx Gwt Module... How to? Errors on: 2013-11-03 15:49:58
GWT needs to know exactly where to get all sources from. Since br.views is not a sub-package of com.me.mygdxgame, it cannot be found. Define that as a source path in your gwt module definition, or move that to the com.me.mygdxgame package. Also, even if it could find the source, it won't compile because you reference com.badlogic.gdx.backends.openal.Ogg.Music - You should reference com.badlogic.gdx.audio.Music instead.
3  Game Development / Newbie & Debugging Questions / Re: LibGDX having trouble with tiled maps on: 2013-10-30 13:07:00
That BOM () at the beginning of your file is the problem. Try resaving the file without the BOM. Tiled doesn't usually add that, did you edit the file with something else afterward? You should be able to open it in something like Notepadd++ and just save without the BOM.
4  Game Development / Newbie & Debugging Questions / Re: LibGDX having trouble with tiled maps on: 2013-10-30 05:32:36
He named it tilemapxml. It's still a .tmx though.

And one of the formats for tmx files is to store layer data as xml, which is not supported. I made the educated guess that if the file was named tilemapxml.tmx that it used the xml data format.
5  Game Development / Newbie & Debugging Questions / Re: LibGDX having trouble with tiled maps on: 2013-10-30 04:41:04
LibGDX does not support storing your map layer data in XML format. Use csv, base64, base64-gzip, or base64-zlib to store your map layer data. This is probably the cause of the errors.

Using the tiled-preprocessor is still supported with the new api, but you have to use AtlasTmxMapLoader to load the map (and use the latest version of the tiled-preprocessor).
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibGDX Texture Packer on: 2013-10-30 04:33:58
For Tiled (.tmx) maps, the libgdx loader can handle csv, base64, base64-gzip or base64-zlib. If you want to target the HTML backend, you will need to use one of the uncompressed formats. For Tide (.tide) maps, only xml is currently supported.
7  Game Development / Newbie & Debugging Questions / Re: Libgdx - Use Tiled or http://tide.codeplex.com/ ? on: 2013-10-22 13:57:50
The only Tide-specific feature supported out of the box in libgdx is animated tiles. I like Tide myself (and that's why I added it to libgdx) but you'll probably have a better time with Tiled. You can use dermetfan's libgdx-utils to get animated tiles from a tmx map, among other things.
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx "Drop" game tutorial, HTML really slow fps on: 2013-08-07 03:48:52
When you run a GWT application from Eclipse (via Debug as Web Application or Run as Web Application) it runs in so-called hosted mode, where much of the code is still running as Java. The slowness is caused by this as everything has to marshaled between the browser and the code server. There are a couple ways to get around this.

The first is easier, but makes debugging nearly impossible. By instead compiling the GWT project and putting it on a server (local, or on the web), you'll get normal frame rates as all code will be compiled to javascript. Unfortunately, compiling can take a long time and as previously noted makes debugging very difficult.

The second way is setting up "super dev" mode. Here, the code is compiled as before but it takes less time. Debugging is possible but takes some steps to do. Mario wrote up a nice post on how to set it up so I'll just point you to that.

http://www.badlogicgames.com/wordpress/?p=3073

Hope it helps.
9  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Custom Box2D shape creation problem on: 2013-07-28 17:19:54
If the MapObject is created from a "polyline" in Tiled, it will be a PolylineMapObject and if you cast it as such you can get the vertices.
10  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Is there a way to set the position of the application window? on: 2013-07-27 12:31:51
LwjglApplicationConfiguration has x and y fields to position the window.
11  Game Development / Newbie & Debugging Questions / Re: [LibGdx, TiledMap] getCell returns null :S on: 2013-07-26 19:54:43
To cut down on memory use, the map loader only instantiates cells for those positions which have contents at load time.
12  Game Development / Newbie & Debugging Questions / Re: LibGDX - LWJGLApplication on: 2013-07-26 04:23:08
You need the following jars:

gdx.jar
gdx-natives.jar
gdx-backend-lwjgl.jar
gdx-backend-lwjgl-natives.jar
13  Game Development / Newbie & Debugging Questions / Re: [libGDX] [box2D] TextButton don't work on: 2013-07-23 13:19:31
As for why the TextButton doesn't do anything...

You call Gdx.input.setInputProcessor(stage) before instantiating the stage. Also, you don't add an event listener, so even once the stage begins to process input, it still won't do anything until you do that. The other comments also apply - there are very 'wrong' things being done here.
14  Game Development / Newbie & Debugging Questions / Re: [Final Decision] LWJGL or LIBGDX on: 2013-05-03 14:07:49
My personal biggest hassle with LibGDX(The second biggest reason I wont be using it, at least for now), is that it assumes that I'll be developing to multiple platforms at once.

I don't give a shit about mobile platforms(If I did, I'd learn to code in their native language, e.g. Objective-C for iPhone/iPad(Yes, I know, Android uses Java, but I don't use Android and don't care much for their broken market and fractured platforms)) and I don't care about WebGL either, so I rather dislike that the default setup of LibGDX forces me to have several projects in Eclipse, just to make a simple desktop game.

I managed to set up LWJGL, with javadoc/source code attached, far far faster than I figured out how to setup a LibGDX project.

LibGDX doesn't force you to do anything... It is dead simple to set up a project for desktop only.

1) Download LibGDX (stable or nightly, doesn't matter)
2) Open Eclipse
3) Create a Java Project
4) Add libs: gdx.jar, gdx-natives.jar, gdx-backend-lwjgl.jar, gdx-backend-lwjgl-natives.jar ... attach the sources if you want.
5) Code
15  Game Development / Networking & Multiplayer / Re: [KROYONET] Android 4.2 doesn't connect, 2.2 do on: 2013-04-27 17:03:59
The connect thread will only exist as long as the connection is being established. Kryonet maintains its own update thread. As long as your Client is maintained outside of the scope of any specific Activity, there should not be any problem using it from any Activity.
16  Game Development / Networking & Multiplayer / Re: [KROYONET] Android 4.2 doesn't connect, 2.2 do on: 2013-04-27 14:59:21
The stack trace indicates you are running the connect operation on the main thread. You'll need to put that into a background thread so as to not lock up your UI during connect. This is due to StrictMode, added in Android 2.3 but on by default since 3.0. Alternatively, if you really need the connect operation to be on the main thread, then you change the StrictMode policy.
17  Java Game APIs & Engines / Tools Discussion / Re: Spine: 2D skeletal animation on: 2012-11-29 04:50:33
Nice app you got here.

Ran fine on my laptop with Ubuntu 12.04 on both OpenJDK and Oracle (both 6 and 7). Double click ran it as expected, but I think I had previously changed my settings for jar files. I suppose you could bundle a shell script to start it if it is a concern. Also, I went ahead and tried changing graphics in the file system, and they updated in Spine automatically.

Again, nicely done. I wish I had something to use it for, but I lack any sort of talent in that area.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (28 views)
2014-11-22 12:13:56

xFryIx (70 views)
2014-11-13 12:34:49

digdugdiggy (49 views)
2014-11-12 21:11:50

digdugdiggy (43 views)
2014-11-12 21:10:15

digdugdiggy (37 views)
2014-11-12 21:09:33

kovacsa (61 views)
2014-11-07 19:57:14

TehJavaDev (65 views)
2014-11-03 22:04:50

BurntPizza (63 views)
2014-11-03 18:54:52

moogie (79 views)
2014-11-03 06:22:04

CopyableCougar4 (78 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!