Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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  
  lwjgl convert to libgdx?  (Read 4020 times)
0 Members and 1 Guest are viewing this topic.
Offline Noobtastic

Senior Newbie





« Posted 2011-04-12 22:15:35 »

So, I've been noobing around trying to learn to use libgdx from tutorials and demos.  I have written quite a few games with straight Java 2D, but I'm finding that diving into libgdx is drowning me a bit.

Part of the reason is that there is not a lot of learning material that seems appropriate for where I'm at (to go from Java 2D to libgdx).  Here's what I'm wondering: if I take a different approach and try to learn to use lwjgl instead, which I'm assuming has more beginner-friendly material, will I later be able to convert this to a complete libgdx implementation later?

Thanks in advance for any help.

Offline Noobtastic

Senior Newbie





« Reply #1 - Posted 2011-04-12 22:29:15 »

And I see that there is Slick2D out there, which (I think) is built on lwjgl?  Or am I wrong about that...

So if I implemented a game project using slick and/or lwjgl, how well would that port to libgdx?

Sorry for my ignorance, it's a terrible thing, ignorance...
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2011-04-12 22:30:19 »

If you're wanting to port between Desktop and Android, libgdx is built for you. Just use it direct.

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Noobtastic

Senior Newbie





« Reply #3 - Posted 2011-04-12 22:35:04 »

Thanks for the reply  Smiley

While yes, I am wanting to port to android at some point, I'm looking for a good starting place first.  It seems to me that an understanding of only Java 2D is insufficient to comprehend libgdx right away.

However, from your reply it sounds like I need to stick with only libgdx, then.   Hmmm...

Maybe what I need are some tutorials on openGL first? 

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #4 - Posted 2011-04-12 23:13:14 »

If you're familiar with Java2D, I'd recommend you give Slick2D a go first, its API is remarkably similar and you should have no problems switching over. You'll only have to learn a few small API differences and you should be good to go. Besides it's a good first step into the Java/OpenGL arena as it'll get you familiar to stuff like using natives, allow direct access to OpenGL, etc.

Another thing to keep in mind is Slick2D's community is slightly larger and more active, so its much easier to get help from ppl and the forums already contain a wealth of knowledge. Also the documentation (especially the Slick Wiki) and code examples are probably the best of any Java games library.

Thirdly Slick2D has a solid toolset already around it e.g. Font Creators, Particle Editors, Map Editors, etc so that's another advantage that can help you get a game up and running quickly.

Lastly if you later want Android support you can switch over to LibGDX, also you never know by then Slick2D might even have a mature LibGDX wrapper (one already exists) which basically allows you to run Slick2D on top of LibGDX.
Offline Noobtastic

Senior Newbie





« Reply #5 - Posted 2011-04-12 23:24:06 »

Well that certainly sounds promising -- maybe I need to spend the evening cramming Slick2D into my limited brain!

...assuming I can get my taxes done first.
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #6 - Posted 2011-04-14 03:26:24 »

Moving from libgdx to LWJGL is going to be even harder, as LWJGL is a lower level API. If you did build some stuff in LWJGL, you would then probably not have much issue with learning libgdx. Moving from Java 2D to Slick makes the most sense for building desktop games, as the APIs are similar, but not a whole lot of it will translate to learning OpenGL. There is Slick-AE, which let's you run Slick on Android, so that may be an option for a 2D game. You probably won't be able to extract every last ounce of performance out of Android with Slick-AE, but I would guess it is sufficient for many games, especially if you are just starting out.

What specifically is giving you problems with libgdx? If you stick with the Sprite and SpriteBatch classes, you should not have much trouble drawing images. You don't need much more for most 2D games.

I hope I'm not being overly defensive, I would never knock Slick as it is great, I've built games with it and it is where I started with OpenGL, but to address a few of kappa's points... The libgdx forums are active and people in the community are releasing games. See the showcase section of the forums and the release of two new games was just mentioned on the blog. Also libgdx has font creators, particle editors, and tiled support. Smiley For documentation we have extensive javadocs (minimal "getName() Gets the name") and a start of a wiki. More docs are on the roadmap following the 1.0 release.

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #7 - Posted 2011-04-14 11:01:25 »

but to address a few of kappa's points... The libgdx forums are active and people in the community are releasing games.

yup tis cool stuff, LibGDX is indeed shaping up to be pretty awesome.
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2011-04-14 11:34:38 »

FWIW, Slick development is slowing down as I get interested in writing games again. Its perfectly useable as is and I'll carry on doing bug runs for the foreseeable. However, it was built and written very quickly to fill a gap and save me time Smiley Libgdx is early days but it's shaping up to be awesome, I'd say if you're just starting and have no vested interest already in Slick2D then it'd probably be more sensible to start with Libgdx.

Kev

Offline Noobtastic

Senior Newbie





« Reply #9 - Posted 2011-04-14 16:31:54 »

Thanks for the great responses, everyone.

Nate: I did not think your reply was at all defensive Smiley
In terms of what is giving me trouble, it's just hard for me to figure out the basics.  I watched all the tutorial videos, and poked around in the demo projects, but this hasn't gotten me much past learning how to create an eclipse project.

It just seems completely different from how I wrote my straight Java 2D games that I can't wrap my head around it.  I am hoping to find some in-depth tutorials, or a book, etc., but have not found something like that yet for libgdx because it is so new.

Would it make sense to try learning open openGL first, and then try libgdx again?  I also see there is a soon-to-be-released book by Mario Zechner, which doesn't cover libgdx but might still be an option to start with... or would it?

I feel like I am learning to code all over again  Undecided

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #10 - Posted 2011-04-16 14:15:19 »

In terms of what is giving me trouble, it's just hard for me to figure out the basics.  I watched all the tutorial videos, and poked around in the demo projects, but this hasn't gotten me much past learning how to create an eclipse project.

It just seems completely different from how I wrote my straight Java 2D games that I can't wrap my head around it.  I am hoping to find some in-depth tutorials, or a book, etc., but have not found something like that yet for libgdx because it is so new.
We have a documentation effort brewing. There is myself, Mario, and two others. I did one and a half pages tonight:
http://code.google.com/p/libgdx/wiki/ProjectSetup
http://code.google.com/p/libgdx/wiki/SpriteBatch
With just those you should be able to get an app running on desktop and Android and draw some images. Feedback is welcome!

Quote
Would it make sense to try learning open openGL first, and then try libgdx again?
Trying to learn OpenGL == learning LWJGL == answered above.

Quote
 I also see there is a soon-to-be-released book by Mario Zechner, which doesn't cover libgdx but might still be an option to start with... or would it?
Yes, it will solve all your problems, buy it!  Grin

Offline Noobtastic

Senior Newbie





« Reply #11 - Posted 2011-04-16 15:23:52 »

Excellent, I will definitely check out the new pages!

Also, I bought the book Smiley

Offline Noobtastic

Senior Newbie





« Reply #12 - Posted 2011-04-21 20:56:22 »

@Nate:
The book has, indeed, solved my problems Smiley

Actually your SpriteBatch wiki page was also helpful.
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #13 - Posted 2011-04-21 21:49:12 »

Sweet. Smiley I'd like to write more soon.

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.

xsi3rr4x (54 views)
2014-04-15 18:08:23

BurntPizza (52 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (150 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!