Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to use Tiled with Libgdx  (Read 1102 times)
0 Members and 1 Guest are viewing this topic.
Offline tyeeeee1
« Posted 2013-06-26 23:45:52 »

I've been slowly trying to figure out how to use libgdx and I ran into an, apparently, outdated tutorial ( https://code.google.com/p/libgdx-users/wiki/Tiles )on how to use tiled to create maps easily and then how to load and render them with libgdx. After a bit of messing around I was unable to figure out how to get the code working due to all of the links to the full code being broken. I then came on here and searched through a few threads to find a more up-to-date tutorial ( https://code.google.com/p/libgdx/wiki/GraphicsTileMaps#Rendering_Tiled_Maps ) but a lot of the classes that that tutorial requires don't exist in com.badlogic.gdx when the tutorial says that they should.

Does anyone know of a tutorial that is entirely up-to-date and that will be able to show me how to use tiled with libgdx?
Offline ReBirth
« Reply #1 - Posted 2013-06-27 05:31:02 »

Which classes don't exist?

Offline PaidGEEK

Senior Member


Medals: 5
Projects: 3


twitter.com/PaidGEEK


« Reply #2 - Posted 2013-06-27 05:34:08 »

The second link you posted is the right tutorial, but libGDX 0.9.8 doesn't contain some of the classes. I don't know what is going on there, but check this out: http://www.badlogicgames.com/wordpress/?p=2870 On this post you can find github link and download the project, which contains those classes. I had to unzip the original library and add classes from com.badlogic.gdx.maps.tiled.* to get it to work. Kind of messy, but it works.

Improvisational programmer.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tyeeeee1
« Reply #3 - Posted 2013-06-30 19:27:08 »

I tried downloading the files from github but I don't have enough time to go through every single class and manually fix every single import and package statement. Is there anywhere where I can just download the jar file and import it?
Offline davedes
« Reply #4 - Posted 2013-06-30 20:44:40 »

Try the nightlies:
http://libgdx.badlogicgames.com/nightlies/

Offline tyeeeee1
« Reply #5 - Posted 2013-07-01 00:59:09 »


Most of the missing classes were in the nightly gdx.jar but, according to the error I'm getting now, there is still a missing class.

Here is the new error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
Exception in thread "main" java.lang.NoClassDefFoundError: com/badlogic/gdx/graphics/GLU
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:64)
   at core.Core_Display.<init>(Core_Display.java:17)
   at core.Core_Main.main(Core_Main.java:13)
Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.graphics.GLU
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 3 more


I've checked the jar and com/badlogic/gdx/graphics/GLU definitely doesn't exist.
Offline davedes
« Reply #6 - Posted 2013-07-01 16:33:30 »

Chances are you updated some of your JARs without updating all of them. GLU is no longer included in LibGDX; so that your LWJGL backend is trying to find it suggests that you are using an outdated backend.

Delete ALL the JARs from your project and download them ALL again from the newest nightly. Then add them all to your Build Path in the Eclipse Project Properties. After this, do a Clean and Build to ensure everything is refreshed.


If your projects are split into desktop, android, html, etc. then an easier solution is to use the "Update" function of the LibGDX setup-ui tool.

Offline tyeeeee1
« Reply #7 - Posted 2013-07-01 23:43:44 »

It's all working now, thanks!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

pw (25 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (19 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (56 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!