Jump to content

  • Log In with Google      Sign In   
  • Create Account

Pure Java or LWJGL?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 vladmihail   Members   -  Reputation: 312

Like
0Likes
Like

Posted 30 April 2013 - 01:49 AM

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.



Sponsor:

#2 Rakso   Members   -  Reputation: 120

Like
0Likes
Like

Posted 30 April 2013 - 02:10 AM

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.



#3 unbird   Crossbones+   -  Reputation: 4974

Like
2Likes
Like

Posted 30 April 2013 - 02:15 AM

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 Slick2D, which uses LWJGL under the hood.



#4 vladmihail   Members   -  Reputation: 312

Like
0Likes
Like

Posted 30 April 2013 - 02:28 AM

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, 30 April 2013 - 02:29 AM.


#5 David.M   Members   -  Reputation: 731

Like
0Likes
Like

Posted 30 April 2013 - 07:09 AM

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.



#6 Glass_Knife   Moderators   -  Reputation: 4421

Like
3Likes
Like

Posted 30 April 2013 - 08:33 AM

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, 10 February 2014 - 06:19 PM.
grammer

I think, therefore I am. I think? - "George Carlin"
Indie Game Programming

#7 axel1994   Members   -  Reputation: 434

Like
0Likes
Like

Posted 06 February 2014 - 08:14 AM

Didn't see the date 


Edited by axel1994, 06 February 2014 - 08:21 AM.

"Talk is cheap. Show me the code."

- Linus Torvalds




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS