• Advertisement

Archived

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

[java] 2d java

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
Not knowing exactly what he means, I''m guessing he''s referring to the fact that the Java 2D API is very different than the way most C/C++ graphics APIs work.

http://chaos.webhop.org

Share this post


Link to post
Share on other sites
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

  • Advertisement