Jump to content
  • Advertisement
Sign in to follow this  
parul_agrwl

[java] java game programming

This topic is 4116 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 am new to game development and i cant figure out how to create a game as a java console application.. is there a tutorial or sum sort of guidance available?

Share this post


Link to post
Share on other sites
Advertisement
Make a file "Game.java".

Put:

class Game {
public void run()
{
// game stuff
}

public static void main(String[] args)
{
Game game = new Game();
game.run();
}
}



And that's the console application, implemented by Game class.


Share this post


Link to post
Share on other sites
Quote:
Original post by parul_agrwl
thanx a ton.. and duz it create a gui automatically?


Console applications don't have a GUI.

Share this post


Link to post
Share on other sites
It only makes a console automatically, and you can argue that that's a GUI.

If you want a window, you have to make one yourself using a library like java.awt or javax.swing, which you can find tutorials for on Google.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!