Report article RSS Feed Be the Man: Beginning Games Programming #1 - First Steps

The first in a series of programming tutorials aimed at aspiring games programmers, who have never seen code before. This tutorial introduces the programmer, the most basic programming concepts, and handles the simplest application (Hello World) in C#, C++ and J2SE (Java) as an introduction to code and development environments.

Posted by ambershee on Oct 7th, 2009 Page 1 of 8    
Basic Client Side Coding.

Please note, that this is an early draft of the tutorial, and may be prone to some errors. Please give feedback!

There are a great many people involved in the computer games industry today, each fulfilling an important role in the development of a game, whether it be a triple-A blockbuster with a budget to rival its Hollywood counterparts, a lightweight and efficient application for a mobile device such as a phone, or even a simple flash based game for deployment on the internet. These people may be artists, producing identifiable, and often beautiful characters, environments and objects for use within the game world. They may be audio engineers or musicians, producing sound effects that bring the world to life, musical scores that enthrall and capture the mind, or the voices that we hear that make a story real. They may be managers, overseeing the structure of the project, it's development and it's finances, keeping the team itself operating and from falling apart into chaos. They may be designers or testers, or any number of other supporting staff, who each do their part to keep the project on track and ensure the software develops on schedule and as functional as it should be.

But there is one part of that team that is undeniably more important than any of the others - the software engineer, the programmer or the coder. Whilst each of the former may play a fairly critical role in the development of a game, without the programmer, there can be no game at all. It is the programmer who crafts the software, ties the assets together and makes the game behave in the manner in which it is intended. Without that, all of the art assets, the audio and everything else is useless.

Thus, this tutorial series will help take your first steps into becoming that essential lynch-pin in the development of the computer game - Be the Man (or Woman), and take your first steps into becoming the Games Programmer.

These tutorials are for anyone who wants to begin programming games. They're aimed at the absolute beginner, and should be followed in sequential order. Each will introduce and develop a basic concept that will improve one's skills as a programmer - and will be demonstrated in three different programming languages that are commonly used in the games industry (and other software industries) today; C++, C# and Java (J2SE). The series will later branch off into various specialty forms of programming, touching on development of graphical applications, networking, specific technologies and more. But every person takes the same first baby steps - the simple, console application.

Notably, these tutorials won't teach you everything. The only way to become a competant programmer is to simply write code and learn from doing. You'll want to follow the tutorials to help you grasp core concepts, but go out and write your own code of your own devising, in order to solidify that understanding. Over time, many concepts will become second nature, and things may get less confusing - but there is always more to learn and more to understand; knowing that is the first step in the battle. No matter how experienced you are, you will never know everything there is to know about developing software.

Now let's take a look at what this 'programming' lark is all about...

Post comment Comments
eXeC64
eXeC64 Oct 7 2009, 4:47pm says:

Prehaps on page 5 use cin.get(); instead of that long line. It has a very similar effect (waits for enter key to be pressed) before letting the program continue.

It's far less intimidating on newbies =]

0 votes     reply to comment
ambershee
ambershee Oct 7 2009, 5:47pm replied:

Yeah, I could probably do that. Out of habit, I usually do use the more complex 'any keypress'. It's just what I learnt when I first started programming.

+2 votes     reply to comment
cheesemoo0
cheesemoo0 Oct 7 2009, 5:15pm says:

I love articles like this! Keep it up.

+2 votes     reply to comment
Ark_
Ark_ Oct 7 2009, 5:18pm says:

This looks like it will shape up into a nice series for tutorials.
At the moment I'm a mapper and modeller but I would like to learn how to program for games.
So thanks for the tuts and good luck.

+1 vote     reply to comment
NullSoldier
NullSoldier Oct 7 2009, 8:19pm says:

From the land of managed game programming, you should start out by teaching C#. It's easy to pick up, and XNA is extremely easy to use in comparison with SDL and Allegro for new game programmers. I'll make managed game programming popular even if it kills me!

+1 vote     reply to comment
ambershee
ambershee Oct 7 2009, 8:41pm replied:

The aim here, is instead of introducing only one way of doing things, is to go for a broader perspective from the start. Whilst I'm running the risk of confusing people with multiple languages, I'm hoping that an approach that covers the different perspectives from the beginning shouldn't work out that way; all three languages are fundamentally very similar (and in the case of the next tutorial (variables, operators, arithmetic), practically identical...), they're almost identical. Where they'll diverge, comes a little bit later - but it's not a bad selection - where C# is managed, unmanaged C++ is the main industry standard - and then Java and Eclipse is a whole different perspective all together, and still widely used.

thanks for the feedback :)

+2 votes     reply to comment
NullSoldier
NullSoldier Oct 8 2009, 12:23am replied:

Yeah, great tutorials! I just had to add my two cents in because I believe managed code game programming has it's place in the market. (Xbox live arcade for one)

0 votes     reply to comment
Feared
Feared Dec 9 2009, 12:08am replied:

Managed? Blech!
Native please.

+2 votes     reply to comment
BadgerDeluxe
BadgerDeluxe Oct 7 2009, 9:30pm says:

OMG WIN! Thank you so much for this article, this is exactly what I need right now!

+1 vote     reply to comment
dill1233
dill1233 Oct 7 2009, 11:27pm says:

I love where your going with this, but as a intermediate C# programmer, I don't think I quite fit this article. Yet, I'm sure by the middle of this series I'll be thanking you so much for providing me with such great information. By the way, I think it's funny how the differences in length of the different languages vary so much. I think C# is just perfect where it stands on length and complexity.

+1 vote     reply to comment
Necromunger
Necromunger Oct 7 2009, 11:39pm says:

umm can you go any further with this in c++ because the basics is easy enough i want to go to the next step after classes and functions

+1 vote     reply to comment
ambershee
ambershee Oct 8 2009, 4:44am replied:

The series will go further, but it will take a lot of time. A simple tutorial like this takes around four to five hours to prepare and to write, and there's a lot of ground to cover in the mean time.

+1 vote     reply to comment
Arxae
Arxae Oct 9 2009, 7:40am says:

for the csharp code, you only need "using System;" :3 the rest is not used and can be left out :)

+1 vote     reply to comment
ambershee
ambershee Oct 9 2009, 9:55am replied:

You can do that, but I just left in what was automatically generated by Visual Studio.

+1 vote     reply to comment
Arxae
Arxae Oct 9 2009, 11:52am replied:

ah like that :3 well you could do that to, i prefer to only have the usings in there when i actualy use them xP

general comment tho: i saw you liked the complex solutions more (out of habbit) but this is a beginners tutorial :p so i would advise not to use those solutions and keep it simple xP (but i think your well aware of that)

+1 vote     reply to comment
Artinier
Artinier Oct 11 2009, 10:34pm says:

Hey, Awesome Work :D.
I know that you said making these tuts is a time consuming process but is there any laid out timeline for there release. Eg Once a month or so forth.

Thanks for the awesome tut

+1 vote     reply to comment
ambershee
ambershee Oct 13 2009, 2:42am replied:

It's literally a case of when I can do it. I'm aiming for one a week or so, but whether I stick to that schedule is another matter - the next tutorial for example is quite a long one, since it covers a fairly broad spectra (variables, operators, input and arithmetic.)

+1 vote     reply to comment
Artinier
Artinier Oct 14 2009, 6:43am replied:

Sweet cant wait.

Thanks for the reply.

+1 vote     reply to comment
pitchblack00
pitchblack00 Oct 14 2009, 11:36pm says:

I don't see a point of another hello world tutorial, there are thousands of them on internet. I advise you to talk more about structure of modern game code, rather than general programming introduction. Like how do you get camera working, models showing up, animations playing, some intro into shaders and don't try to cover each and every topic completely but point to learning resources instead.

+1 vote     reply to comment
ambershee
ambershee Oct 15 2009, 4:49am replied:

The point is that this is a series of tutorials; not and individual tutorial. It's aimed to start at the absolute beginning and specifically is not aimed at any specific API - and couldn't really be given that it covers three different languages. The purpose is to do something that other tutorials do not do - and that's cover an object orientated approach, and multiple languages from the absolute beginning. The series will then later branch into more specific topics; one of which is being written simultaneously and considers game scripting in Unreal Tournament 3. Other branches will later cover mathematics and rendering, and another both OpenGL and DirectX simultaneously.

+2 votes     reply to comment
PiNwOrM45
PiNwOrM45 Nov 22 2009, 12:27am says:

edit: ignore me, missed a step :P thanks for this

+1 vote     reply to comment
PiNwOrM45
PiNwOrM45 Nov 22 2009, 1:09am replied:

Now that I've done it and got it working, are you still planning on released more parts? I know it takes work, but you said you planned for a week and it's a month later. I'm having a helluva time learning how to really get started.. All I can find are articles like this that overview the basic codes and give a basic idea, but nothing more advanced. That and people offering to tell you how for cash. So yeah, are you planning on releasing more? or does anyone have a good site I can check out that's on this tutorials level of knowledge, to learn the next steps? Thanks

+1 vote     reply to comment
ambershee
ambershee Dec 2 2009, 12:08pm says:

I do plan on releasing more - although I have actually been extremely busy over the past few weeks or so (and have also had to replace one machine due to a raid 0 failure). I've revised a large part of the original unreal programming tutorial series that I also have (which aims to be incorporated as an extension of this series in future), but I haven't been able to get back up to speed with this series yet.

The next tutorial is an incredibly long one and has taken an awful lot of time to get it as complete as it presently is. I may have to split it into multiple tutorials, although I really did want to get the content into a single tutorial as it is all related. It's presently effectively a heavy book chapter.

+1 vote     reply to comment
Sir_Nicholaz
Sir_Nicholaz Sep 22 2011, 3:16pm says:

I guess this died out or something?

+1 vote     reply to comment
catharsis20
catharsis20 Dec 17 2012, 5:38am says:

Thanks! What's next?

+1 vote     reply to comment
christopherlayton5
christopherlayton5 Sep 6 2013, 10:17am says:

I enjoyed the freak out of this. Though I noticed you didn't have any more of the series posted in your tutotials section. Probably busy, but I'll pretend to rage anyway.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Groups
Shee Labs Game Development
Shee Labs Game Development Developer & Publisher with 14 members