Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).

Share tech news, updates, or what's on your mind.

Sign up to Post

Code Performance
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
1
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris.

Well, a long time ago, in a galaxy far far away, I was a highly-skilled Tetris player. When I was 18 I worked as DJ in a disco-pub at my hometown. There was a Tetris gaming machine, and I spent hours and hours playing on it. Many nights I saw the blocks falling every time I went to bed and closed my eyes.

It rained some since then, but I still believe that Tetris is one of the best videogames ever made.

In 2000, I developed a Tetris ActiveX control for the Planet Source Code site using Visual Basic 6.0. With that control I won some prize in the Planet Source Code monthly contest (some software pack, I don't remember well). You can still see the page (and download the ActiveX control and its source code) here.

Now I think the time has come to write a .Net version, so this article presents to you the TetrisBox class: a Vb.net class extremely useful to create highly customizable Tetris games in .Net Winforms environments.
 

The logic under the TetrisBox Class


The TetrisBox class inherits from the System.Windows.Forms.PictureBox control, as it is basically a drawing surface. All the drawing work is done in the overwritten OnPaint method. Because the …
0
 
LVL 38

Administrative Comment

by:lherrou
Comment Utility
Luis,

Congratulations on your excellent work, it is of the highest quality of work we see here on Experts Exchange, and as such, it has been recognized as Awarded.

LHerrou
Experts Exchange Editor
0
 
LVL 25

Author Comment

by:Luis Pérez
Comment Utility
Thanks a lot! It is an honor to publish my work on Experts Exchange.
0
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer.”  Despite the humor of their conversation, he pegged the nature of AI.  Turn anything into a simple yes or no answer.  A simple AI, might be, “If player is to the left, move the enemy ship to the left” which is a very simple AI for interception or chase, but it is not a learning AI.  A learning AI must have the ability to decide to go right for reasons it was not specifically programmed for in the first place.

A learning AI is highly important for ensuring that non-player characters (NPCs) will have more interactive choices for the players, without requiring developers or AI designers to program AI for each possible option combination in the game.  (A game with 10 spells, 10 items and 10 effects would be 10*10*10 combinations, or 1000 combinations to be programmed for.)

To cover the AI, I’ll discuss two different types of learning AI, reactionary and meditative.

Reactionary Learning

Reactionary is where the game learns immediately.  It must still depend on pre-programmed choices, but those choices can depend on historical data.  I.E. In Mortal Combat, let’s say the player keeps winning with one particular move when …
1
 
LVL 63

Expert Comment

by:☠ MASQ ☠
Comment Utility
An excellent article on the basics of AI design for both the player and NPCs

+1
0
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algorithm in general, and then give a few valuable upgrades and how to apply them.

Finding the first route (there are 2)

To begin with, let's take a look at a possible game map:

Map001White indicates spaces we can travel in.  Blue represents Water, and that we cannot cross it.  Red represents our target (B6).  Finally, our starting place is at Green (E5).  I’m also going to say that the NPC can move horizontally, vertically and diagonally.

Next, we start with two Arrays/Lists to manage the creation of the path.  These lists will contain Grid Positions, which I will call “Tiles”:

1) Possible Moves List – This lists all the possible moves the character can make.  It is not filled with all the white spaces on the map at the beginning, but gets filled over time.

2) Attempted Moves List – This is a list of possible moves that we have considered.

Initialize your list by adding the starting Tile to the Possible Moves List.  

Process Loop Part 1 of 2:

1) Get the Tile from the Possible Moves List that is closest to the target.
a. At the beginning, it is only 1, your starting position.
b. If your NPC can only move Vertically and Horizontally, this can
5
 
LVL 63

Expert Comment

by:☠ MASQ ☠
Comment Utility
This is a great, well-written, resource on programmatic path-finding for games writers I hope people enjoy reading it as much as I did.

+1
0

1. What is RenderMan


RenderMan is a not any particular piece of software.
RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of the Renderman standard, but not the only one. RenderMan-compliant sofware uses REYES rendering algorithm, RIB format for scene description, and RSL for shader writing.

2. What RenderMan renderers are available?


Commercial renderers:
Pixar's RenderMan - the flagship one, used by Pixar Studios in all their recent animated movies. http://renderman.pixar.com/
Sitex AIR. http://www.sitexgraphics.com/
3Delight. http://www.3delight.com
Open Source renderers:
Aqsis http://www.aqsis.org
Pixie http://www.renderpixie.com

3. What is RSL


RSL is RenderMan Shading Language. It is a programming language, somewhat similar to C, but simplified and with a functionality limited mainly to processing shading, displacement, and light information. A simplest RSL surface shader might be:
surface simple_shader(float  Kfb = 1) /*fix brightness to 1 */
{
color surfacecolor = 1; /* simplified syntax for white (1,1,1) */
Oi = Os; /* surface opacity */
Ci = Oi * Cs * surfacecolor * Kfb; /*surface color */
} 

Open in new window

4. What is REYES


REYES means Render Everything You Ever Saw (and nothing more). REYES is the rendering algorithm implemented in RenderMan. It is designed with both speed and control in mind.

5. Why is X renderer faster than RenderMan?

1

Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).

Top Experts In
Game Programming
<
Monthly
>