How do I add gravity to a game?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

32 Replies - 9078 Views - Last Post: 08 December 2011 - 09:01 PM Rate Topic: -----

#31 The_Programmer-  Icon User is offline

  • Death Scythe
  • member icon

Reputation: 24
  • View blog
  • Posts: 593
  • Joined: 24-October 11

Re: How do I add gravity to a game?

Posted 08 December 2011 - 07:19 PM

View Postmacosxnerd101, on 08 December 2011 - 05:40 PM, said:

View PostThe_Programmer-, on 08 December 2011 - 01:37 PM, said:

Lol. Okay. But do any of you know how to make it so you can import an image which is a grid filled with different colored squares and based on those colors you could print images on a JPanel in the same grid arrangment but instead of the colored squares you could have images?

You may want to take a look at BufferedImage for examining each individual pixel. Also, see the GridLayout, JLabel and ImageIcon classes. The JLabel class has a setIcon() method you can use to pass the ImageIcon. Really, for much more sophisticated Image analysis, the JAI API is what you want to use.

Thanks! I think I'm going to work on making a user-friendly chat program right now.
Was This Post Helpful? 0
  • +
  • -

#32 Sheph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 432
  • View blog
  • Posts: 1,020
  • Joined: 12-October 11

Re: How do I add gravity to a game?

Posted 08 December 2011 - 07:31 PM

Quite a wide variety of projects. Do you ever finish anything? I do what you do, only I never get any finish projects. My most finished work is a compilation of all the stuff I write helping people here.
Was This Post Helpful? 0
  • +
  • -

#33 The_Programmer-  Icon User is offline

  • Death Scythe
  • member icon

Reputation: 24
  • View blog
  • Posts: 593
  • Joined: 24-October 11

Re: How do I add gravity to a game?

Posted 08 December 2011 - 09:01 PM

View PostSheph, on 08 December 2011 - 06:31 PM, said:

Quite a wide variety of projects. Do you ever finish anything? I do what you do, only I never get any finish projects. My most finished work is a compilation of all the stuff I write helping people here.

Lol. I just keep moving around to different stuff. I don't know why... Maybe it helps me get better at things? If you could tell me to make something that you think I could make, I will work on it as a main project.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3