views:

208

answers:

2

I am developing a simple multiplayer 2d game of pacman in java for my assignment at university and I want to be able to draw stuff onto this window as well as pick up keyboard input. What would be the best way to do this? Currently for the GUI I have http://pastebin.com/m1009789e Which works fine on the windows machine that I am developing on. But as soon as I try and run this on Mac OS Leopard on a Macbook Pro it takes 3/4 seconds to do the paint method and I don't understand the reasons why? any pointers/advice would be appreciated.

+5  A: 

I think the question is way to broad to have a good answer. Drawing stuff with java is one thing, input is another. And the draw routine being slower on OSX is a third.

Try to look up some tutorials and when encountering a specific problem, ask a question about that, you will get better answers that way.

Also, if this is a school assignment, consider adding the "homework" tag to the question.

mizipzor
I agree with you.
OscarRyz
Divide and conquer... the sum may seem insurmountable, so tackle one thing at a time. With each success the rest gets easier.
JMD
+1  A: 

The question is actually pretty broad. To get you started this book has a few good infos on the different aspects on programming a game in java, even if the code could be cleaner.

Axelle Ziegler