Archived

This topic is now archived and is closed to further replies.

Dovyman

[java] 2d java

Recommended Posts

Dovyman    277
I have to take this java class at school, I''m already a seasoned C++ programmer so the transition is really only syntax based in most respects. But I''m thinking of doing a simple 2d game like pong or something for my final project, whats the standard 2d api for java? are there any better ones? animation support?

Share this post


Link to post
Share on other sites
princec    312
I''m inclined to say the best 2D API for Java is LWJGL because it''s based on OpenGL :D

Java2D comes with many unexpected pitfalls and subtleties which will quickly catch out and probably disillusion the unwary C++ programmer. Be warned - it doesn''t behave like you might expect. Unlearn your C++ ways or prepare to lose hair!

Cas

Share this post


Link to post
Share on other sites
nonnus29    105
quote:
Original post by princec
I''m inclined to say the best 2D API for Java is LWJGL because it''s based on OpenGL :D

Java2D comes with many unexpected pitfalls and subtleties which will quickly catch out and probably disillusion the unwary C++ programmer. Be warned - it doesn''t behave like you might expect. Unlearn your C++ ways or prepare to lose hair!

Cas


Examples? Just curious what specifically your talking about here...

Share this post


Link to post
Share on other sites
princec    312
Yes, that''s just what I''m on about. Strange techniques like ImageProducers and the subtle differences in BufferedImages and the images produced by the Toolkit. Knowing what is and isn''t hardware accelerated, and on which runtimes. That sort of thing.

You can at least be guaranteed under LWJGL for example that everything behaves exactly the same performance and technique-wise as the C counterpart so it''s pretty easy to pick up if you''re coming from C.

Cas

Share this post


Link to post
Share on other sites