Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878845 Posts in 32941 Topics- by 24349 Members - Latest Member: Ozymandias

May 22, 2013, 07:13:39 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Learning Java - any advice
Pages: [1] 2
Print
Author Topic: Learning Java - any advice  (Read 1195 times)
Windybeard
Level 3
***



View Profile Email
« on: March 12, 2012, 03:00:26 AM »

Hi everyone

I am currently teaching myself java (with a little help from a friend) I have been using MMF for years and have a very good understanding of how it all works.

I understand the basics of java and am getting better with every day and am looking forward to moving from game creating software to the freedom of real coding.

Anyone have an tips or advice and can recommend any good books to help?
Logged

dishmoth
Level 0
**



View Profile WWW Email
« Reply #1 on: March 12, 2012, 03:25:59 AM »

JGO is the place to be. Coffee
« Last Edit: March 12, 2012, 03:32:09 AM by dishmoth » Logged
Windybeard
Level 3
***



View Profile Email
« Reply #2 on: March 12, 2012, 03:38:19 AM »

Awesome thanks dishmoth, ill def check it out.
Logged

zovirl
Level 1
*


Mark Ivey


View Profile WWW Email
« Reply #3 on: March 15, 2012, 07:56:30 PM »

Java is a verbose language, requiring way too much typing to do it by hand, so pick an IDE and learn the hell out of it. Learn all the keyboard shortcuts, autocompletions, refactorings, etc. You might have to force yourself to learn these, it will feel like you are wasting time but it will pay off in the end. Java is a lot more fun to write when you have the IDE doing most of it for you Smiley
Logged

Forest, a walking meditation game. (behind the scenes)
HTML5 fighting game, a game jam prototype.
www.zovirl.com
Snow
Guest
« Reply #4 on: March 15, 2012, 09:26:16 PM »

If you're going to learn Java, depending on how well you know programming, the following is the best place to go: see.stanford.edu

They have 3 programming courses and use Java in the first course. This is how I learned Java.

The courses are free, so you can download all the course material. I do suggest buying the textbook they use. The lectures are also recorded (very well I might add) and the programming instructor is insanely good.

The Java course is called CS106.
Logged
Cheezmeister
Level 0
***



View Profile
« Reply #5 on: March 17, 2012, 04:52:24 PM »

I'll echo zovirl here. Writing Java by hand is not fun. Eclipse is probably the most powerful tool, but it also has a rough learning curve--there's a lot of configuration that can be inscrutable if you're not used to it.

Make friends with these two pages:
http://docs.oracle.com/javase/6/docs/api/overview-summary.html
http://stackoverflow.com/questions/tagged/java

Another thing to keep in mind is that Java isn't particularly suited to game dev. It's perfectly doable, of course (I mean...Minecraft), but you have fewer options available to you than with, say, C# or Python. It sounds like you intend to use it for general-purpose programming (and don't forget Android) so you should be fine there, just thought I'd mention it.
Logged

Procrastinating on: Nextris, Chromathud, Spheres of Influence | More at http://luchenlabs.com/projects
My heart goes out to you for asking a simple question and getting a million complicated answers; it's sort of how this forum works... -Evan Balster
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile WWW
« Reply #6 on: March 17, 2012, 05:25:51 PM »

Oh, man that reminds me of college.  Computer Science exams, questions had to be answered on paper, in Java.  It sucked so bad. On the plus side, I became pretty decent at writing ampersands.
Logged

zovirl
Level 1
*


Mark Ivey


View Profile WWW Email
« Reply #7 on: March 17, 2012, 09:49:54 PM »

Eclipse is probably the most powerful tool, but it also has a rough learning curve--there's a lot of configuration that can be inscrutable if you're not used to it.

IntelliJ is also worth looking into, it has amazing refactoring tools. I learned it by pair programming with someone who knew how to use it well. They would yell at me every time I did something manually for which I should have used a keyboard shortcut, then make me undo and use the keyboard shortcut. This is an awesome way to learn but requires someone who knows the tool and is willing to teach you.

Another thing to keep in mind is that Java isn't particularly suited to game dev. It's perfectly doable, of course (I mean...Minecraft), but you have fewer options available to you than with, say, C# or Python. It sounds like you intend to use it for general-purpose programming (and don't forget Android) so you should be fine there, just thought I'd mention it.
And Tribal Trouble Smiley Yea, not a lot of games in Java, though there's no particular reason why you couldn't make games in Java...just that you wouldn't be following a well-traveled path. Good language to know if you want to write software, though.
Logged

Forest, a walking meditation game. (behind the scenes)
HTML5 fighting game, a game jam prototype.
www.zovirl.com
Windybeard
Level 3
***



View Profile Email
« Reply #8 on: March 18, 2012, 02:18:32 AM »

Hi all, thanks for the great advice, I instantly got eclipse the moment i started learning java on many recomendations and i can see why, it is plain awesome!

Im learning java for several reasons. Mainly because it will (hopefully) open some career options for me and secondly because i have tried C++ and its just too involved and i really dont have the patience. It is monsterously unforgiving.

I am very profficent with a programme called MMF2 and feel that its about time i took the leap into a real language. Im noticing huge similarites however MMF2 is visual but it all makes sense at some level.

I will be using Java to make games, as you all say it can be done. I have a few mates who code for a living and several in the gaming industry and alot of them seem to think java is the way forward. They may be wrong but it just feels like if i learn C++ i will have to then change to java in the future so i might aswell get a bit of a head start.

Thanks for the course info, im actually thinking about taking up a Sun Microsystem/Oracle course on the subject for my own personal progression.

So far im loving it, i have the basics down to a decent level im felling, and have just started studying game building in java however im thinking that a greater understanding of general software development first will greatly improve my coding skills rather thank just jumping into game dev, so ive been knocking up pointless accounting type software and silly other little projects with no purpose but im learning fast.

Again thanks for all the advice and any thoughts on my ideas would be great. Thanks
Logged

zovirl
Level 1
*


Mark Ivey


View Profile WWW Email
« Reply #9 on: March 18, 2012, 10:29:08 AM »

it just feels like if i learn C++ i will have to then change to java in the future

Heh, if you're a serious programmer you'll end up learning a dozen different languages eventually. Each one will be easier to learn because there will be similarities with languages you already know.

Java is a great one to have in your toolbox, but who knows? You might learn C++ at some point too.


im thinking that a greater understanding of general software development first will greatly improve my coding skills rather thank just jumping into game dev, so ive been knocking up pointless accounting type software and silly other little projects with no purpose but im learning fast.
Knowing general software development is useful, though I think you could learn it all working on games. Replace "accounting type software" with "virtual corporation game" or "stock trading game" and you're doing basically the same thing but as a game. I guess the important thing is to work on projects that motivate you.
Logged

Forest, a walking meditation game. (behind the scenes)
HTML5 fighting game, a game jam prototype.
www.zovirl.com
Windybeard
Level 3
***



View Profile Email
« Reply #10 on: March 18, 2012, 11:08:13 AM »

thanks for the advice Zovirl, ill most def be doing that!
Logged

Crimsontide
Level 3
***


View Profile
« Reply #11 on: March 18, 2012, 01:28:30 PM »

Oh, man that reminds me of college.  Computer Science exams, questions had to be answered on paper, in Java.  It sucked so bad. On the plus side, I became pretty decent at writing ampersands.

Ya we did everything in Java at university too, and like you on paper.  I learned to HATE java with a passion.
Logged
Dacke
Level 10
*****


I have never been to Woodstock


View Profile
« Reply #12 on: March 22, 2012, 04:36:44 AM »

Java totally works for game programming (and lets you compile to either Linux/Mac/Windows, Android, bad browser applets or even JavaScript+HTML if you use GWT). But language choice isn't even that important, just pick any big high-level language and never look back! Many of the skills you learn (even in MMF) are universal. Languages are just tools and it's what you do with them that matters. Eventually you'll become an excellent programmer as long as you do some kind of programming that is fun and somewhat challenging Smiley

One thing I would strongly recommend is to learn some basic git (or some other version control system, but git is the shit!).

Among other things, git makes it incredibly easy to make intelligent backups of your projects as you work on them. So if you mess something up or introduce a bug somewhere, you can revert your changes or find the exact commit where the bug was introduced. Git also helps you keep track of the changes you've made since the last commit (backup), so that you get an overview the effects your current changes are having. You can also create different "branches" of the project, so you can have an experimental branch that doesn't mess up the basic project. As the grand finale: Git doesn't add any extra complexity, it just places a hidden folder in the base-directory of your projects.

Git also makes it easy to keep all your code synced between all your computers, using for example github (which is awesome) or bitbucket (which has unlimited private repos).

Additionally git (or some version control) is an absolute must when collaborating with other people. You'll easily become the king of your anthill if you are the local git-wizard.

Git is easiest to use from a command line, because most online instructions are written for the command line. But it's also possible to use the (somewhat incomplete) egit plugin for Eclipse. I started by using a combination of the plugin and command line, but now I only use the command line.

More on git:
Official site: http://git-scm.com/

Online books, pick one and read the first half:
http://book.git-scm.com/
http://progit.org/book/

Good reference in the form of a tutorial: http://gitref.org/

Github also has lots of goodies at: http://help.github.com/
They have easy-to-follow guides, especially for using git with a remote server. While git works great locally on your computer, it is also nice to use in combination with a server (like github or bitbucket)

A good way to learn Java and git is to get engaged in a social github project (github is designed to be social and interactive). For example Catacomb Snatch (originally by Mojang) has a fork on github that has a big focus on helping new people getting started:
https://github.com/Maescool/Catacomb-Snatch/wiki
« Last Edit: March 22, 2012, 06:19:29 AM by Dacke » Logged

vegan • socialist • atheist • humanist • liberal • FOSSer
programmer • feminist • animal rights activist • pacifist • teetotaller
rivon
Level 10
*****



View Profile
« Reply #13 on: March 22, 2012, 09:13:44 AM »

I'd suggest Mercurial (Hg) over Git cause it seems easier and more user-friendly to me. Though Github is really great.
Logged
Nix
Level 10
*****



View Profile
« Reply #14 on: March 22, 2012, 09:32:41 AM »

There's Bitbucket for Mercurial, but I don't think it has the same social features as Github if that's what you're into.

If you don't have your heart set on Java, consider Python. It is a much better language to jump into (imo) if you want to wrap your head around a fully-featured programming language with lots of power and capability. You don't see a lot of (read: any) AAA titles programmed with it (not that you see any in Java either) because it doesn't have the speed of C++, but Python is used extensively in pretty much every other field. I won't mention it again, but please do take a minute to look at Python and ask yourself why you chose Java in the first place.

If you do want to stick with Java, I highly recommend the book "Killer Game Programming in Java" after you learn the basics. It will set you up with a solid understanding of the game loop and will show you how Java can be used in real projects.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic