Results 1 to 13 of 13
Like Tree1Likes
  • 1 Post By KevinWorkman

Thread: best book/tutorial to learn how to make 2d java games

  1. #1
    nicocannon is offline Member
    Join Date
    Dec 2014
    Posts
    30
    Rep Power
    0

    Default best book/tutorial to learn how to make 2d java games

    Ive been looking around and Im totally confused about making 2d games in java. What is the fastest way to make a 2d game in java? what should I use? where can I learn it?

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: best book/tutorial to learn how to make 2d java games

    Confusion tends to come from wanting to do things too fast. As such, people tend to dig themselves into that hole without it being necessary. Take your time dude, I hope you want to be doing this for fun rather than for anything else.

    When it comes to tooling you should probably go for LibGDX: libgdx . Where it comes to becoming less confused, I'm afraid that will be a long process where you slowly and surely adopt more understanding of the theoretical side of game programming. Java game programming to me has a slight disadvantage as most material you will find on game programming does not target the Java platform at all; game programming has always been the domain of C/C++ and more recently C#, only a niche crowd of enthusiasts use Java and only a very small percentage of that niche crowd manage to make a buck on it. They all visit Java-Gaming.org - home of the largest java game developer community by the way, so you will find plenty more information there.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    nicocannon is offline Member
    Join Date
    Dec 2014
    Posts
    30
    Rep Power
    0

    Default Re: best book/tutorial to learn how to make 2d java games

    do you think killer game development in java is good for 2d?

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: best book/tutorial to learn how to make 2d java games

    Its a REALLY old book. You can still learn generic game programming things from it, but you won't learn to use up to date technology.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    15

    Default Re: best book/tutorial to learn how to make 2d java games

    If you're just starting out, I highly recommend you check out Processing. It's built on top of Java, but it makes it much easier to get something visual and interactive up and running, without all the extra boilerplate of Java.

    From there you can more easily transition to Java, and then on to libGDX.

    Shameless self-promotion: I've written a bunch of tutorials that start with Processing and go through Java, available at Static Void Games, including this Hour of Code that shows you how to code Pong.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    15

    Default Re: best book/tutorial to learn how to make 2d java games

    Quote Originally Posted by gimbal2 View Post
    only a niche crowd of enthusiasts use Java and only a very small percentage of that niche crowd manage to make a buck on it
    The one huge exception to this rule is Android.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: best book/tutorial to learn how to make 2d java games

    Really? In my eyes there is too much competition there to really make it worth the effort. I'd be curious to see how many games released in a year see between zero and 50 downloads only.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  8. #8
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    15

    Default Re: best book/tutorial to learn how to make 2d java games

    Quote Originally Posted by gimbal2 View Post
    Really? In my eyes there is too much competition there to really make it worth the effort. I'd be curious to see how many games released in a year see between zero and 50 downloads only.
    Oh, I didn't mean it was a huge exception in the money-making category. I just meant that many (most?) Android games are done in Java.

    Although, saying "Java games don't make money" is a bit unfair: 99.99% of games in **any** language don't make any money.
    gimbal2 likes this.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  9. #9
    nicocannon is offline Member
    Join Date
    Dec 2014
    Posts
    30
    Rep Power
    0

    Default Re: best book/tutorial to learn how to make 2d java games

    I dont really want to make money I just want to do it for fun so I can play it. I just wanna know a good book on 2d games?

  10. #10
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: best book/tutorial to learn how to make 2d java games

    Quote Originally Posted by nicocannon View Post
    I dont really want to make money I just want to do it for fun so I can play it. I just wanna know a good book on 2d games?
    What are you looking for in a gaming book? For example, if you were writing a compiler you probably want to understand BNF, code generation, state machines, lexical analysis, register management and a bunch of other things. But you probably won't find a step by step process of actually writing a compiler. So you take the basics of a programming language, apply compiling techniques as well as stuff learned from a data structures course and write a compiler (and its not easy).

    So I would think a book on writing games would be similar. Quite possibly boring except for the CS student or advanced layman who is interested in specific aspects of gaming but not in having a cookbook approach.

    Then there is the cookbook approach which carries you piece meal through writing a game but doesn't have much depth.

    Just something to think about.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  11. #11
    nicocannon is offline Member
    Join Date
    Dec 2014
    Posts
    30
    Rep Power
    0

    Default Re: best book/tutorial to learn how to make 2d java games

    how do you listen for a user holding down a key to like move a sprite?

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: best book/tutorial to learn how to make 2d java games

    That depends on what technology you are going to use... And then when you have chosen that you look it up in the documentation.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  13. #13
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: best book/tutorial to learn how to make 2d java games

    Quote Originally Posted by nicocannon View Post
    how do you listen for a user holding down a key to like move a sprite?
    Your question sort of makes my point. That is essentially no different than listening for the user to enter text in a text box and reacting in real time to what is typed. Or manipulating the cursor in a text box. It is not really related to gaming. It is applying basic Java (or programming techniques in general) to writing a game. If you understand the event and image capabilities of Java you can move a sprite or any image (or even draw text).

    I tend to equate the question as to "are there any good books on how to write a word processor?" Or "how to write a spreadsheet application?" The tools and knowledge required don't come from specific books on the target app. They come from understanding the Java programming language.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Best Book to Learn Java?
    By shuttlelauncher in forum Forum Lobby
    Replies: 5
    Last Post: 08-31-2013, 01:10 AM
  2. Best Book to Learn Java
    By Xeronate in forum New To Java
    Replies: 1
    Last Post: 05-11-2013, 09:45 PM
  3. What book should I buy to learn Java
    By kkid in forum Forum Lobby
    Replies: 3
    Last Post: 10-20-2012, 09:18 PM
  4. What's the best book to learn JAVA
    By ncode in forum Forum Lobby
    Replies: 1
    Last Post: 08-29-2012, 07:52 PM
  5. Replies: 7
    Last Post: 09-18-2011, 06:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •