Reputation:
Basicly, I have an falling sand type game that is getting pretty complex and laggy, and my friend which is also working on it keep saying me that the double buffering is the main source of lag. I know that without double buffering, the game would be totally unplayable. So, is there another way to have smooth graphic and better performances, or this is impossible and I should just deal with it?
Thanks
Upvotes: 0
Views: 341
Reputation: 399
I assume you currently use Java2D. You can easily run into trouble regarding performance. Sometimes simply changing the image format is sufficient to make your application run twice as fast. You are probably looking for something like this: What are some faster alternatives to Java2d?
For a real computer game (more complex graphics or not) you could entirely switch to openGL. There is LWJGL that also provides input and audio playback for games: http://lwjgl.org/
Upvotes: 1