Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
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 4396 times)
0 Members and 1 Guest are viewing this topic.
Offline tyeeeee1
« Posted 2013-06-26 21:45:52 »

I've been slowly trying to figure out how to use libgdx and I ran into an, apparently, outdated tutorial ( )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 ( ) 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 03:31:02 »

Which classes don't exist?

Offline PaidGEEK

Senior Devvie

Medals: 5
Projects: 3

« Reply #2 - Posted 2013-06-27 03: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: 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 17: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 18:44:40 »

Try the nightlies:

Offline tyeeeee1
« Reply #5 - Posted 2013-06-30 22: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:
Exception in thread "main" java.lang.NoClassDefFoundError: com/badlogic/gdx/graphics/GLU
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(
   at core.Core_Display.<init>(
   at core.Core_Main.main(
Caused by: java.lang.ClassNotFoundException:
   at$ Source)
   at$ Source)
   at Method)
   at 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 14: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 21:43:44 »

It's all working now, thanks!
Pages: [1]
  ignore  |  Print  

hadezbladez (761 views)
2018-11-16 13:46:03

hadezbladez (394 views)
2018-11-16 13:41:33

hadezbladez (758 views)
2018-11-16 13:35:35

hadezbladez (200 views)
2018-11-16 13:32:03

EgonOlsen (2401 views)
2018-06-10 19:43:48

EgonOlsen (2581 views)
2018-06-10 19:43:44

EgonOlsen (1486 views)
2018-06-10 19:43:20

DesertCoockie (2149 views)
2018-05-13 18:23:11

nelsongames (1967 views)
2018-04-24 18:15:36

nelsongames (2648 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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‑
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!