Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] How do I write a fast sprite engine with Java 2?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Hookflash   Members   -  Reputation: 122

Like
Likes
Like

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. Hookflash 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? i.e., class DisplayPanel extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; //...blit sprites to panel here... } } Then, I could just call "panel.repaint()" from a Timer?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS