Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  Library vs library-less programming  (Read 2273 times)
0 Members and 1 Guest are viewing this topic.
Offline Xardov

Senior Newbie

« Posted 2012-04-17 14:06:01 »

As a beginner to java, I was wondering if I should start with using libraries such as Slick 2D and LWJGL, or if I should start without libraries, and learn the inner workings of the code?  Will it be any harder for me in the future as a programmer if I start with libraries?  And do games with library have better performance than games without?  I.E.  LWJGL enabled 3D game vs library-less 3D game.
Offline UprightPath
« Reply #1 - Posted 2012-04-17 14:26:54 »

Most of the libraries out there are out there so that you don't have to write what tends to amount to very specialized code to perform certain tasks. LWJGL is there to provide access to OpenGL commands through native libraries. Slick2d is there to provide a mapping like Java2D to the LWJGL operations.

As for whether they'd be faster? It depends. Many of the libraries available attempt to cover the most cases (Correct me if I'm wrong!) rather than specific cases and are therefore not as 'good' as specialized code may be. However, they tend to be Good Enough and it prevents you from having to write a large chunk of code that is probably several orders of magnitude more complex than your game itself.

If you want to learn to write games, use the tools available to you. If you want to learn to do graphics, then try to write the code that the library uses.

Offline Xardov

Senior Newbie

« Reply #2 - Posted 2012-04-17 16:19:29 »

Allright, thanks for the tips!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davedes
« Reply #3 - Posted 2012-04-17 16:35:01 »

Basically if you want OpenGL in Java, then writing your own bindings from scratch would be ludicrous. LWJGL/JOGL does it very well, and both have been maturing over many years.

Regarding higher level libraries, like LibGDX, Slick2D, jME, etc. that depends on your game's needs, your goals, etc.

Here's how I view things:
LibGDX - for 2D/3D games on desktop/android/WebGL
jME/Ardor3D - for 3D games on desktop; more mature than LibGDX with 3D capabilities (i.e. model loading, terrain, etc)
Slick2D - for small 2D games and fast prototyping; especially nice for beginners coming from a Java2D background
TextureLoader + SoundSystem - if you want to just use OpenGL but don't want to write your own decoders for audio/image, you can use these utilities
Slick-Util - like above, contains audio/image decoders, as well as other utilities (Color, font rendering).
LWJGL/JOGL - this would be as "library-less" as you get with OpenGL. It will be a lot lower-level concepts, but great if you want to learn OpenGL from the ground up or if you want maximum flexibility/efficiency for your game engine.

I'd suggest starting with a simple 2D game, using LibGDX or Slick2D.

Offline tberthel
« Reply #4 - Posted 2012-04-17 18:04:04 »

You should skip even the libraries and go straight to the top shelf if you can.

Meaning use UDK, Unity, or similar if you can.

If you must go outside of the box then you can roll your own.

If you roll your own for too long and create distinctive features like I have then you will make less as tools tend to have less value than the end consumer products you could have made.

So just make games with the highest level tools you can find, unless your really see something missing like I did.

This decision could determine decades of poverty or profit over the short and long term.  Balancing the short term and long term is important.

Pages: [1]
  ignore  |  Print  

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

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

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

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

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

nelsongames (155 views)
2018-04-24 18:14:32

ivj94 (896 views)
2018-03-24 14:47:39

ivj94 (157 views)
2018-03-24 14:46:31

ivj94 (809 views)
2018-03-24 14:43:53

Solater (173 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!