views:

553

answers:

8

I just learned the basics of c++ and c#,just the simple basics of the language.And I want to pursue game programming can anyone please tell me where to start off I read somewhere that Direct-X is used for game programming and I downloaded it from Microsoft's website but I just didn't understood it.From where did you people started your game programming when you were just beginners or do I need to have a deep knowledge about the language or can I just start now, please suggest me.And I am in the first semester of my cs undergraduate degree.

+10  A: 

Start coding now. You won't get deep knowledge without, well, coding! I'd highly recommend XNA. XNA is basically a .NET wrapper for DirectX. It is very clean and well thought out (This means C# of course).

Have fun!

Byron Whitlock
-1: Most video games are not made with XNA for a reason. C# and XNA cannot be used for serious game development. .NET will leach your RAM and C# is not meant to allow you liberty like C++!
Partial
"Most video games" are not indie games.
Arriu
+4  A: 

Introduction to Game Programming in C++ is a good start.

alt text

Introduction to Game Programming with C++ explores the world of game development with a focus on C++. This book begins with an explanation of the basics of mathematics as it relates to game programming, covers the fundamentals of C++, and describes a number of algorithms commonly used in games. In addition, it discusses several libraries that can help you manage graphics, add audio, and create installation software so you can get started on the path to making both 2D and 3D games.

If you want to start with C#, which is recommended for beginners, you can use XNA, which is quite simple to learn, and a good book is Beginning XNA 2.0 Game Programming: From Novice to Professional

Would you like to create your own games, but never have the time to dig into the details of multimedia programming? Now you don’t have to! XNA makes it simple to create your own games, which will run on your PC and Xbox 360 console. Even if you don’t know how to program at all, Beginning XNA 2.0 Game Programming: From Novice to Professional will teach you the basics of C# 2005 programming along the way. Don’t get overwhelmed with details you don’t need to know— just learn what you need to start creating your own games right now!

The fast–paced introduction to XNA and the C# language provides professional developers a quick-start guide to creating a commercial product using XNA, as well as offering home enthusiasts or hobbyists everything they need to begin putting together games in their spare time. You’ll discover and understand all the key concepts required to create smooth, professional–looking results in a range of gaming genres. Every reader will come away with a firm foundation onto which they can build more advanced ideas.

Moayad Mardini
+2  A: 

Maybe www.gamedev.net is the best site of resources of game programming

Agusti-N
A: 

Check out the torque engine. It's inexpensive and takes care of a lot of the grunt work of making your game so that you can focus on making it fun. It's inexpensive and you can code in C#.

Chris McCall
+2  A: 

I would recommend getting started with XNA, if you know a little C# it is an excellent way to get into game development and learn some important concepts that will help you out with other libraries. creators.xna.com There are several videos and tutorials to walk through, and it is all free when programming for the pc.

ProgrammingPope
A: 

I do not suggest XNA for learning how to do game programming. It hides many concepts that you need to have for a solid understanding of how it works from the inside.

First, learn thoroughly how to program in C++ and to understand how the Component Object Model (COM) works since this is what you will need to use in order to call the different methods in the DirectX SDK. Once this is done, learn how to create a window with C++ in Win32. After, find yourself some books on Direct3D for DirectX 9 SDK, game engines and architecture, multithreaded applications and design patterns. I would suggest DirectX 9 Graphics The Definitive Guide to Direct3D from Alan Thorn for Direct3D. This book is not a definitive guide, but rather a very good introduction to gain a solid base. Of course the book is a bit old, but the concepts remain very similar and it will be a good reference book for later on (plus it is cheap.. your budget might be tight with everything you have to pay for university :P) . Also, look at the documentation and samples from the SDK. Oh and before I forget, you will need some notions in maths (linear and vector algebra comes to mind)!

Partial
-1 XNA was developed to help new programmers learn the game programming. And to lower the bar for indie developers to create games. A beginner will be much more productive and see results faster using xna. When they are ready to make a AAA game with 10 programmers and 25 artists, then C++ will be required.
Byron Whitlock
I do not believe you read properly what I wrote… There are certain notions that must be learned before doing any DirectX and I clearly wrote that. You do not start learning DirectX without a good understand of the different notions I mentionned.
Partial
In fact this is exaclty my point, one way or another he will have to learn unmanaged C++ with DirectX. By having some good books, the internet and some teachers from his university I believe it is not harder to learn. It will probably take some time, but that is a normal proccess. Even if you take the time to learn C# and XNA it will not take less time to learn unmanaged C++ and DirectX afterwards.
Partial
He is in the first semester of his CS degree. He needs results and encouragement quickly. This in turn will keep him motivated. It is very easy to give up when you are at the beginning. I remember wanting to make a game when i was a 1st year cs. I wish they had XNA then. They diddn't I gave up. 8 years later I was making AAA games at stormfront studios.
Byron Whitlock
Point being as a programmer you are constantly learning. But trying to learn everything at once (in the beginning!) on top of your studies can be overwhelming. He has probably not even finished his data structures course yet...
Byron Whitlock
"First, learn thoroughly how to program in C++ "
Partial
Again you takes bits and pieces of what I write! Coding in C# and XNA will give him the false impression that he is good in DirectX. Doing it for the gaming industry is a whole different universe. If you give up at the beginning it is either because you are not made for CS, you do not like programming or you have a view that is a delusion of how video games are made. If you like programming you should at least want to search information on the different subjects related to it by yourself. The way it works is you learn step by step and not everything at the same time.
Partial
Also, I never said to learn everything at the same time!
Partial
Games use highly optimized rendering engines. You never ever write directly to DirectX unless you are an engine programmer. But I digress. Final point, stackoverflow has many smart passionate people with valid points of view!
Byron Whitlock
+3  A: 

From reading your comments to the original question, it would seem that you have fallen into the trap of setting your sights far too high. The game 'World of Goo' did not happen overnight. It took a long time using lots of third party libraries to do the video/audio/physics/gameplay elements and a very good working knowledge of programming in general and an understanding of the restrictions doing a game often imposes.

Now, this may seem like a negative response but the point is it is better to achieve something small than to fail at something big. Failure generally puts people off doing what they really want to do.

Byron Whitlock's advice of "start coding now" is the best advice. But, start off with something simple: a text based version of Guess the Colours for example, then some easy, non-realtime graphics like Othello / Reversi / Sliding puzzles then try something realtime like Tetris and then branch out into physics, audio, 3D and so on.

The key to becoming a great programmer is to get code finished and working (shipping is a feature!), learn from the code - see if there are better ways to do stuff and so on. Start small, finish some programs, get a morale boost, firm up your foundations and gradually add complexity from there.

Skizz
Thanks for that great advice.
Rajan Walia
A: 

I suggest try using Silverlight as your game platform.

Check out this site http://dobbschallenge2.com/. It has a full functioning 2D platform game engine with source code and images. You can learn how parallax scrolling works, etc.

This way you can modify the game source code and slowly learn how it works. The game engine is quite simple yet the game is fun and includes awesome soundtrack :)

DodyG