Sign in to follow this  
Followers 0
Vlad Muresan

Pure Java or LWJGL?

6 posts in this topic

Hello game devs!

 

I am just wondering if i should continuly learn pure java for my 2d game or i should start learning lwjgl?

 

 

P.S:my goal is to make a terraria clone.

0

Share this post


Link to post
Share on other sites

LWJGL lets you use OpenGL so if u have not used that before it might be a slight learning curve.

But on the other hand it helps you do alot of things like creating your screen/window and setting your fps.

Javas own libraries should work fine but you will have to do stuff like the fps syncing for example yourself.

 

Personally i would pick going pure Java but thats my opinnion after trying LWJGL out by making a pong clone.

0

Share this post


Link to post
Share on other sites

Haven't used Java for years, I just wonder if it provides enough 2D performance for something Terraria-like out of the box. 

As Rakso mentioned, LWJGL is a wrapper for OpenGL, a low level graphics API which is IMO a little bit hard for beginners. For 2D, you might wanna look at [url="http://www.slick2d.org/"]Slick2D[/url], which uses LWJGL under the hood.

2

Share this post


Link to post
Share on other sites

I was thinking in picking up LWJGL because its has all this methods pre made witch its cool because i dont need to reinvent the wheel but i cant find tutorials except CodingUnivers witch its quit good but he focus more on 3D. So i am wondering if i am using Pure Java for 2d games its good,can i get good performance ? If not i will stick with Love2d :D 

Edited by vladmihail
0

Share this post


Link to post
Share on other sites

I think the only hardware acceleration you can get with Java is by using canvas to draw. If you want to work with Java work with Java. If you want to use OpenGL use LWJGL, JOGL, LibGDX, or some other framework. It depends on what you prefer. I'm not familiar with Love2D but if you're having success with it you shouldn't need to switch.

0

Share this post


Link to post
Share on other sites

LWJGL is a good choice.  The reason is not OpenGL, which is easy to use JOGL and just set stuff up yourself.  The reason is the JInput and OpenAL integration.  There is very poor support for keyboard and mouse and none for other controls with straight Java.  As for sound, the Java sound support is so terrible that you'll be switching.  Rather that learn Java2D, OpenGL, JInput, and OpenAL all by yourself, starting with a wrapper API is a good idea.

 

Having written straight Java2D games and tutorials about it, I can tell you that learning one of these wrappers is time well spent.

 

If your goal, however, is to learn how all these things work, and you are not trying to crank out a game, then by all means give them a shot by hand.

Edited by Glass_Knife
grammer
3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0