LWJGL Forum

Programming => General Java Game Development => Topic started by: TechBoy on October 05, 2011, 20:49:18

Title: Few questions...
Post by: TechBoy on October 05, 2011, 20:49:18
Hello,

I am fairly new to Game Development, I started about week ago to be more specific. The reason why I chose Game Programming over other things (I have experience in other fields, so I'm not totally a newbie) is mainly because I always wanted to make my own games, I never really had time to play them nor I ever really had that feeling when I'm playing them as I have when I'm actually making my own.

Anyway, I have few questions related to some very basic stuff and I'm expecting someone with the experience to guide my in right direction. I want to know, what is the best way to learn LWJGL library, is there any kind of e-book or book that I can purchase. What would you recommend me to do first, because I like reading book more over reading tutorials, but I'm okay with tutorials too! So, can you please explain (in few sentences) what should I do as a beginner game developer, I am really fast learner and I'm good at Mathematics, so it's not really big of a problem to advance quickly (Not expecting to be expert in 2 months, but at least to know how to make some very basic 2d games at least). Also, can you please tell me when should I move to 3d. Also can you give me few links to some good tutorials, articles or any kind of discussion related to this topic.

Well that's pretty much it.

Thanks and have a nice day!
Title: Re: Few questions...
Post by: Chuck on October 05, 2011, 23:09:22
LWJGL is just a wrapper for OpenGL, so learning LWJGL involves learning OpenGL.  It also wraps OpenAL, OpenCL, and input for joysticks and such, but the graphics are by far the biggest part.

Lots of people are pretty happy making 2d games without ever touching 3d, while others like myself prefer to go 3d from the start.  If you're planning on sticking with 2d, you can use a library like Slick to make things easier.  Otherwise, you get to make another decision: whether to learn "old school OpenGL" first or "new OpenGL". 

No matter which one you learn, it's hard to beat a book.  There are online tutorials out there, but most of them are pretty spotty, and can really only supplement what you'll learn in a good book.  Here's a few I recommend:

Title: Re: Few questions...
Post by: elias4444 on October 05, 2011, 23:13:10
It's a very broad topic you're referring to there.  ::)

If you've never made a game, I suggest getting a book on game development first (I don't know of any that use LWJGL, but there are some that use Java like Brackeen's "Developing Games in Java"... wow, that's the second time today I've recommended that! Brackeen, do you have an affiliate program for sales?  :P ).

Start slow, get down the basics of design first and understand the components you'll need.

Then, build something simple. Stick with 2D for a while. Don't leap to 3D until you feel like you have to. 3D adds an enormous amount of complexity to an engine.

I'm not as experienced as some of these other guys on the forum, but that's the advice I've been given repeatedly while hanging out on the sidelines.
Title: Re: Few questions...
Post by: Chuck on October 05, 2011, 23:15:38
Some online tutorials you can try:

Title: Re: Few questions...
Post by: jediTofu on October 06, 2011, 03:18:13
do you know a programming language?  for LWJGL, you need to understand the basics of Java.  if you know a different programming language (especially an object-oriented language like C++/Smalltalk/C#/Ruby/etc.), then it won't be too hard to learn Java.  If you don't know Java though, I'd suggest getting a book on that first.
Title: Re: Few questions...
Post by: TechBoy on October 06, 2011, 05:48:49
Quote from: jediTofu on October 06, 2011, 03:18:13
do you know a programming language?  for LWJGL, you need to understand the basics of Java.  if you know a different programming language (especially an object-oriented language like C++/Smalltalk/C#/Ruby/etc.), then it won't be too hard to learn Java.  If you don't know Java though, I'd suggest getting a book on that first.

Yeah I do, like I previously mention I do have experience with programming and I am not newbie when it comes to that. I worked with VB .NET, C#, C++, Java and ASM. But mostly in C#, worked in XNA too so I know how it works.

@Chuck: Thanks a lot, will check out those :)
Title: Re: Few questions...
Post by: abcdef on October 06, 2011, 12:02:35
Just out of interest, how do you define new and old opengl? I know its version 3+ (from what you have said) but from a feature perspective what makes it so different?
Title: Re: Few questions...
Post by: Fool Running on October 06, 2011, 12:49:06
New OpenGL is usually referred to as 3.0+. Old is anything before that.
The reason for this is that version 3.0 introduced the first ever deprecated functionality (mostly immediate mode is now deprecated, but there are other deprecated things as well).
This means that learning the old-style OpenGL is not as useful as it was previously. However, many older video cards (and Intel cards :-\) don't support a lot of the new stuff in 3.0, so if you want to target those cards, then you are stuck with the old-style.
Title: Re: Few questions...
Post by: TechBoy on October 06, 2011, 15:41:16
Hello,

Do I really need to learn OpenGL to work with LWJGL, if yes I will go and get OpenGL Programming Guide and OpenGL Superbible tomorrow. I am really excited to start working on it.

Regards,
Title: Re: Few questions...
Post by: Chuck on October 06, 2011, 15:52:17
You don't have to know OpenGL to write 3d games, but it does help.  You do have to know it to use LWJGL, because it doesn't hide any of the details from you the way an engine like Slick or JME would.

You can easily learn OpenGL using LWJGL, but you have to keep in mind that pretty much every book on OpenGL uses C++ (OpenGL itself is a C API), so knowing a smattering of that will help.  A lot of the immediate mode stuff is exactly the same syntax as in C, but any API calls involving pointers and arrays will use NIO direct buffers in Java instead.

Title: Re: Few questions...
Post by: elias4444 on October 06, 2011, 16:22:52
If you're really concerned about having to learn openGL, you may want to start with one of the aforementioned game engines (jME for 3D, or Slick for 2D). Keep in mind that there's a lot more than just graphics involved in creating a game. There's also the need for sound, physics, and input. That means learning other libraries as well (such as openAL for sound). Game engines are what bring those things together into a cohesive whole so you don't need to think/worry about them all.
Title: Re: Few questions...
Post by: TechBoy on October 07, 2011, 18:09:02
Hello,

I've purchased the OpenGL Programming Guide (5th edition), but I noticed it is written for C-Programming Language and not C++ like you said.