Newbie starting Java

:)Hi guys i would like to make an mmo :stuck_out_tongue: i was wondering if you could help would be really cool :slight_smile: XDXDXD ;D

Sorry, I really couldn’t resist doing this considering how much you guys hate newbies asking about MMO’s.

Anyways, my name is Zemmi and I live in the wonderfull country of the Netherlands. I’ve been doing GameMaker for 3 to 4 years right about now, and a week ago I got accepted for my study, game development. Now, they’ll be teaching me Java and C++ at school but since I’ve got lots of spare time this summer I thought it would be nice to teach myself the basics of Java game development.

So far I’ve been watching the new bostons (beginner) java tutorials, just like DerekBanas Java tutorials, and I was wondering if I’m doing the right thing. I only want to develop games in Java, no other kind of applications so should I watch the (basic, not focussing) tutorials videos of Java or should I jump in with both feet by trying to make MineCraft mods?

I know my question isn’t very clear, but the bottom line is: How did you guys learn to develop games in Java, and should I start with basic Java tutorials (like calculators) or immediatly start making games and learn it the hard way?

Thanks in advance!

If you want to dev games in Java you need to check out LWJGL, and for 2d games Slick2d. DO NOT USE THE STANDARD LIBS FOR GAME DEV!

Hey ZemmiPhobia and welcome to JGO!

This post is perfect for you :slight_smile:

Good luck! :slight_smile:

Hi

I don’t really know your skills. Maybe just start by … the beginning, a very simple game. You know that a MMO is a bit too much for a newbie :wink: If you decide to use Java2D despite CyanPrime’s advice, you will have to switch to third party libraries (based on JogAmp and/or LWJGL like Slick, LibGDX, JGame, …) later to get better performance and much more features. Good luck and welcome :smiley:

If you want to dev games in Java dont check out LWJGL and Slick2d YET! . USE THE STANDARD LIBS FOR GAME DEV!


What is important for a beginner is to have a simple environment to play arount. Something with little dependencies (fuzzing arount with libs to include).
There are some “sandbox” codes floating around here that you can alter.

What you should look for is a code that does the following simple things:

-run the main gameloop (get the input, alter the gamestates, render the game, wait a while)
-loading and displaying images
-getting keyboard and mouseinputs
-display textmessages
-simple example how to a create player class and other worldobjects

Look for the simplest (but working) codes you can find, and then play around with them.
If you have a big pile of complicated code to begin with, it will just frustrate to work though it.

Make yourself some goals (like bulletpoints) what you want to learn, and then try to archive that.
This keep you not drifting off into too specific solutions.
Go to the next point when your current goal works fine.

like:

-diplay “hallo world”
-display an move around a red circle
-print “A” when pressing “space”
-make a gameloop with a constant framerendering (Thread.sleep(50); kind of stuff)

You are going to get a wide range of opinions here, that is guaranteed!

For myself, I started with books about Java from the library, learning basics. Maybe you already have done this or already know basics about Java. If so, you can probably ignore this post. But if you are new to the language, there really is a lot of learn. I was coming from a background in VBA, a dialect of Visual Basic used in applications like Access, Excel, so breaking into the whole OOP concept was somewhat new.

I got frustrated that most library books around here (near Berkeley California) didn’t get into animation. And the one that I did find was a bit too advanced for my knowledge in the first few months of studying this. So, I found it all kind of rough going.

One text to consider, imho, is vol. 1 of Horstmann’s “Core Java”, vol. 8. You get a great view of the basics, and he does have examples of graphics, and gets to a bouncing ball animation in the Threads chapter. His chapters on AWT & Swing are perhaps a bit easier to digest than going through the official Tutorials, and the example programs are solid. After 8 editions, the code is pretty well vetted.

The price is a minus, though. Big expensive book, and if you have trouble with OOP conceptually, something like “Head First Java” might be a helpful supplement.

Anyway, I’d say if you are a real beginner, his AWT & Swing chapters should get things going for you pretty well. Then, of the books written specifically for Java Games, I like Brackeen’s “Developing Games in Java” the best.

I’m about 2.5 years into this, at this point. Still having fun and learning things.

Enjoy!

Allright… I’m a complete newbie and I have no idea what you just said… Are these things I need to import into java? (like the scanner?)

Yeah, I’m a real beginner. I’ve been coding in Game Maker for a few years so I understand how variables, OOP and if loops work, but I’ve never even looked at C++ or any ‘real’ coding language.

Anyways, keep the post coming :slight_smile:

If you’re literally brand new to java, here are some links to get you started:

(NewBostons videos, watch them all before doing everything below; this is how I learned, took two or so days.)

(Installing new libraries for new functionality)


(LWJGL Website)
http://www.lwjgl.org/
(Or, if you want to use Slick2D, which is simpler in a few cases)
http://slick.cokeandcode.com/

Start here: http://www.cokeandcode.com/info/tut2d.html

And don’t forget to check out the follow up 102, 103, etc. (links top right).

Aah, I’m glad I already started watching this series. Should I also watch his advanced and game development series?

Thanks, I already took a quick look and it looks very usefull :slight_smile:

I personally started with Java2D, moved to slick, then back to Java2D. Just a thought.

Whichever path you go, just remember to make sure you understand what the hell is going on, don’t just copy code and say you’ll learn it later, always learn now :).

Did you had any kind of Java experience before this?

Offtopic:

German ? :smiley:

Nope, Dutch… Although I’m now kinda ashamed to tell this after our huge defeat by you guys…

Nah, did not want to say it to you (and YAY WE WON… BAAAM :smiley: ), it was ment for Damocles, because “hallo” is the German word for “hello” :slight_smile: (happens sometimes to me, when I want to write “hello”…)

Depends what you count as experience, I was like 9 years old and I had written some programs, but nothing too complicated, things like statistics (mean, mode, median, etc) and I did an encryption program (algorithm sucked :wink: ).

but considering I was 9 and figured it out, as long as you take your time you shouldn’t have a problem :slight_smile:

I actually ment “Halo World” :wink: