Posted 15 March 2000 - 10:08 AM
I am considering writing some games using Java 2, but Java 2D is turning out to be kinda confusing. Are there any tutorials online that deal with Java 2D features that would be useful for games (i.e., BufferedImage, drawImage, WriteableRaster, etc.)? Thanks for your time and help.
P.S. I would like to write a sprite engine from scratch rather than using someone else''s code.
P.S.S. Seeing as how Swing components are automatically double buffered, would it be wise for me to just blit all my sprites to a JPanel from within it''s paintComponent method, allowing it to handle the double buffering for me?
class DisplayPanel extends JPanel
public void paintComponent(Graphics g)
Graphics2D g2 = (Graphics2D)g;
//...blit sprites to panel here...
Then, I could just call "panel.repaint()" from a Timer?