[java] java game programming

Started by
4 comments, last by CaptainJester 16 years, 9 months ago
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?
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.


thanx a ton.. and duz it create a gui automatically?
Quote:Original post by parul_agrwl
thanx a ton.. and duz it create a gui automatically?


Console applications don't have a GUI.
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.
Before you try to make a game, you should be come familiar with the language. I would recommend that you do this entire tutorial from start to finish.


The Java Tutorial: http://java.sun.com/docs/books/tutorial/index.html
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]

This topic is closed to new replies.

Advertisement