Sounds dangerous, since Swing (like most graphics packages) is not thread‑safe. There are ways to get around the problem of having to use the EDT, e.g.Eric Sweeten wrote:. . . I'd have the game loop run on its own thread, separate from the event dispatch thread. . . .
Junilu Lacar wrote:2. I want to draw the figure of a man. How do I do that? Is that too complicated?
2a. Then how do I draw just the head? I want to draw a circle. Ok, there should be info about that, let's find it.
2b. How do I draw the body? I want to draw an upright rectangle or maybe a skinny triangle. Ok, let's see how to do that.
Eric Sweeten wrote:
It is a lot easier and looks a whole lot better to use sprites. Drawing rectangles, circles, and lines is a lot to deal with and the end result is a stick figure and looks like crap.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |