Game Programming Primer - Page 4
Forum Index > General Forum |
Deezl
United States355 Posts
| ||
Ender2701
United States581 Posts
| ||
]343[
United States10328 Posts
Nice guide | ||
4tre55
Germany330 Posts
| ||
CecilSunkure
United States2829 Posts
On November 22 2012 19:44 4tre55 wrote: Just bought "Code" because of your guide an it's an amazing book, thanks a lot for the recomandation. Very awesome! I loved that book, read it twice. | ||
kollin
United Kingdom8380 Posts
| ||
CecilSunkure
United States2829 Posts
On November 23 2012 05:30 kollin wrote: Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/ I like gcc/g++ and VS 2010. I'd recommend VS Express 2010. | ||
kollin
United Kingdom8380 Posts
On November 23 2012 05:34 CecilSunkure wrote: I like gcc/g++ and VS 2010. I'd recommend VS Express 2010. Alright thanks, I took a look at VS 2008 I think, but some of the UI felt a bit weird to what I'd used before, but I'll definitely check out both those recommendations! :D | ||
Chronopolis
Canada1484 Posts
_______________ |.........................| |.........................| |.........................| |.........................| |.........................| | ______________| Too long, will read. | ||
spinesheath
Germany8679 Posts
On November 23 2012 05:30 kollin wrote: Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/ You don't use a compiler for coding, you use a text editor or an integrated development environment (IDE) which usually consists of a text editor, a compiler and lots of other helpful tools. Visual Studio is an IDE, gcc/g++ is just a compiler. If you're more of a linux/command line guy, vim with the right plugins is supposed to be good. For typical Windows users, Visual Studio is very good. Afaik Eclipse is somewhat popular too, and I often use it when I am working on a Linux system, but I find it to be just an inferior version of Visual Studio (I'm not exactly good with the command line style editors). For C/C++ you usually don't really need a fancy IDE though as long as you have syntax checking and code completion. | ||
Arnstein
Norway3381 Posts
| ||
Spikeke
Canada106 Posts
| ||
Lorizean
Germany1330 Posts
On November 23 2012 04:09 CecilSunkure wrote: Very awesome! I loved that book, read it twice. Haha, I bought it too and it is pretty amazing indeed. About the compilers: you will want to use gcc (g++) on gnu/linux. For Windows you have a choice between the microsoft compiler included in visual studio or MingW (a gcc port for windows). Or you can use the Intel compiler (parallel xe) on both platforms. Microsoft and Intel cost money though, but you can get free access as a student or for non-commercial use. As for IDE i quite liked codeblocks (linux+windows, option to come coupled with mingW/gcc) or you can use visual studio for the microsoft/intel compilers. Personally I use vim with g++ on linux and I can say that learning to use vim was very worth it, but it takes time to get used to it. So if you just want to code some small c++ program its probably not worth your while to learn it. | ||
Ender2701
United States581 Posts
On November 26 2012 03:39 Lorizean wrote: Haha, I bought it too and it is pretty amazing indeed. About the compilers: you will want to use gcc (g++) on gnu/linux. For Windows you have a choice between the microsoft compiler included in visual studio or MingW (a gcc port for windows). Or you can use the Intel compiler (parallel xe) on both platforms. Microsoft and Intel cost money though, but you can get free access as a student or for non-commercial use. As for IDE i quite liked codeblocks (linux+windows, option to come coupled with mingW/gcc) or you can use visual studio for the microsoft/intel compilers. Personally I use vim with g++ on linux and I can say that learning to use vim was very worth it, but it takes time to get used to it. So if you just want to code some small c++ program its probably not worth your while to learn it. If you're coding on linux, I'd suggest emacs and g++, but since you're doing game programming you're probably using Windows. If you're going to use Windows, I'd suggest Visual Studio and Visual Assist X. Visual Assist X is probably the greatest IDE add on I've ever used, really good for large C++ projects, I used it when I was doing game programming for First Playable and it was awesome. No matter what I'd suggest learning + using emacs hotkeys. It makes editing text so much faster. The only downside is that you'll constantly be frustrated when other things don't have emacs hotkeys and you accidentally open 10 new windows. | ||
iaretehnoob
Sweden741 Posts
Clang is another good compiler choice, competing with gcc, just really not as widespread. | ||
Random()
Kyrgyz Republic1462 Posts
When you look at it this way, then game development (as in implementing the actual gameplay mechanics) is very often done in a higher-level language. People use all sorts of languages (Python, Lua, Java, C#, ...) to abstract themselves away from the engine internals and the horrors of C++, and that is a very good thing. Writing good C++ programs is extremely difficult, and even the state-of-the-art engines written by the most talented programmers in the world are ridden with bugs. C++ programs written by average programmers are a minefield. So unless you are determined to be a very technical sort of developer, working on the engine, I don't agree that you HAVE to use C++ for game development, in fact I would argue that you should try to avoid it at all if that is possible within your workflow. Also, you write "there are a few different simple guidelines that one can follow to ensure their code isn’t running sub-optimally" as if running sub-optimal code is something to be ashamed of. Saying such things, especially to new programmers, is a recipe for disaster. Premature optimization is the root of all evil, and for whatever reason many people really seem to like spending their effort "optimizing" absolutely unimportant stuff which they don't even know to be the bottleneck, while at the same time their program is not working correctly overall. EDIT: please take this as my personal rambling and wishful thinking. Reality is, as people have pointed out, that you will be most likely expected to know C++ if you are going to apply for a game programming job. | ||
CecilSunkure
United States2829 Posts
On November 28 2012 03:43 Random() wrote: While this is a great article, I think you are overemphasizing the "internals" of game programming. Those parts that work with the hardware and all the low-level implementation details are, of course, quite important, but in all honesty they have little to do with your actual game. When you look at it this way, then game development (as in implementing the actual gameplay mechanics) is very often done in a higher-level language. People use all sorts of languages (Python, Lua, Java, C#, ...) to abstract themselves away from the engine internals and the horrors of C++, and that is a very good thing. Writing good C++ programs is extremely difficult, and even the state-of-the-art engines written by the most talented programmers in the world are ridden with bugs. C++ programs written by average programmers are a minefield. So unless you are determined to be a very technical sort of developer, working on the engine, I don't agree that you HAVE to use C++ for game development, in fact I would argue that you should try to avoid it at all if that is possible within your workflow. Also, you write "there are a few different simple guidelines that one can follow to ensure their code isn’t running sub-optimally" as if running sub-optimal code is something to be ashamed of. Saying such things, especially to new programmers, is a recipe for disaster. Premature optimization is the root of all evil, and for whatever reason many people really seem to like spending their effort "optimizing" absolutely unimportant stuff which they don't even know to be the bottleneck, while at the same time their program is not working correctly overall. I can understand why you'd want to shy from encouraging C++, but if you want a job being very good at C++ is the best way I know of. Sure, the everyday workflow of the position you might get may or may not be using C++, but that's besides the point if you want the best chances of hire. Just go check out all the various game programming or software engineering positions offered from studios; pretty much every one requires excellent C++ skills. As for optimization, I only talked about delayed construction and said not to pass-by-value. These are the sort of things I learned my first semester working in C. They aren't really something you can get lost in while programming in a bad way as you'll be learning fundamentals essential to programming in general. | ||
ClysmiC
United States2192 Posts
| ||
spinesheath
Germany8679 Posts
On November 28 2012 05:29 CecilSunkure wrote: As for optimization, I only talked about delayed construction and said not to pass-by-value. These are the sort of things I learned my first semester working in C. They aren't really something you can get lost in while programming in a bad way as you'll be learning fundamentals essential to programming in general. Not using pass by value to improve speed is a trap too. Sometimes you want to pass by value, sometimes you don't. See: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ Generally you never even want to think of optimization until after you ran a detailed performance analysis. Before that point all your efforts should be spent on producing simple, readable, understandable, reusable, testable and maintainable code. | ||
CecilSunkure
United States2829 Posts
On November 29 2012 01:56 spinesheath wrote: Not using pass by value to improve speed is a trap too. Sometimes you want to pass by value, sometimes you don't. See: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ Generally you never even want to think of optimization until after you ran a detailed performance analysis. Before that point all your efforts should be spent on producing simple, readable, understandable, reusable, testable and maintainable code. You know, intentionally setting up RVO is in and of itself programming while being mindful of optimizations. Some optimization really is just low hanging fruit you can be sure of. | ||
| ||