Guide For Beginners: What Do I Do?
What Do We Teach?
On this site we have over 300 tutorials that teach you how to program. The current language that we support are C/C++, Win32, DirectX, OpenGL, C# and Java. We teach these programming languages through quality, easy to understand tutorials. You download these tutorials (or receive the CD, which has all 300+ tutorials), then read the comments in the source code to learn the principles and applications of the subject being taught. These tutorials are taught in a way that anyone could learn from. We pride ourselves on not just the quantity of the tutorials, but their simplicity to help you understand the topics covered. Many of these tutorials are written to help you learn the programming concepts through making games. The creators of GameTutorials have taught and do teach professionally. They know that students prefer learning programming through making games because it adds to the fun of learning something sometimes very hard. There are many compilers our there, but we choose to use Microsoft Visual Studio 2005. This is the best in our opinion and most widely used in the industry.
Programming is basically a way to talk to the computer and tell it what you want it to do. This is done by using a language that the computer will understand (like C/C++, Java, Pascal, Assembly, etc...). There are many languages, but we focus mostly on what professional software developers use most, C/C++. This is because it's a very powerful language. We recognize that other languages out there are good to use too, but we will focus on the most powerful language. For those who want to learn C# and Java, we start you off with the basics and show examples of doing 2D and 3D. Since some of the hardest programming is done with graphics, we focus a great deal on this topic.
Key Terms In Programming Defined
Programming Language - A language in which we can use to talk to the computer
and tell it what to do (I.E. C++).
Compilers Used to Program
Some of the most popular compilers use to compile C/C++ code are Microsoft Visual Studio, DevC++, Ming32, and Borland. Visual Studio and Borland compilers aren't free, but the rest of the compilers are. We highly recommend using Visual Studio 2005. You can get a copy of the C++ version for less than $100 dollars. This is the compiler that most professionals developing Windows applications use. We offer a free 180-day trial of Visual Studio 2005 with the physical copy of the GameTutorials CD. If you are programming in Java and decide not to use J#, then we recommend using Sun's NetBeans. You can find a link that includes NetBeans and Java bundles together here: http://java.sun.com/j2se/1.5.0/download-netbeans.html. We offer video tutorials for using NetBeans in the Video Tutorials section on our CD.
Programming - Hard, But Doable
We want to warn all you beginners out there that programming can be quite difficult and frustrating at times, but so can a marriage :) Both can also be very rewarding once you work them out *grin*. It does take work and time to learn and become comfortable with programming, at least for the majority of us. Eventually programming will click and you will love the amazing programs you can create. So don't give up! But don't assume it's easy and that you don't need to spend a great deal of time to get proficient. We are still learning everyday.
What Do I Do First?
If you are a beginner, the first thing you want to do is get our CD. We highly recommend purchasing Visual Studio 2005, or you can first try the 180-day trial we provide with our CD . If you want over 2 years of college programming knowledge, you will want to get our CD. It is by far the best programming investment you will ever purchase. Everything that we had to do to learn programming is on our CD, and more. Hold it sacred :) The second thing you want to do is actually start learning. You can do this by going through the order we give you in our tutorials. This order is: C, then C++, then Win32, DirectX or OpenGL, then Java and/or C#; it's up to you. You don't have to do C, but it's recommended to understand the differences between C++. When you get to 3D, you will want to choose a 3D API to use. Some like OpenGL, some like DirectX (Direct 3D). We recommend researching both, then you can decide which one better suites your software developing needs. If you want your program to be cross platform, OpenGL is the best, where DirectX is just for Windows operating systems (XBox uses it). The last step is to just immerse yourself in all of our tutorials and have a lot of time on your hands :)
When Can I Make Windows XP, Microsoft Word, a MMORPG or Quake3?
Honestly? Never! Well, unless you work for a company that is developing large application/games like that. What many beginners don't understand is that huge projects like these deal with HUGE teams of 20 to 300+ people. This includes artists, programmers, producers, designers, managers, etc.. These projects take years to create and cost millions of dollars. We see many times people wanting to start a huge project like these, but they don't understand what that means to create such a huge project. We don't want to discourage your dreams of creating cool applications/games, but we do want to give you a little slap in the face of reality :) We hope it doesn't sting too much. It is good experience to work on large projects, but we recommend that you make something that you can realistically create. That way you can have others use it, not just leave it in development mode for eternity. If you are interested in going into programming as a career, employers look very highly supon those who have finished projects in their resume, not work in progress projects.
What Not to Do
Following the same tone as the last question, we want to warn beginners of a pitfall that they might fall into while learning to program. The first one is, "dating" - don't do it, it takes to much time away from learning programming :) Just kidding. One pitfall that we find is beginners who have the proverbial "eyes bigger than their stomach" syndrome when it comes to programming. We mean that many beginners will have a huge project they want to do and they aren't capable of creating it. For instance, someone might learn C++ for a couple months, finish a class at school and then think they can do anything. They get some code on how to draw a 3D triangle and think they can just jump into 3D Programming. The truth is, the person hasn't even studied any graphics programming and doesn't even know how to create windows. What will happen is that that person will try and create a project way over their experience and knowledge and they can't do it. So, what happens next? They then depend on everyone around them to help them program every step of the project. They will never be able to program because they will always depend on others to supply them code or programming help to get what they want. In the end all they created is just some little code changes to other people's code. This is not the way to learn programming. Sure, getting help is great and necessary. We all have been there, but we are talking about the beginner code parasites that are formed from always going over their head :) This is why we suggest going through all of our tutorials. This will teach you what you need to know to be a proficient and self-sufficient programmer. It's an awesome feeling to be able to program pretty much what ever you want, and not have to stress about every step in the development process. Don't worry, at first it might be hard, but it will eventually click, we promise!
Direct3D Won't Compile, What is the Problem?
To compile and execute the Direct3D tutorials, you will need to make sure you have the Dircect3D SDK installed on your computer. The tutorials included on the CD were all compiled with the April 2006 SDK. Since links tend to change over time, the best way to get the latest version of the SDK is to do an Internet search for "DirectX SDK".
Once the SDK is downloaded and installed. There are a few more things that you need to do to utilize the SDK with Visual Studio. Following are the steps to have Visual Studio use the new DirectX SDK installed on your computer.
Once you've completed the above steps, you should be able to compile the DirectX tutorials.
*NOTE* It is recommend you always download and use the latest DirectX SDK. However, newer versions of the SDK may make code compiled against older versions of the SDK not compile anymore. Be sure to read Microsoft's release notes to see what difference there may be.
Is This Site Just For Game Programmers?
This site is not a game programming site, but teaches people to program through making games. In the past we were labeled as "just a game programming site", but this is not the truth. This site is for everyone wanting to learn to program. This includes those who have no desire to make a game, or even play games. The reason why we are called GameTutorials is because we teach people to program through making games, which is a more fun method in our opinion. No matter what programming you will do you will need to learn most, if not all of the stuff we have at GameTutorials.com. We don't teach anything we haven't needed to use ourselves. In our opinion, game programming is the hardest programming there is. This is because the technology is always increasing in graphics and you need to be on top of it. This means you need to learn how to program the latest 3D Video cards and amazing effects. There is networking, graphics, AI, logic, physics, database management, interface and tons of other subjects that a game programmer must learn to be able to be successful and proficient. For many people, they might never touch 3D programming in their software career, but since this site if for all programmers, we teach beginner to advanced concepts in 3D as well. We will continue to grow our advanced section so that it will apply more to professional programmers who are creating applications.
If you decide to not use Visual Studio 2005's J# for Java, we recommend using Sun's
NetBeans. When contacting Microsoft about J# we were told that J# was created
for people who already had a lot invested in Java and didn't want to rewrite their
code, but could compile it on the .Net framework with J#; however, there is a push
to use C#. If you have heard of J++, J# is the later version of J++ (which
is no longer supported). They both even use different runtimes.
For us, Java was probably the most difficult language we have ever encountered to
get started and everything setup. Sure, basic console applications were pretty
straight forward, but when it came to using external libraries, many, many hours
were spent trying to get it to first compile, let alone linking libraries when it
finally ran. Let's answer some basics questions about Java that we had when
beginning. Don't worry, we had to suffer so you won't have to :)
Why is My Teacher Making Me Learn Java?
For those of you who are students and have to learn Java, you probably are wondering
why you are learning Java if C++ seems to be the most powerful language, right?
Well, every language has its own benefits, but one of the great benefits of Java
is that it is easily run on many different operating systems, as well as being able
to integrate Applets into your web pages. Java also is great for developing
applications on mobile devices like cell-phone games. Another reason why Java
is being taught in schools is because it hides a lot of difficult concepts like
pointers, which most students find to be the most difficult topic in C++.
Java implements something called "Garbage Collection", which means you don't need
to worry about having memory leaks because Java handles the allocating and freeing
of memory for you. Finally, the last reason we have found is that in Java
you can start immediately creating Applets that allow you to draw things to the
screen. If you are doing 2D in C++ you have a lot of Win32 initialization
code just to get the window displaying to the screen; however, Java gives you a
window to start drawing to in a couple lines of code. Teachers can focus more
on the theory of programming instead of having to teach tons of Win32 code.
Yes, they are the same thing. Apparently, The JDK acronym was created as a cute PR title for Java. So yes, don't let that confuse you when the Java documentation tells you to have the Java SDK installed, then on a different line is talks about having the JDK installed.
This is another confusing thing at first. The JRE is the Java Runtime Environment;
which means that the JRE applications are called when running a Java application
on your computer or off the internet. When installing Sun's Java you will
want to get the JDK and JRE. Usually, the JRE and JDK will be installed in
separate folders in your "Program Files\Java\" directory if you are using Windows.
So, when installing external libraries and/or .jar files you will want to put them
in the JRE bin/ and lib/ext/ folders.
Another confusing thing at first is what a .jar file is. A .jar file is JUST
a .zip file renamed to a .jar file. You can rename the .jar file to a .zip
file and then extract it using Windows XP or Winzip. The directory structure
is important in the .jar (.zip) file. When including a library in Java you
will see some code like this:
What is a Package in Java?
A package is just a way to group source code files together. This source files
in the same package to reference each other's functions and classes. It is
also used to organize code. If you have programmed in C++, you can think of
it like a namespace. Each package is stored in the same folder. In our
tutorials we use mostly the "<default package>", which means that we don't
create a special package. When making real applications you will not want
to use the default package, but for learning the basics you should be fine.
Jogl is Java's OpenGL. This is an open-source project that allows Java developers to add 3D to their applications/applets. If you want to use Direct3D in Java you can look up Java3D. In our tutorials we show you how to setup a Java Applet that integrates OpenGL to render in 3D. For beginners it can be very frustrating to get Jogl or any external libraries to link with Java, so hopefully the next question will make it easy.
We will go over adding libraries assuming you are using NetBeans 5.0.
Probably the most frustrating thing about Java in the beginning is trying to get
Libraries to compile and link to your Java applications. Well, so that you
don't have to suffer for over 30 hours like we did, read the following information
:) First of all, let's go over working with the Jogl library since we teach
this in our tutorials. The same directions should work for most any other
external library. So, first you need to download the Jogl files. We
will assume you are using the Windows OS. So, first you would go to the Jogl
download page for Jogl 1.1:
Now, in order for the applet to work, we need to do one last thing in the Run section.
Go to the VM Options edit box and insert this:
You might see some other stuff in the edit box, like -Djava.security.policy=applet.policy, but just put a space between each command and you should be OK. The applet.policy file is just a text file that tells which permissions to grant when running the applet. Remember, if you installed the JRE to a different directory, use that directory instead of the one listed above, which is the default for version 1.5. That's it! Now you can add files an Applet file to your project and it should compile and run just fine.