• Advertisement

Archived

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

[java] Graphics for a Java Game

This topic is 6311 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

Hi, I'm kind of a beginninging programmer and I have a little bit of a question. I'm currently in the process of learning Java, and I'd like to write a 2D tetris knock off. For one, just to get some general practice with Java, and two for practice working on a game. I'm really into both video games and programming so, i figure thats where i'm gonna try to head with my up and coming career . So my question is this. What should I use to do the graphics for my game. I have no experience whatsoever with Java2D, OpenGL or anything so i'd be starting from scratch with whatever i decide on. Hrmm... so I guess thats about it. Thanks in advance. -John Conrad Edited by - JohnConrad on 10/10/00 11:11:08 AM

Share this post


Link to post
Share on other sites
Advertisement
Well if you''re a beginner, why attempt to try java2D or opengl now?

Why don''t you learn the basics of java.awt then add java2D or even ogl after that? Besides, java2D mainly has features to spice up the game like transparency, gradients, etc..

There are plenty of books out there and just to name a couple off the top of my head, I learned java (in school) with Sam''s Teach Yourself Java 2 in 21 days. I''ve also heard people around here saying something about Game Programming in Java for Dummies (or something like that).

Smoo

Share this post


Link to post
Share on other sites
Well I''m not THAT much of a beginner. I have a pretty firm understanding of AWT, like I said I''m still learning but I could write a decent GUI with it. I didn''t think there was a way to load an outside image without using something like Java2D though, which is the main reason why I''m asking about that. At least that kind of stuff isn''t documented in the book I''m learning from. I wanted to use some of my own artwork for it to make the game look a little nicer. If there are ways of loading, say a bitmap for example, without using an extension like what we''re talking about, do you think you could point me in the right direction? Thanks.

-John Conrad

Share this post


Link to post
Share on other sites
If you are doing an applet, just use getImage() in the java.applet.Applet class. If you are doing an application, just use getImage() in the java.awt.Toolkit class.

Hope this helps

Share this post


Link to post
Share on other sites

  • Advertisement