On February 28 2012 15:14 Rayeth wrote: I think you have some good idea here, but I want to put forward that the C++ vs C argument changes when you don't want to work in a games setting. For example, I work in embedded systems and use C almost exclusively for various reasons (very low level access to things like timers, registers, or other hardware; need to save cycles due to low power processors; and the compilers aren't standard and therefore limit our language choice). So the choice you make on what language to use is really dependent on what situation you're in. Gaming on a modern PC is one thing, but there are TONS of systems out there that don't have gigabytes (or even megabytes) of memory for you to use, and in these cases C (or sometimes even assembly) are pretty much all you've got.
This changes the game completely, of course. Everything becomes about how to optimize memory usage and how to do more with less. Making things work in confining situation is an altogether different type of skill from the creative impulse (IMO) needed to develop games. There is often time very little visual feedback when things are broken, which makes for fun times figuring out bugs. I like to think it makes me very good at spotting and fixing memory leaks, but I can't say that for certain
Anyhow, that isn't to say C++ or things like Python, etc don't have their places in embedded designs too. There are LOTS of different systems out there. Most can be done in many languages and are relatively fast and easy to use. For anyone interested in doing (or even trying out) embedded stuff, I find the MSP430 from Texas Instruments a great starter. Plus at only $4.30 its pretty damn cheap and has a wide array of hardware for you to mess around with. Plus there is a great community that uses that processor family if you need basic help.
Anyhow. Good blog! And remember there are lots of things to do with programming besides gaming. Computers really are EVERYWHERE these days.
Oh interesting response! I actually took a class where I had to program on a microcontroller chip in Assembly. We had to create a program to automate a robotic car. Had to use analog to digital converters to read the voltage from the car's sensors. I was talking to one of my professors today about programming on some very old console in Assembly, he didn't mention what it was, but it was extremely interesting to hear about.
Thanks for another blog... In regards to the various language discussions going on:
I work in insurance as a developer and i have to point out that it is much more important to learn decent programming fundamentals than to focus on language specifics in any given situation! I will often find myself using 3 or 4 different languages every day, and aside from the occasional key word confusion (use? Import? Include? Gah what language am I in again?) It's fairly easy to work across a broad spectrum of tools and systems if you have decent fundamentals.
Obviously some languages are better suited for dev in some situations than others, but in regards to game programming, OpenGL feels the same no matter what you code it in!
You must include Quad- and Octrees - for culling and collision detections. Yes, I know there are better methods, but these 2 are the simplest to implement, but still effective. Oh, some general guide on AI would be good, although it is a big topic and in the different situations the inner working of the AI would be different.
Nice blog. As a fairly veteran game programmer, I find it interesting that you find C easier as a stepping stone to C++. Out of the two, it is by far easier to write larger games using C++ because of the structure lent by the language. However, C is slightly superior when it comes to tweaking performance, especially when you become conscious of performance bottlenecks such as cache misses and memory fragmentation. You'll find that a lot of game code is written in C++ because of the scalability, but a lot of game engine code is tweaked in C or even assembly if it comes to that.
But that aside, as a learning language, anything flies. Even things like Flash are not useless. A lot of game companies use Flash for their UI through products like Scaleform or GameSWF. What matters is learning how to structure code efficiently, as well as developing a sense of design and flair.
I really like the .NET XNA Framework as a way to try game development.(http://msdn.microsoft.com/en-us/aa937791)
It uses C# built on top of the .NET Framework, uses DirectX and even supports the XBox as a target to play your own games. C# is a very open to beginners but it is also based on C (C++ is the most used language in professional gaming development) There are a lot of examples and tutorials directly from Microsoft.
The development environment is Visual Studio, and the very good Express Version is free for personal use!
I am a professional developer and working with C# most of my time at work. So it was a really cool way to try and get into game development. For me the barrier to get more into game dev is not the Language or it's framework. It is... MATH : (
On February 23 2012 07:54 ClysmiC wrote: I know that Java and C have a lot of similarities, so it shouldn't be too messy of a transition.
??? Java and C are about as different in programming languages as you can get.
If you want to make games you should learn Java, C# (XNA 4.0) or Python.
In fact, C# and Java are so similar in syntax and design you can barely tell the difference.
If you want to be a programmer, learn C/C++ as well.
Are most or a significant portion of commercial high end games coded in C/C++? Yes.
How many programmers? A lot.
What do they do? They debug and "glue" together a pre-existing Engine with pieces artists and designers make. They develop tools for their designers to easily and more efficiently use the Engine. They don't make games.
The only interesting part of learning C/C++ is being able to use Game Engines that require its proficiency. Game engines that usually cost a lot of money to use and takes a lot of time to learn.
Want to make games? Learn Java or Python. C# with XNA 4.0 is really awesome too ( You might need to registerwith a 1 year fee of 99$ to microsoft to sell your games ).
If you get more interested in programming and how computers work in general rather than making games, learn C/C++.
- If someone wants to try out game design, but don't know/don't want to know a lot of programming, Construct 2 is a good place to get your feet wet. This just came out earlier this month, and is a great little visual editor.
- I'll also echo the C#/XNA recommendation for people getting started. It's a great language that can do simple things easily, but can also scale to professional projects (like Terraria, or Bastion). Microsoft also has some great tutorials (more in the MSDN).
- If you're going to do something in flash, also consider the wonder Flixel library.
I know that going straight into C++ might be more flexible, but a lot of people want to do some game design without spending all their time implementing their own physics and graphics engines. Using libraries and editors like these will be a fun way to start learning the game design concepts without nearly as much tedious overhead.
Use Java/C++ for heavier weight stuff. There's also always the option of Python and friends compiling down to C. If you're going to use OpenGL in a practical level outside of the default imperative mode(I think its called that) you'll have to get fairly low level with GL pointers, byte array serialization, and mem copies so you are a bit SoL unless you can find a really good library for it.
On February 28 2012 15:14 Rayeth wrote: I think you have some good idea here, but I want to put forward that the C++ vs C argument changes when you don't want to work in a games setting. For example, I work in embedded systems and use C almost exclusively for various reasons (very low level access to things like timers, registers, or other hardware; need to save cycles due to low power processors; and the compilers aren't standard and therefore limit our language choice). So the choice you make on what language to use is really dependent on what situation you're in. Gaming on a modern PC is one thing, but there are TONS of systems out there that don't have gigabytes (or even megabytes) of memory for you to use, and in these cases C (or sometimes even assembly) are pretty much all you've got.
This changes the game completely, of course. Everything becomes about how to optimize memory usage and how to do more with less. Making things work in confining situation is an altogether different type of skill from the creative impulse (IMO) needed to develop games. There is often time very little visual feedback when things are broken, which makes for fun times figuring out bugs. I like to think it makes me very good at spotting and fixing memory leaks, but I can't say that for certain
Anyhow, that isn't to say C++ or things like Python, etc don't have their places in embedded designs too. There are LOTS of different systems out there. Most can be done in many languages and are relatively fast and easy to use. For anyone interested in doing (or even trying out) embedded stuff, I find the MSP430 from Texas Instruments a great starter. Plus at only $4.30 its pretty damn cheap and has a wide array of hardware for you to mess around with. Plus there is a great community that uses that processor family if you need basic help.
Anyhow. Good blog! And remember there are lots of things to do with programming besides gaming. Computers really are EVERYWHERE these days.
Oh interesting response! I actually took a class where I had to program on a microcontroller chip in Assembly. We had to create a program to automate a robotic car. Had to use analog to digital converters to read the voltage from the car's sensors. I was talking to one of my professors today about programming on some very old console in Assembly, he didn't mention what it was, but it was extremely interesting to hear about.
TI-83 assembly is also fairly simple, produces immediate results, and the likelihood of having a TI-83 calculator is usually quite high. I used to write random games and apps on it throughout college.
Pro-tip: never test your game less than 1 hour prior to a big math test
On February 28 2012 20:28 iNViCiOUZ wrote: I really like the .NET XNA Framework as a way to try game development.(http://msdn.microsoft.com/en-us/aa937791)
It uses C# built on top of the .NET Framework, uses DirectX and even supports the XBox as a target to play your own games. C# is a very open to beginners but it is also based on C (C++ is the most used language in professional gaming development) There are a lot of examples and tutorials directly from Microsoft.
The development environment is Visual Studio, and the very good Express Version is free for personal use!
I am a professional developer and working with C# most of my time at work. So it was a really cool way to try and get into game development. For me the barrier to get more into game dev is not the Language or it's framework. It is... MATH : (
From personal expecience, I'd recommend XNA as well. The logic is really easy to understand there and C# feels more intuitive to me, and is also easier than C/C++ imo. We had to create a video game last year at school. We were a group of 6 students (4 ppl on the dev part, 1 on the map creation and 1 on the design) and we managed to make something really pleasant to play and also really evolved for the time we were given (more or less 4 days). Also, none of us did know anything about XNA before this project, we were only used to C# due to previous projects. This year I managed to implement some advanced features on it like pathfinding so there are plenty of possibilities.
Good blog, keep up the good work The most fun you will have is branching out and starting to develop in other languages, I have fond memories of my first haskell game.
And C++ before C if it's self learned but C before C++ when starting studying CS for example at the university, but I am biased towards learning it imperativ->objectiv->functional->logical
On February 29 2012 10:31 King K. Rool wrote: ah nice!
tbh 3-d graphics programming sort of killed my passion for writing any code for games. Hope you don't have the same problem.
How? 3d programming is awesome fun and extremely simple once you know it, there's a lot of reading required (FBO's, VBO's, atlas-ing and the like) but you don't really need to think when you are 3d programming and can produce lots of cool stuff. Writing shaders is cool too.
On February 29 2012 10:31 King K. Rool wrote: ah nice!
tbh 3-d graphics programming sort of killed my passion for writing any code for games. Hope you don't have the same problem.
How? 3d programming is awesome fun and extremely simple once you know it, there's a lot of reading required (FBO's, VBO's, atlas-ing and the like) but you don't really need to think when you are 3d programming and can produce lots of cool stuff. Writing shaders is cool too.
Saying something is extremely simple once you know it is a bit ridiculous :p. OTOH 3D/graphics programming is a lot of fun if you can learn the math needed and deal with the debugging tools available.
On February 29 2012 18:24 cowsrule wrote: Sounds like you're having a lot of fun! Hope you continue being as excited about this as you have been so far.
On February 29 2012 10:31 King K. Rool wrote: ah nice!
tbh 3-d graphics programming sort of killed my passion for writing any code for games. Hope you don't have the same problem.
How? 3d programming is awesome fun and extremely simple once you know it, there's a lot of reading required (FBO's, VBO's, atlas-ing and the like) but you don't really need to think when you are 3d programming and can produce lots of cool stuff. Writing shaders is cool too.
Saying something is extremely simple once you know it is a bit ridiculous :p. OTOH 3D/graphics programming is a lot of fun if you can learn the math needed and deal with the debugging tools available.
Yeah but it makes sense in programming. There are some things that take a long time to learn, but once you know it, its simple, so its really just a time investment. Other things take a long time to learn, and even when you have read everything, you still feel like you don't understand it.
I still have trouble with TDD/BDD and the best way to write something with functional programming and I've got a zillion books on it, there are also so many practical uses for genetic algorithms which you wouldn't think of (learning from customers). With 3D programming because its so straightforward, stateful and imperative, its really just getting into the zone, code cutting and reading up on how to do things. If lego was programming, it would be OpenGL.
On February 23 2012 07:29 nath wrote: as someone who's been programming most of his life, and is very in-tune with the industry (game industry, enterprise software, and startups) I have to disagree with using Flash.
My anger at you recommending flash was cooled off by your description of C, though. But i think you exaggerate how much more helpful it is to start with C just so you understand the benefits and additions of C++ better; its not a huge deal; to me C and C++ are very very very similar and there is no disadvantage of simply learning C++ first, as the usefulness and proper applications of the additional functions of c++ over c can be intuitively learned rather than directly learned by having used pure c.
I would agree with you on learning pure c if you are going to use objective-c for iphone/ios development and don't already know c++. even so in that case, provided its not your first programming language, just learning objective-c and working out proper usage of the features through usage and intelligence/knowledge that grows while you learn, is probably the more efficient route. I firmly believe in separating the learning of concepts and languages, rather than thinking purely in terms of using a specific language to learn a specific set of programming concepts and then moving on to other languages..
I sort of agree. Flash is already outdated and death is waiting for it. HTML5/JS is basically removing it from the market. Steadily.
Python is excellent language and there are many examples of software written in C/C++ that can be extended with Python so it's worth to take a look.
As for C and C++. I disagree that there is no disadvantage in learning C++ first instead of C. For the following reasons: 1. C++ is fast. C is faster! At least that's how Visual Studio makes the end code - not sure about gcc/g++ 2. If you learn C++ you won't learn C specific approach to programming. Namely you will focus on creating/removing objects instead of allocating/freeing memory. That's actually significant difference in terms of performance. Also you won't be that used to using pointers. C background may very well let you implement algorithms more efficiently. 3. If you start with C++ you will probably never revert to pure C - in some way you will never know C. The other way around is not true - however - as surely (especially in programming games) you will want to start using OOP - so C++. 4. Finally - C is easier. There is less stuff to learn. If you want to learn some architecture specific stuff (like parallel programming) you should go with C. Once you are proficient with C you can expand with C++ - this way you can always fall back on C experience.
I've been coding in the games industry for about 6 years now, and it's almost exclusively C++. Yes, you lose out on the nuances that C gives you, but call it laziness or whatever, it's just not done that much any more (also if you end up coding cross platform, you will possibly be using the platform specific functions for creating/freeing objects masked away inside some C++ wrapper anyway). It's also good to know some C#, as if you end up wanting to do some tools, or just feel like making some handy day-to-day things, it is quick and powerful. The third language I would recommend is Python. It can be used similarly to C# to make some quick tools and it is arguably even more powerful than C#. This is mainly due to the plethora of add-ins you can get for Python that extend its use. PyQT is a great designer that turns Coding in Python to something similar to C#, but with all the benefits of using Python. Also check out Iron Python, as it gives you the ability to cross-develop with Python/C#/C++
The most important tool to have is passion, though. You've got to want to do it. Even outside of work I like to code. I have made some casting tools. One that allows you to draw on whatever's on the screen and a live-capture analysis tool for Starcraft. If you have the desire and the drive to do something, it's less important the road you take to get there.