HELP, how to start do a JAVA GAME

My final year project is title about JAVA game,i have find some information about it,but i so confuse and dont now how to start it,can every body give me some information about JAVA game for me this beginer? thanks

http://tinyurl.com/5w7fj

LOL!

Cas :slight_smile:

A little harsh perhaps.

Kev

Sorry couldn’t resist… but if people who wants help could write the questions abit more carefully and complete so we all can answer it I would be happy with what ever n00bie who need help.

limcheeguan you say your project is title(d) “about JAVA game”. Only a teoretic paper or are you going to make a game? What do you want us to answer?

  1. Game Idea
  2. ???
  3. Profit!!!

Couldn’t help myself :slight_smile:

[quote]1. Game Idea
2. ???
3. Profit!!!
[/quote]
For step 2, I suggest you steal underpants.
I have heard this works. :-/

Okay, a serious reply. :o

limcheeguan, Chet Hasse (who works on Java 2D) has just written two good articles about getting started with writing games in Java.
The articles essentially explain how to write a Pong clone in Java and most of the basic issues involved.

I suggest you start by reading those, reading the code (I assume you know Java already?), start writing some code and then come back here when you’ve got some problems.
People will be much more willing to give you some help if you show you have put in some effort before asking for help.

Here are the articles:

“Java Gaming: Understanding the Basic Concepts”
http://www.sys-con.com/story/?storyid=46663&DE=1

“Java Gaming: 2D Rendering”
http://www.sys-con.com/story/?storyid=46983&DE=1

Also check out Chet’s Weblog - it has heaps of insider information about the best ways to play around with images, which will be really important if you’re going to make a 2D game using sprites.

Good luck!

im dont know about the java language,but i need make a java game,so how i start?i need learn java language again?which part i need to learn?is it swing or awt?

If you want to learn Java from scratch, I mean scratch, start with this tutorial. It uses the HelloWorld Application and adds/modifies as you learn.

Learn it and see how you get on, then ask questions and be specific :slight_smile:

Hauk

http://www.cafeaulait.org/javatutorial.html

Edit: Forgot to post the link!

[quote]im dont know about the java language,but i need make a java game
[/quote]
I hope you know how to program.
Otherwise you’ll probably need about 18 months to do your assignment.

[quote]so how i start?i need learn java language again?which part i need to learn?is it swing or awt?
[/quote]
If you have an assignment to write a Java game and you nothing about Java, I think you really should be asking your teacher/lecturer what resources they can point you to in order to complete your assignment. I can’t imagine somebody giving out a “write a game” assignment without giving lessons/lectures on how to actually go about it!?

Failing that, start with the Java tutorial:

http://java.sun.com/docs/books/tutorial/

paying particular attention to the 2d Graphics chapter:

http://java.sun.com/docs/books/tutorial/2d/index.html

and then read the articles that I posted above.

You may also want to look at Space Invaders 101 (http://grexengine.com/sections/externalgames/articles/Kevin%20Glass-Space%20Invaders%20101-1.html), although I think Chet’s articles will give you a better introduction to the basics from your entry point.

Good luck!
(Sounds like you’ll need it :D)

i just left 2 months to finish it, my lecturer have no any rules for me,i no need do a advance game,my planing is do a small shotting game, but she say hope me don’t use the applet, she hope me use the thread, can anybody tell me what shold i do?

Now I don’t mean to insult you when I say this, but look up at all the resources that have been laid at your feet!

For a small shooting game, look at kevglasses Space Invaders 101.

[quote]she say hope me don’t use the applet, she hope me use the thread
[/quote]
If you don’t want to use an applet use webstart.
Here’s a link to get it working in java webstart:

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/index.html

Now look at this stuff, LOOK AT IT, and then come back with questions, PLEASE :wink:

Hauk

[quote]i just left 2 months to finish it

can anybody tell me what shold i do?
[/quote]

  1. Pray.
    Two months to learn Java and write a game is VERY little time.
    I will be surprised if you can do it.
    (I would be surprised if I could do it!)

  2. Ask your lecturer if she will accept a game that prints ‘Hello World’ to the screen.
    When she says no, repeat step 1.

  3. Download a good Java editor
    Most people would recommend IntelliJ, Eclipse or NetBeans. I like IntelliJ.

  4. Do an ‘introduction to Java’ tutorial.
    There are links to two of these above.

  5. Read some of the game-related tutorials above.
    I would suggest the Ping articles (sys-con.com) and then the Space Invaders 101 articles.

  6. Type in some of the code from the articles and get it working.
    Type it in, don’t copy it - only entering it yourself will let you figure out what’s going on.

  7. Start your own game.
    It will be easier to refactor the code you have typed in from the tutorial than starting from scratch again.

  8. Spend about 18 hours a day on it (with two 1 hour breaks) until it is finished.
    I seriously think it will take you this much time to learn Java and then write a game in two months.

  9. Use Google.
    It will get back to you with an answer much quicker than anyone on this forum.

  10. If you really get stuck, come back here and ask questions when you run into problems.
    We cannot help you any more until you’ve actually learnt something and started writing a game.
    Make sure you don’t ask general Java questions (i.e. not related to games programming) on this site.
    These should instead go on http://forum.java.sun.com/index.jspa
    You will probably find the answers to most questions you will have are already there.

May i know what javga game is the most easy to do?i mean is for beginner,is it Tetris or game like snake?look like i really haven no time to do it,so i hope to do a most easy java game,can anybody tell me?

[quote]May i know what javga game is the most easy to do?i mean is for beginner,is it Tetris or game like snake?look like i really haven no time to do it,so i hope to do a most easy java game,can anybody tell me?
[/quote]
I’d say tic-tac-toe.

Okay, heres Java game programming in a nutshell. This is an article from programmers heaven which is very useful and you should be able to learn it in about a week, or if you have a lot of time maybe 3 or 4 days.

He builds you up to making battleship. Theres’ 3 tutorials, I’ve read the first two for you and they are very relaxed and not too heavy.

Here’s the first topic:

http://www.programmersheaven.com/articles/userarticles/mark/tut1/tut1_1.htm

Here’s the second:

http://www.programmersheaven.com/articles/userarticles/mark/tut2/tut2.htm

Here’s the third:

http://www.programmersheaven.com/articles/userarticles/mark/tut3/tut3.htm

Now read ALL of this and come back with a status report or any questions.

AND will you post some of your research or code that you have written, so we can get an idea as to what you are doing, saying i don’t know what to do isn’t helping anyone and what i have given you the link to should help you out a lot!

NOW get reading/coding 8)

Hauk

AND post something solid!

[quote]May i know what javga game is the most easy to do?i mean is for beginner,is it Tetris or game like snake?look like i really haven no time to do it,so i hope to do a most easy java game,can anybody tell me?
[/quote]
Pong is pretty easy for starters. I used it to learn java. Only took me a couple of days. But then I knew the concepts behind 2d graphics, and how to program in other languages.

Collision is pretty simple. Don’t even need to load a pic. I think I did though. I don’t remember. Figuring out how to get a mouselistener to work was the biggest obstacle if I remember correctly.

The easiest game to do is “Guess the number”, and call it a text based adventure. :wink:

I wrote game in five days. So it’s not too hard if you know what are you doing. Have you read book, ever? It’s pretty strange, thread not applet. I would understand it if it would be application not applet, or even use multiple threads.

I remmember I had 2 days to learn all what other students could in a year. Nice D or C was a result.

What class is she teaching? How long you were taught and what?