• Advertisement
Sign in to follow this  

[java] java game programming

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