🔒 Locked
Game Programing and Computer Programing
Advertisement
Original Post
Hey everyone, im new to this forum, and new to game deveopment also. So my question is, im learning C++, with the book "C++ DemystidieD" by Jeff Kent. SO far, he seems to be good. But my questions is, this book teaches Computer programing, but i want to learn Game programing. Should i get a different book? I still use the same code, of C++, but in a different way. I will be a noob of noobs, and i dont kow anything in C++. Can anyone help me? And where can i find a tutorial to make Tetris?
I have been a enterprise software developer for 5 years, and have been programming for 14 years. I just started writing games and there is no difference in the coding. Games are just a lot more graphic intensive than business applications.
I am just finishing my tetris clone (tonight I'm writing the help files and the last sound bits). At first I was looking for a tetris tutorial but couldn't find exactly what I was looking for. So I just did it. I took what I knew about the game from playing it, and started designing and coding. There were a few road bumps with graphics, but after 17 hours working on it (spread across 3 weeks), it is just about finished. I am glad that I didn't find a tutorial because I learned a lot by doing it all myself. My advice to you, get comfortable with the language you are planning to use, then jump in.
If you run into issues or have questions, I'm sure people on this site will definitely help you out.
I am just finishing my tetris clone (tonight I'm writing the help files and the last sound bits). At first I was looking for a tetris tutorial but couldn't find exactly what I was looking for. So I just did it. I took what I knew about the game from playing it, and started designing and coding. There were a few road bumps with graphics, but after 17 hours working on it (spread across 3 weeks), it is just about finished. I am glad that I didn't find a tutorial because I learned a lot by doing it all myself. My advice to you, get comfortable with the language you are planning to use, then jump in.
If you run into issues or have questions, I'm sure people on this site will definitely help you out.
what chronicle17 said. :)
If you learn programming, you can program, period. [wink].
Game programming often have some different priorities and goals, but it's still programming. (For example, MS Office is supposed to play nice with other programs, only using a minimum of CPU time, while games are supposed to grab everything they can to get the best possible framerate).
But if you can program one, you can do the other as well. Although you might have to spend a few hours (or days or weeks) reading up on the tools required for that particular branch of programming.
If you learn programming, you can program, period. [wink].
Game programming often have some different priorities and goals, but it's still programming. (For example, MS Office is supposed to play nice with other programs, only using a minimum of CPU time, while games are supposed to grab everything they can to get the best possible framerate).
But if you can program one, you can do the other as well. Although you might have to spend a few hours (or days or weeks) reading up on the tools required for that particular branch of programming.
If you feel you need a book to get you started I can recommend "Beginning C# Game Programming" by Ron Penton. C# isn't terribly different from c++ and the first half of this book explains the differences and excentricities pretty well.
The second half gets you into game programming using Direct X 9. It is an inexpensive book (300 pgs so its about $20) but its been quite useful to me in learning C# and its probably the first game programming book I've read cover to cover. The author does a good job of keeping it simple and explaining his examples.
Good Luck!
The second half gets you into game programming using Direct X 9. It is an inexpensive book (300 pgs so its about $20) but its been quite useful to me in learning C# and its probably the first game programming book I've read cover to cover. The author does a good job of keeping it simple and explaining his examples.
Good Luck!
Depending upon where you want to go with it, it might be best to avoid C#. If you would like to become a professional game programmer, stick with C++. It's by far the most popular language. And if you want to write games for the consoles, remember that there hasn't been a game on a console yet written in C#.
For now, just get through your book. Learn the basics of programming. And learn how it's done in C++. Once you have that down, maybe check out a game programming book. Or don't. Just try to do something simple, like the Tetris game. Just writing a Tetris clone will introduce you to concepts that you don't read about in intro books, such as the game loop. After that, you can try something a little more difficult, maybe Pac-Man. Then hop in and try to write a GTA clone! :-)
For now, just get through your book. Learn the basics of programming. And learn how it's done in C++. Once you have that down, maybe check out a game programming book. Or don't. Just try to do something simple, like the Tetris game. Just writing a Tetris clone will introduce you to concepts that you don't read about in intro books, such as the game loop. After that, you can try something a little more difficult, maybe Pac-Man. Then hop in and try to write a GTA clone! :-)
As everyone else said computer programming and game programming is essentially the same. So just keep on learning C++, when you know the basics of C++ I want to recommend "C++ For Game Programmers" this book introduces a lot of concepts used in game programming (also in other kind of programs), but it assume you know:
functions, variables, casts, exceptions, classes, structures, etc.
functions, variables, casts, exceptions, classes, structures, etc.
I think it's much over-simplified (or maybe over-comforting for some) to say that game programming is just like any other programming. Pop quiz: Do you know how big the cache-line is of the processor you're developing for? Do you know how big the caches are? If 'no' and 'no', do you think that it doesn't matter?
For most other programmers around, sure it doesn't matter. It's all GUI-driven anyway, and that's the biggest bottleneck, so why does anything else matter?
Games are unique in many ways. One of these is that they are constantly simulating whether or not there is any user interaction. Another is that there is a wildly disproportionate number of mathematical calculations involved in calculating a frame-step of a game. The math part is good, because there are special instructions we can use to deal with math, but memory organized by normal progammers will bottleneck on memory latency so it doesn't matter.
I would say that normal programmers like to think of all computers as being the same, and would like to program imagining that there is no real hardware or caches or memory latency. Game programmers like to know exactly what they're dealing with, inside and out, especially about memory access.
Of course most people say knowing about hardware doesn't matter... fitting that the official Sony PS3 docs were released the public yesterday, and there wasn't a whisper here.
For most other programmers around, sure it doesn't matter. It's all GUI-driven anyway, and that's the biggest bottleneck, so why does anything else matter?
Games are unique in many ways. One of these is that they are constantly simulating whether or not there is any user interaction. Another is that there is a wildly disproportionate number of mathematical calculations involved in calculating a frame-step of a game. The math part is good, because there are special instructions we can use to deal with math, but memory organized by normal progammers will bottleneck on memory latency so it doesn't matter.
I would say that normal programmers like to think of all computers as being the same, and would like to program imagining that there is no real hardware or caches or memory latency. Game programmers like to know exactly what they're dealing with, inside and out, especially about memory access.
Of course most people say knowing about hardware doesn't matter... fitting that the official Sony PS3 docs were released the public yesterday, and there wasn't a whisper here.
Quote:
Original post by ajas95
I think it's much over-simplified (or maybe over-comforting for some) to say that game programming is just like any other programming.
Game programming IS just like any other programming.
Quote:
For most other programmers around, sure it doesn't matter. It's all GUI-driven anyway, and that's the biggest bottleneck, so why does anything else matter?
Considering that about 99% of all computers out there are embedded, they rather seldomly are GUI-driven as they are either automated or controlled through a few buttons and switches.
Quote:
Games are unique in many ways.
As are general applications on desktops, simulations, embedded systems (real-time & safety-critical) and those with extremely limited resources, Multithreaded & clustered systems..
Point is, you used words like "not like any other programming", which is true as there are so many fields out there. But you are somehow going against learning "programming" and not "game programming".
Why would a programmer ever want to have the initial thought of "Okay, I'm going to learn game programming and nothing but game programming, I'm going to be the most narrow-minded programmer in the history of mankind!".
Point is, if you know programming, you can do anything as long as you brush up on your skills on the specific matters that are present.
A beginner who learns how to program CAN make games. As can anyone else who already knew programming. However, going from beginner -> expert, you need to know more - in ANY field, not just game programming.
That way, you could say that game programming isn't any different in difference than any other field.
Quote:
Original post by Argus2
If you're writing a graphically intensive action game (which is quite a large proportion of AAA titles), then what Ajas95 wrote is important. But you still have to learn ordinary programming before delving into specialist areas.
The point is that you have to learn something specific about any field in which you specialize. So the fact that you have to learn about graphics hardware when doing graphics programming does not make it special. The same skills that make an excellent programmer in one field are crucial to making an excellent programmer in another.
It is the very attitude that game programming is some special, mystic, nether-world of hipster anti-establishment sophistication that keeps it from maturing as a business. People who actually learned programming and did it professionally before entering games find themselves screwed by and at the mercy of self-taught, under-educated, immature people who think it's a badge of honor to never document or plan anything they do, to work crazy hours, to refuse to adopt accepted programming standards and practices, to use 'cool' and 'alternative' tools, etc.
I say screw the attitude and grow up. Learn how to be a professional at your profession, and everything else will take care of itself.
No need to go on a rant just because I said knowing the size of the cache-lines on various processors is specialist knowledge. It is, because in my opinion it's something to consider after learning enough about programming that it becomes important. Perhaps you are suggesting that learning be done the other way round?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement