Showing posts with label Game Programming. Show all posts
Showing posts with label Game Programming. Show all posts

Wednesday, March 21, 2007

What are the Basic Elements of an Image?

  1. Pixel: It is the most basic element of an image. It is basically a colored dot on the screen. A computer image consists of these pixels arranged in rows and columns.
  2. Resolution: It is basically the number of pixels(width x height) displayed in an image. Some of the most common screen resolutions are 320 x 200, 640 x 480, 800 x 600, 1024 x 768 etc…
  3. Aspect Ratio: It is defined as the ratio of Pixel’s width to the Pixel’s height. This ratio is being calculated because not all images are square. In 640 x 480, 800 x 600, and 1024 x 768 mode, the Aspect Ratio is 1:1 or 1, i.e. the pixels are perfectly square.
  4. Colors: Each color consists of 3-basic colors: Red, Green and Blue(RGB). An RGB value is the mixture of Red, Green and Blue to make other colors.
  5. Number of Colors: It is also known as Color Depth. It describes how many colors can be displayed on your screen at once. It is described in terms of bits and referes to the amount of memory used to represent a single pixel. eg. 8-bit, 16-bit, 24-bit, 32-bit and 64-bit color.

What are various roles that Game Developers do?

As the game programmer, it is good to keep in mind that the more of the other game development roles you can fill, the better. That is, if you can do some of the other jobs involved in game development, then you will own more of the final product. Let’s consider what other jobs game developers do.

1- Programmer: The whole world revolves around the programmer. The programmer is the one who takes the unrealistic expectations of everybody else and finds a way to make them work. If the producer wants to change the user interface at the last minute, it’s the programmer who stays up all night making the change. If the artist can’t figure out how SVGA palettes work, it’s the programmer who writes a color-reducing and palette-matching utility. Without theprogrammer, there would be no computer games.

2- Artist: Artists are important too. In some games, such as Myst, I will grudgingly admit the artists played a more critical role than the programmer. This is the exception however, not the rule. The rule is, the programmer is the pivotal element in all game development. These days, many artists prefer to be called “animators”. Manygarbagemen prefer to be called “sanitation engineers” too, but it doesn’t make a bit of difference in what they actually do.

3- Musician: They make music. They can make sound effects too. There are a lot of them, and there is barely enough work to go around. Most of them are starving.

4- Producer: The producer oversees game development and makes sure all the elements of the development are in place. A producer may, for example, acquire resources for programmers and artists, may hand out money, and may give orders. Sometimes a programmer or an artist may play the role of producer, which often works well. Sometimes aproducer is a low-level manager with no particular game development talent, who nonetheless involves himself in micro-managing the development process. This occasionally spells disaster.

5- Designer: This is a nebulous term. Sometimes the producer thinks he is the designer, when actually the programmer is the designer. The artist should be the designer, being that he has the creative talent, but nobody pays attention to the artist. Sometimes a person comes out of nowhere and declares himself to be designer, and asks for millions of dollars for selling a title and a story line. Ha! Fat chance. If you are a programmer and you need design help, look to an experienced designer with a track record in the type of game you want to develop. There are people who actually excel at designing levels, puzzles, likeable characters and entertaining story lines. Tom Hall, formerly of id Software, comes to mind as a successful and well-loved game designer. Really good designers like Tom are rare.

6- Play Tester: Play testers sometimes also act as beta testers. Technically speaking, the beta tester tests for bugs and the play tester tests for playability. But since most games are under-funded and behind schedule, both functions are generally ignored more often than they should be. If you want to break into game development, and you live in the Silicon Valley area, you may be able to get a job as a play tester. It’s kind of like breaking into rock ‘n roll by being aroadie. Sure you’re there, but you’ll never be the star.

7- Publisher: This is the guy in the suit who smokes a cigar and blows the smoke in your face. He is very good at telling you why his part of the job is really the hard part, and since he is taking all the risks, he should keep 95% of the profits and you should be grateful for your 5%. Less deductions. Paid 6 months after he gets paid. Which is 9 months after the game hits the shelves. It’s a good job, if you can get it.

8- Lone Wolf: This is a programmer like we people. Now I have learned where my strengths lie, and I find other people to give me artwork, music, design help and publishing help. But I still take over each job when I need to. If the artwork isn’t perfect, I fire up my paint program and make adjustments myself. If I can’t reach a deal with a publisher, I self publish on the web . Sometimes I even make my own sound effects by hooking a cheap microphone up to my Sound Blaster card. The point is, I don’t take a salary, I am not dependent on anybody else, and I have the freedom to choose and abandon my own projects, and to move on when I feel like it. Being a lone wolf isn’t for everybody, but to me it is the best of all possible worlds.

What is a Game Engine?

Most people think of a game engine as the underlying code to a computer game, plus the utilities used to create the game. So, what exactly is a Game Engine?

A game engine is the reusable, underlying code for a game, along with the collection of tools and utilities used to create the game. A game engine usually consists of two parts: a game skeleton that can be used as a template for other games, and a game editor for processing artwork. The game editor is actually a collection of tools for building games. You can use the game editor to create tiles, edit levels, import and edit sprites, and manage files. The second part of the game engine, the game template, should be thought of as a skeleton for creating side-scrolling arcade games.

A game engine should be flexible enough so that it can be easily modified to accommodate a great number and variety of games. It should also be powerful enough to be significantly useful. That means the developer using the game engine will have a major advantage over the developer starting from scratch. The game engine should give the developer extensive functionality without getting in the way when the developer wants to be experimental. The game engine should also be thoroughly tested, and should have practical, as well as theoretical, applications.

Which are the various AI(Artificial Intelligence) Techniques used in Games?

AI(Artificial Intelligence): Techniques used to emulate the human thought process in a computer.

Types of Game AI:
Generally, the following 3 types of AI is being used in most of the games:

  1. Roaming AI
  2. Behavioral AI
  3. Strategic AI

1- Roaming AI: It models the movement of game objects. i.e. the decisions made by game objects that determine how they roam around in a virtual game world.

Basically, roaming AI is used whenever a computer controlled object must make a decision to alter its current path, either to achieve the desired result in the game or simply to conform to a particular movement patternn.Types of roaming AI:
· chasing
· evading
· patterned roaming

  • Chasing: It is a type of roaming AI in which a game object tracks and goes after another game object or objects. This approach is used in many shoot-em-up games where an alien or enemy chases after player’s ship or car or bike or the player himself. It is implemented by altering the alien’s velocity or position based on the current position of the player’s ship.
  • Evading: It is the logical counterpart to chasing. it is another type of roaming AI in which a game object tries to get away from another object or objects.
  • Patterned roaming: It is a type of roaming AI that uses a predefined set of movements for a game object. Patterns can include circles,figure eights, zigzags, or even more complex movements.

2- Behavioral AI: This type of gaming AI uses a mixture of all three roaming AI algorithms to give game objects specific behaviors.. eg. if you want the alien or enemy to chase sometimes, evade other times, follow a pattern some other times, and may be even act randomly every once in a while. behavioral AI can also be used to alter the difficulty of the game. eg. You would like to favor a chasing algorithm more than random or patterned movement to make the aliens or enemies more aggressive in the higher levels of a game.

3- Strategic AI: Any AI designed to play a game with a fixed set of well defined rules is known as strategic AI. eg. a computer controlled chess player would use strategic AI to determine each move based on trying to improve the chances of winning the game.
Strategic AI tend to vary more based on the nature of the game because it is so tightly linked to the rules of the game.

What are the minimum requirements to be a Game Programmer/Developer?

To begin with, you need to know how to program in some language. Thepreferred languages for game programmers are C and C++. I have no opinion on which is better, either one will take you far. If you are just getting started, and you haven’t learned C or C++ yet, you can write games in another language. Lots of perfectly good games have been written in BASIC, Pascal, and Delphi. Years ago I wrote some pretty games in Fortran. It doesn’t matter that much what language you use, as long as you have mastered it.

Some knowledge of assembly language programming is important if you are planning on writing your own low-level graphics routines. If you not ready to tackle assembly language yet, don’t worry about it. You can use a commercial graphics library, such as Fastgraph to accomplish the desired result.

You will need a (legal, not borrowed copy of a) compiler. If you don’t have a compiler, click here for some suggestions.

You will need some way to generate artwork for your program. A paint program is good. A rendering program is better. A talented artist is better yet. Whether you create your pictures yourself, scan them, use clip art, or pay big bucks to a professional artist, plan on having some source of artwork.

That’s it! That’s all you really need to get started. If you are reading this online, then I will assume you also have a good, fast computer, a modem, and some form of online communication. These are valuable and will help you a lot.

Of course, there is one other element which I haven’t discussed, and that is talent. You have to be a good programmer, with creative problem-solving skills. I assume you think you have that, becauseotherwise you wouldn’t still be reading.

Check out some interesting Questions related to Game Development in the Forthcoming Posts…