Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: Where do i start?

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Where do i start?

    Ok so I know all of the basics of java and even most of the advanced java as well. I wanted to start getting into game making. I know i cant just strait into 3d zombie fps. So i was wondering if any one had any referrals for a good java gaming book or maybe a tut on the internet to help me understand how making a game engine is. Preferably with sprites and the such.

    Thank you.


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Where do i start?

    Search for a game development forum. It looks like this site does not have one but I have seen other sites that do.
    Improving the world one idiot at a time!

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Where do i start?

    I am considering adding a dedicated Game Development forum as we seem to be getting more and more members interested in the subject.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  4. #4
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: Where do i start?

    KevinWorkman will be along shortly, I'm sure

    Perhaps we could persuade KW to turn "Escape from Monster City" into a MMPORG tutorial. I reckon it stands a good chance of being a poor-man's Tremulous - YouTube with a little effort on a back-end. I particularly look forward to the article on gloom-culling for enhanced scalability.

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Where do i start?

    Quote Originally Posted by cejay View Post
    Ok so I know all of the basics of java and even most of the advanced java as well.
    I've been programming for almost a decade and I still don't know all of the basics or most of the advanced stuff!

    Quote Originally Posted by cejay View Post
    I wanted to start getting into game making. I know i cant just strait into 3d zombie fps. So i was wondering if any one had any referrals for a good java gaming book or maybe a tut on the internet to help me understand how making a game engine is. Preferably with sprites and the such.
    Here's the problem- there is no one right way to go about making a game. Different people are going to have different approaches, and different games are going to require different approaches. I'm sure there are books and tutorials out there, but they're probably not going to agree with each other on everything.

    If you want my $.02, I recommend starting extremely small- most of my games start with a ball that the player moves around the screen with the arrow keys. That might sound boring, but you're already entering into slightly advanced territory- you need a game loop, a boolean system that responds to key input, and a rendering system. You'll also need a coordinate system, deltaX and deltaY math, etc. All of which can be tweaked for a different feel- try adding acceleration and deceleration, for example, or playing with aspect ratios (what happens when the user resizes the game). A simple moving ball is not so simple anymore.

    If I were you, I'd use a basic Swing Timer for the game loop at first- set it to maybe ~20 fps. Update the coordinates of the ball in the Timer's actionPerformed() method based on booleans you set in a KeyListener, and call repaint on a JPanel or JComponent that you've extended to override paintComponent(). In the paintComponent() method, draw your ball.

    From there, you can add collision detection to make sure the ball doesn't go off the sides of the screen- what should happen? Should it stop? Bounce? Go to the other side of the screen? Then when you have that, you can add some non-wall collision detection using similar logic (rectangles in the middle of the screen, for example). From there it's not too hard to write Pong or Breakout.

    Then as you get more advanced, you can swap out the simple things as you need them. Your Timer might eventually turn into a 60 fps thread. Your paintComponent() might turn into custom double buffering using a BufferedImage. You might look into using a library for physics or pretty rendering or sounds eventually. But don't worry about that stuff yet.

    Again, that's just my approach, and different people will disagree with me. Also, you might look into Processing, which gives you a lot of this stuff for free on top of Java, but I've been obnoxiously evangelizing that enough lately.

    Quote Originally Posted by Junky View Post
    Search for a game development forum. It looks like this site does not have one but I have seen other sites that do.
    The go-to Java gaming forum is JGO: Java-Gaming.org - home of the largest java game developer community But a lot of what they do is pretty advanced. For the entry-level stuff, I'd stick with us. :p

    Quote Originally Posted by JavaPF View Post
    I am considering adding a dedicated Game Development forum as we seem to be getting more and more members interested in the subject.
    That would be awesome, exactly for the above reasoning- a lot of gaming forums focus on the more advanced stuff which oftentimes goes over my head. That's great and necessary and all that, but it would also be awesome to help novice programmers enter that world as well.


    Quote Originally Posted by Sean4u View Post
    KevinWorkman will be along shortly, I'm sure
    How did you know?! Am I that predictable?

    Quote Originally Posted by Sean4u View Post
    Perhaps we could persuade KW to turn "Escape from Monster City" into a MMPORG tutorial. I reckon it stands a good chance of being a poor-man's Tremulous - YouTube with a little effort on a back-end. I particularly look forward to the article on gloom-culling for enhanced scalability.
    Geeze, my stuff is nowhere near that quality! I don't touch 3D or networking at all, haha. At least not yet! I am working on a non-LD version of the monster game, though!
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Junior Member
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Where do i start?

    Quote Originally Posted by KevinWorkman View Post
    I've been programming for almost a decade and I still don't know all of the basics or most of the advanced stuff!
    Ha Ha i ment i know the basic mechanics like how it flows and stuff XD. and some random advanced things, which probably aren't considered advanced to most XD.

    Quote Originally Posted by KevinWorkman View Post
    If you want my $.02, I recommend starting extremely small- most of my games start with a ball that the player moves around the screen with the arrow keys. That might sound boring, but you're already entering into slightly advanced territory- you need a game loop, a boolean system that responds to key input, and a rendering system. You'll also need a coordinate system, deltaX and deltaY math, etc. All of which can be tweaked for a different feel- try adding acceleration and deceleration, for example, or playing with aspect ratios (what happens when the user resizes the game). A simple moving ball is not so simple anymore.
    Thank you very much, Thats exactly what i was looking for. So I will need to get familiar with the swing api (i think its an api haha). Im not going to lie i havn't programmed in like 2 months so its kind of sketchy on the technical stuff.

  7. #7
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Where do i start?

    Quote Originally Posted by cejay View Post
    Thank you very much, Thats exactly what i was looking for. So I will need to get familiar with the swing api (i think its an api haha). Im not going to lie i havn't programmed in like 2 months so its kind of sketchy on the technical stuff.
    In that case, you might first try to create an old-school command line game before you delve into the world of GUIs and Timers.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    Junior Member
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Where do i start?

    aighty then so im guessing the swing api has jpanel? and if i do the tutorial on the java site it will help alot with starting my games ha ha. i sure hope so

  9. #9
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Where do i start?

    Quote Originally Posted by cejay View Post
    aighty then so im guessing the swing api has jpanel? and if i do the tutorial on the java site it will help alot with starting my games ha ha. i sure hope so
    Yes, JPanel is a part of Swing, and the Swing tutorial would teach you how to use it. However, if you're still new to programming in general, I'd recommend sticking with something non-visual for the time being.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  10. #10
    Junior Member
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Where do i start?

    I'm actually pretty comfortable with java. But if it starts getting out of hand i might go back to just making my black box say stuff XD ha ha

Similar Threads

  1. Start With JAVA
    By infoprovider in forum The Cafe
    Replies: 2
    Last Post: July 28th, 2010, 04:34 AM
  2. Start code again?
    By mortalc in forum Loops & Control Statements
    Replies: 12
    Last Post: May 27th, 2010, 07:26 PM
  3. [SOLVED] selection end and start
    By nasi in forum What's Wrong With My Code?
    Replies: 13
    Last Post: May 10th, 2010, 04:05 AM
  4. Illegal start
    By hing09 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: March 25th, 2010, 05:23 PM
  5. Where to start?
    By tonykasdorf in forum Java Theory & Questions
    Replies: 3
    Last Post: March 4th, 2010, 11:52 PM