Ok, well I'm making a simple 2d game, I'm planning on having a grid map,but this map always repaints with player which causes lag, is there a way of making some sort of layer system.
Would JPanels or panes work?
Printable View
Ok, well I'm making a simple 2d game, I'm planning on having a grid map,but this map always repaints with player which causes lag, is there a way of making some sort of layer system.
Would JPanels or panes work?
Well, what I did when I was using paint for my games, was have objects (usually Jpanels or JLabel) that I painted into. The way to keep everything as a layer is to manipulate the add() function. The first thing you added will be at the bottom and the last thing you added will be at the top.
Will try that, thank you!