Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Game programming?

I wanted to know what things I should learn to become a game programmer. What skills are needed? What should I be learning? I know there's no c++ or c# courses here. Should I learn Javascript, Python, or Java?

Thanks for that. I'll check those out once I'm done with the python track

1 Answer

The short answer: you can program a game in any language.

The less-short answer: your target platform and type of game will help narrow the options.

My opinionated answer: JavaScript is the best to learn if C++ isn't an option. There are tons of documentation, 3rd party libraries, demos, and videos covering this topic.

A word of caution: game programming is often considered the most difficult form of programming; if you can program games, you can pretty much program anything.

If that didn't scare you, then check out this JavaScript game engines page on GitHub.

Good luck!

What about something like pygame? What is scripting? I always hear python being used for scripting.

pygame is fine, just not my first choice. Eventually you'll start to learn about the limitations of a language or 3rd party library and will need to decide whether to work within those limitations or change to a language that will fit your needs better. You can program a game in any language. My advice is to pick a language with the most documentation, largest community, latest technology, most tutorials - and in my opinion, that's JavaScript.

Scripting means the language is interpreted, not compiled. This means, at run time, the language is being parsed by an engine (like V8 for JavaScript) and turned into machine usable code in real time. Your CPU is having to work harder per line of code, which is why the AAA games will continue to be written in C/C++ and less computationally intensive games will have the option of being written in a scripting language.

That being said, the gap in performance between compiled and scripting languages is getting very close. I recall watching a developer conference video showing a AAA game being played in the browser. Also, I watched Notch reverse-engineer Doom to play in the browser - while not a AAA game, the trend is moving to get high quality games playable in browsers.

One last comment? I've been using Game Maker to learn how to program games. Don't let it fool you into thinking it's too simple. The drag 'n drop interface is just a stepping stone until you learn how to write and use code in the IDE. There are some great tutorials you can find on YouTube, and elsewhere I'm sure.

I've heard great things about Unity 3D and Unreal Engine 4 if you want to consider those.

How easy would it be to transfer from pygame/python to openGL/C++ when I need to? I have looked into Game Maker, I just really like programming, and wanna learn real game programming even though it's a lot harder. Any good resources/books for learning game development? Thanks

Pretty much most of what I posted here is the limit of my knowledge on this subject. However, one more nugget I can pass along is that you can learn Direct X for free if you're willing to deal with that level of technical jargon. Tommy from Team Meat - co-creator of Super Meat Boy, claims he learned Direct X by shutting himself away for a while and just read the documentation. Visual Studio is the IDE you'd want to use for a Direct X game.

I can't really be more specific than this. Google is your friend, and insatiable curiosity is a must.

Gavin Ralston
Gavin Ralston
28,770 Points

Unity will allow you to use javascript or C#, too, and keep you protected from implementing a graphics engine, which is where the real pain is.

One more question. What is HTML 5 game development? Does that have to do with JavaScript?

Yes, HTML5 game dev uses JavaScript.

Here is a link to more information - from Mozilla MDN Canvas Tutorial

Using the <canvas> element is not very difficult, but you do need a basic understanding of HTML and JavaScript. <br>

From Getting started with WebGL

WebGL enables web content to use an API based on OpenGL ES 2.0 to perform 3D rendering in an HTML canvas in browsers that support it without the use of plug-ins. WebGL programs consist of control code written in JavaScript and special effects code(shader code) that is executed on a computer's Graphics Processing Unit (GPU). WebGL elements can be mixed with other HTML elements and composited with other parts of the page or page background.

I've been following along with these pygame YouTube videos by sentdex for thenewboston. I'm learning a lot and having fun - so check it out if you're still interested in pygame. I'm currently on video 25 of 100.

One more question, if I knew javascript, do I know UnityScript?

I'm not qualified to answer that, so I found this link on JavaScript vs. UnityScript which seems to suggest they are very similar but, not exactly the same.

In other words, if you know JavaScript, you probably know most of UnityScript and can easily transition to it.

Gavin Ralston
Gavin Ralston
28,770 Points

I think the current trend with Unity, though, is to use C# or javascript anyhow, instead of using unityscript. That was also so last year, so maybe it's shifting again.