Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (108)
games submitted by our members
Games in WIP (536)
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 1337 times)
0 Members and 1 Guest are viewing this topic.
Offline Xardov

Senior Newbie





« Posted 2012-04-17 16: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 16: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 18: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 18: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 20: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  
 
 
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.

CogWheelz (16 views)
2014-07-30 21:08:39

Riven (22 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!