How to create a game. Basic steps.

So, just browsing through these forums, I see many posts by prospective game designers wanting to get started. But many of these questions are so ill-researched or off basis that most people don't even know how to respond.

So here's a quickie guide on how to get started learning to make a game. Notice I didn't say making a game. First you learn, then you make, or else you'll just get frustrated and quit.

Here's the basic steps:

1) You need to learn Java. Seriously, don't even think about writing a game if you don't want to. Get a book. My favorite was one by Ivor Horton. But really, any will do.

If Java is your first programming language, it is important for you to read through the book carefully and do the excercises. This is for you learn what a "programming language" actually is.

All a computer can do is add numbers. A computer itself knows nothing about Mario or how to make Mario jump. So YOU have to figure out, just what does Mario have to do with numbers.

2) Write a simple game, without animation in it.

My first game was Minesweeper. Other examples include Solitaire, or Poker, etc...

This teaches you how to organize a "large" program. Organization is important. If you don't organize, you'll begin writing a game, and eventually get stuck because your code is unreadable, and your bugs will be impossible to trace down. You'll be frustrated and quit.

3) Learn the concepts behind animation and a 2D game.

I see questions like: "I want to make a game, and I drew Mario. Now how to I make him move?". This is for you people.

Animation is drawing a bunch of images in rapid succession. And a game, basically is a logic system that decides which animations to play at any given time.

4) Write a 2D game.

Now, you are ready to attempt an actual game. I started small and wrote a tetris-esque puzzler as my first game with animation. I suggest you do the same, but if you feel ready you can probably jump into a major project now.

5) Learn about 3D.

For those aiming high, you can get started learning the concepts behind 3D now. I suggest you know at least a basic knowledge of trigonometry. This means know your sin, cos, and tan inside out, or else you'll up for a lot of work.

3D is not like 2D. There are quite a few concepts that you will need to learn, and they're not immediately intuitive. Those who have a stronger math background will progress faster. Those who have a weaker background will find it more difficult. But you'll learn a lot along the way. Nothing teaches trig faster than writing a 3D engine.

6) Write a 3D engine.

You're entering the hardcore right about now. Few people on this forum will have experience with this and you'll need to do a lot of thinking. Mainly, just because, there's not many people left to ask.

Some of you will have some ideas on writing this engine. In this case, I recommend you go ahead and try. You might not succeed, but trying will teach you more than anything else.

Those that don't quite have it down yet, or those that tried and didn't quite succeed can follow along with a book that takes you through this step. The book that I used was "Java game programming". It has a very in-depth section on 3D.

7) Make your engine fast.

This step is probably the hardest of all. If you completed step 6, you'll notice that writing a 3D engine, and writing a fast 3D engine is two almost completely different things.

Here's when you'll research into various computer science algorithms and techniques in order to speed up your engine. Actually, this is when you'll probably learn the concept of "algorithm".

This is research! You'll find almost no help at forums for this step. Nothing but hard work.

I can't comment on more than that, as that's as far as I've gotten so far. But that's the basic roadmap.

Good luck on your games.

-Cuppo

[4008 byte] By [CuppoJavaa] at [2007-11-27 5:32:43]
# 1

Thank you. That was really helpful. But let me ask you a question. are you writing or developing games just for yourself? what about the job prespective? is there a market outside if you develop games in java?

I am good in Math specially trignometry sin, cos tan, arctan, etc.

Overall good post.

lrngjavaa at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...
# 2

I've only ever written games for myself. I've done other Java projects commercially, but games were for my own enjoyment.

Is there a market for games in Java? Ehh...that's a tough question:

I'll clarify: If you write the game in Java, it occupies the same market as any other game. The consumer doesn't care whether your game is written in Java or C++ or hell..Hyperstudio.

Is there a market for Java game programmers?

Now that's a different question, to which the answer is, ...eh...no not really.

There's a limited market for J2EE or J2ME developers for cell-phone games and the such. But if you specialize in large 3D engines, and you are looking to get hired by EA, Java's not particularly impressive.

If you feel your math is up to the task. I wish you luck on your game.

CuppoJavaa at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...
# 3

Thank you. right now i am learning j2ee and suck for 2 days in writing my first servlet program. Anyways after this i will definitely go in java game development but i will do it once i have free time. I love games and would love to upload it on my website. :)

Planning to buy my first book"java game development for dummies". I learned alot from the first dummy java book and hope to pursue the same thing for my game development and then expanding my skills and buying a detail book.

Thank you Cuppo Java.

lrngjavaa at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...
# 4
wait so r u saying i should wait to make my game faster until after ive finished it?
stephensk8sa at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...
# 5

To clarify what I mean about writing a 3D engine and a fast 3D engine.

For a 2D game engine, no matter how you write it, it should be fast enough (or almost fast enough) for it to be playable.

To make a 2D engine faster, you can usually just make some minor adjustments to your engine.

For a 3D engine, if you don't write it correctly, the game will display perfectly fine, but will be so slow as to be unplayable. But to increase the speed of a 3D engine usually involves a complete re-structuring of your code and the implementation of specialized algorithms. This is not something easily done.

And if you can't even write a bare-bones brute-force 3D engine, you shouldn't even attempt to write a 3D engine with specialized fast algorithms.

But of course, if you know how the details about a 3D engine and know what algorithms you'll be implementing, go ahead and jump right to writing a fast engine.

...As a general rule of thumb...If you had to read my guide to get your started...then you're not ready to write a 3D engine.

Good luck on your endeavors

-Cuppo

CuppoJavaa at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...
# 6

Okay I am going to add a few points since they have come up recently.

With relation to what you should know with Java.

Beyond the basics you should get a good grounding in the following

- threading

- networking in Java (if applicable)

Threading

For threading you can use the concurrency tutorial found here http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html

Threading is really a must. No kidding. Because you will be unable to do anything performance wise without it. Additionally you can't normally take a non-threaded application and slap threading on it. You need to have a design that incorporates being threaded.

You also don't want to come up with a design to find out later that it's wrong. Don't be afraid to ask questions about your design in general and as how it relates to threading.

Making a good multi-threaded application is actually not all that difficult, once you understand it. But this is the thing that seems to trip up alot of people. I see an awful lot of bad threading code in the Java Programming forum. Tip: If you are using Thread Priorities you are doing something wrong!

Networking

The Java networking tutorial may be found here http://java.sun.com/docs/books/tutorial/networking/index.html

This is a basic tutorial though so don't assume you know everything there is to know once you have finished it. If you are serious about your development then I HIGHLY recommend the following book

http://books.google.com/books?id=l6f1jTB_XCYC&dq=Fundamental+Networking+in+Java&psp=1

As a bonus the author is a long-time member on these forums and a regular in the Networking forums.

Networking your program, especially depending on how you will use it is important to design into your game from the get-go. If you are planning to make a multi-player online game you need to know what the limitations are with regards to performance early in your development. If you build a beautiful game but it runs like a dog because of what you did in your networking code it would be a real shame and worse it may not be fixable.

Again don't be afraid to ask questions.

Restatement of CuppoJava's Comments

This is a good thread and that's why I am adding these comments to it. I would also say that I totally agree with the sentiments on what you should expect.

If you are new to Java and expect that in just a few months you are going to crank out a game with a custom 3-d engine you are in for a nasty surprise.

It isn't that we want to be discouraging, but please do try and set yourself realistic goals and time deadlines. You'll find it a much more positive experience and the less frustrated you are the more likely we are to be able to help you. :)

cotton.ma at 2007-7-12 14:59:10 > top of Java-index,Other Topics,Java Game Development...