Jump to content
  • Advertisement

Archived

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

Durden

Using Java to create a 2-D game

This topic is 5540 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 guys, I have to create a computer version of the simple 2-D board game called "MasterMind" for a class project. But I'm not quite sure how to go about it. I know Java pretty well (having taken two university courses on it). But I don't know zilch about graphics. My questions are: 1) Do I need to use something like DirectX along with Java to create this game? Does Java support DirectX? Will it be easier to use Java with DirectX or just Java alone? 2) Can someone tell me what Java classes I have to use to be able to manipulate graphics in Java? I want the player to be able to choose certain pegs and insert them in free positions. I also want the MasterMind "board" to be one giant graphic. Thanks for your help guys. Sorry if these questions seem silly, but I really don't know anything about graphics. If anyone has other useful information to give me, it'd be greatly appreciated. [edited by - Durden on April 19, 2003 5:11:29 AM] [edited by - Durden on April 19, 2003 5:12:11 AM]

Share this post


Link to post
Share on other sites
Advertisement
Another thing: I want to be able to use images (either bmps or jpegs) in my program. Does Java allow that?

Share this post


Link to post
Share on other sites
1) You don''t need to use DirectX to do graphics in Java. Some Java libraries can use DirectX. It will be easier for you not to think about using DirectX with Java.

2) The Java AWT framework can be used to do graphics in Java. You can create window-like components with it and draw onto them with either basic patterns or images (which can be retrieved using some ImageIO methods). You can also listen for mouse clicks using AWT.

All you will need comes with the standard JDK.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!