Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
So this summer, so far, has been long and empty and spending a summer playing WoW and LoL and painting elves can only be so full.
I'd like to learn how to do a bit of programming, with the end goal of maybe being able to make very simple games.
I know literally nothing. I know the names of a couple of languages, but I know nothing beyond that.
Is there specific software I use? Is it free? What language is easy? Are there any online guides? Are there any good books?
Thanks!
Do you want to make games just to have on your computer and be proud of? Or games that you'd upload to a website and have others play?
For the former, I'd recommend learning some standard programming language like Java. For the latter, I think you'd be in the same boat as me and finding a way to learn Flash. Not sure about Java environments but the Flash software isn't free.
Start with C++. If you learn it properly it will teach you better practices than something like Java and you will write cleaner code in the future.
It also has the advantage of being well established, very widely used, and if you are fluent in it then you've already got a very good understanding of C and C#.
If your end goal is to try to make a simple game, Processing is pretty good, well documented, and easier to understand than something like C++, particularly since you're totally new to programming and you aren't going to want to start getting into things like memory management right now.
Processing is a language for designers/artists to sort of teach the basics of programming in a visual way so that you can get to the point of outputting graphics really quickly. It's also Java based, or really, Java in a friendly beginner coder wrapper.
Check out w3schools, it is an amazing site for learning any coding language from scratch.
That said, while C++ will make you more 'pro' I wouldn't recommend it to start since it's got things like reference libraries and header files you have to take care of which can complicate the learning process.
I would recomment VBScript to start since you just need a text editor (Notepad or Notepad++ if you want something more sophisticated) and a browser to run it. You can start the tutorial here http://www.w3schools.com/vbscript/default.asp
Once you learn the basic programming concepts then see where you'd like to go from there.
I've got good news and bad news about 6th level, That Guy. The good news is that Forbiddance spell allows you to prevent enemies different alignment from entering a consecrated area, which is actually useful! The bad news is that the only other new sixth level spell makes lunch for everybody. Guess which one the party is going to expect you to cast.
Start with C++. If you learn it properly it will teach you better practices than something like Java and you will write cleaner code in the future.
That's like starting hill climbing by going up a mountain. It's the hardest common language. It absolutely does not teach you better practices because it allows you to do whatever crazy shit you like without sanity checking it. I say this as a big fan of c++ who uses it all the time.
I vote Java. It teaches you all the principles of programming and has an easier learning curve than c++. You can get the sdk from Sun, and I'd advise getting a book on it (your local library may have one)
I second XNA, as I believe you can get Visual Studio Express for free if you're developing as a hobbyist. XNA also abstracts away a lot of the crap hobby game designers don't really want to know about, so it's a bit of a more gradual learning curve. Plus, C# is a pretty easy language to get started with (like Java).
EchoPer Aspera Ad InferiSuper Moderator, Moderatormod
Ignore the "games" part first. Learn the basic foundation of a language.
I actually recommend C. No, not C++. Just plain old C. Just to get a basic understanding of the syntax, variables, data types, functions and such. When you have that under your belt, you can move on to other languages.
I have an ancient book from 1982 that I used to learn the basics of C, and wrote a simple program that takes a number in seconds and converted it to days, hours, minutes and seconds. Pretty good starting exercise.
I'll third C#/XNA for amateur game dev. XNA is awesome.
To echo Echo, though, starting programming with writing graphical games is a bit odd. That's kind of like becoming a NASCAR driver (or maybe amateur autocross, really) so that you can learn to drive. Learn to walk before you run, etc. I say go for it, though. The worst that happens is you have trouble understanding exactly what it is you're doing and then go figure out the more basic stuff on your own terms, as you feel you need to, which helps keep those basic boring things more interesting.
Ignore the "games" part first. Learn the basic foundation of a language.
I disagree. Writing a game is an excellent way of learning a language. A small game, like tetris is ideal (a larger game is daunting).
Learning a programming language like a Latin grammar is boring as hell. Having an aim in mind (as long as you don't think you are going to sell the resulting game) makes it much more interesting.
Starting on a game might be a bit daunting though and you should be okay with thinking it sucks at the end (and you will unless you periodically revise your old code as you learn new practices).
That said, coding with a goal in mind (ie: Trying to make something) is a lot better than coding just because you can.
I've got good news and bad news about 6th level, That Guy. The good news is that Forbiddance spell allows you to prevent enemies different alignment from entering a consecrated area, which is actually useful! The bad news is that the only other new sixth level spell makes lunch for everybody. Guess which one the party is going to expect you to cast.
However for learning some programming basics (at a high level, not memory management and the like with C) the resources available written with Ruby are fantastic:
I'm sorry but I can't fathom recommending C to someone who just wants to learn how to program a bit on the side. If this person was asking how to start a career in software development I'd think differently, but if this is just for fun then it will probably just lead to frustration. Even getting a simple GUI set up in C/C++ is a huge ordeal for someone new to programming.
No, don't do this. C++ is not a friendly language for beginners, and starting with something that doesn't make things easy will just frustrate you and make you want give up.
Between Java and C#, I'd pick C#. I find it much friendlier. That said, you might want to start with something even simpler like Python (with Pygame for simple game development).
Check out w3schools, it is an amazing site for learning any coding language from scratch.
w3schools sucks. They show the bare minimum syntax, and never any best practices, let alone theory. It's barely suitable for hobbyists.
To the OP, getting good at programming requires learning some theory. Any idiot can pick up a book, copy code, and become impressed that 'Hello World' popped up on the screen. In order to channel your imagination, you'll need to learn not only how to do a certain thing, but why. Moreover, you'll need to learn why one way of accomplishing a goal may not be as good (efficient, flexible, etc.) as another.
Since gaming is your thing, I'll echo the XNA recommendation. You can get a free C# IDE from Microsoft (search for Visual C# Express, and you should find your way to it), and the XNA framework is also free. You really can't go wrong with C# 4.0 In A Nutshell as your language reference, and that XNA book someone else linked to looks decent. You also may want to get the Gang of Four's book on OOP, as you'll be writing OOP code.
This should get you started. Start small at first. Write simple programs that can take user-supplied input, act on it, and display results. Move on from there.
Your "Design patterns" book recommendations is way, way too advanced. It is equivalent to telling someone who asked "How do I build a shed?" to get a weighty tome on architecture so they can fully understand the principles behind it.
Design patterns are great for someone who has got a "feel" for a language by mucking about with a few simple programs first. Otherwise, it will be sheer gobbledegook. The "C# in a nutshell" book should be good for getting up and running.
I've got good news and bad news about 6th level, That Guy. The good news is that Forbiddance spell allows you to prevent enemies different alignment from entering a consecrated area, which is actually useful! The bad news is that the only other new sixth level spell makes lunch for everybody. Guess which one the party is going to expect you to cast.
I want to second that learning to code by making games is a very reasonable way to learn. The first language I learned in high school was VB. Pretty much as soon we learned what a button, a function, and an if statement is (within a month), I devoted a decent amount of free time to coding a pretty good version of Pong. I had to look up a couple things like KeyDown functions but that wasn't difficult.
Coding games that use new information I acquire was what kept up my interest in programming as long as it did.
Games could be a decent way to start as long as you remember to start small. I think getting a grasp of programming ideals would be the best route and then if you run into an issue simply look it up. There are lots of tools and references out there. Just don't be afraid to do some research, you're not going to be a master of any language anytime soon, there's a lot of work to be done to learn. That being said C# is my language of choice and it is easy enough to get a grasp on.
I agree that C# is the best choice provided you are in a windows environment. It's a great language and makes it pretty difficult to screw things up for yourself. I would grab Visual Studio 2010 Express from Microsoft and start building some simple examples. If you're still interested after that, I'm sure there are simple game tutorials out there on websites like http://www.codeproject.com/.
Posts
Do you want to make games just to have on your computer and be proud of? Or games that you'd upload to a website and have others play?
For the former, I'd recommend learning some standard programming language like Java. For the latter, I think you'd be in the same boat as me and finding a way to learn Flash. Not sure about Java environments but the Flash software isn't free.
It also has the advantage of being well established, very widely used, and if you are fluent in it then you've already got a very good understanding of C and C#.
its free, there is a huge support network.
and you can make games for the 360 and PC.
i've just started following this book:
http://www.amazon.com/Microsoft-XNA-Game-Studio-3-0/dp/0735626588
It's super easy to follow, and i've never coded.
Processing is a language for designers/artists to sort of teach the basics of programming in a visual way so that you can get to the point of outputting graphics really quickly. It's also Java based, or really, Java in a friendly beginner coder wrapper.
That said, while C++ will make you more 'pro' I wouldn't recommend it to start since it's got things like reference libraries and header files you have to take care of which can complicate the learning process.
I would recomment VBScript to start since you just need a text editor (Notepad or Notepad++ if you want something more sophisticated) and a browser to run it. You can start the tutorial here http://www.w3schools.com/vbscript/default.asp
Once you learn the basic programming concepts then see where you'd like to go from there.
That's like starting hill climbing by going up a mountain. It's the hardest common language. It absolutely does not teach you better practices because it allows you to do whatever crazy shit you like without sanity checking it. I say this as a big fan of c++ who uses it all the time.
I vote Java. It teaches you all the principles of programming and has an easier learning curve than c++. You can get the sdk from Sun, and I'd advise getting a book on it (your local library may have one)
Here is an old but simple article on games in Java
http://www.gamedev.net/reference/articles/article1262.asp
http://www.gamedev.net/reference/articles/article1360.asp
http://www.gamedev.net/reference/articles/article1383.asp
I actually recommend C. No, not C++. Just plain old C. Just to get a basic understanding of the syntax, variables, data types, functions and such. When you have that under your belt, you can move on to other languages.
I have an ancient book from 1982 that I used to learn the basics of C, and wrote a simple program that takes a number in seconds and converted it to days, hours, minutes and seconds. Pretty good starting exercise.
To echo Echo, though, starting programming with writing graphical games is a bit odd. That's kind of like becoming a NASCAR driver (or maybe amateur autocross, really) so that you can learn to drive. Learn to walk before you run, etc. I say go for it, though. The worst that happens is you have trouble understanding exactly what it is you're doing and then go figure out the more basic stuff on your own terms, as you feel you need to, which helps keep those basic boring things more interesting.
I disagree. Writing a game is an excellent way of learning a language. A small game, like tetris is ideal (a larger game is daunting).
Learning a programming language like a Latin grammar is boring as hell. Having an aim in mind (as long as you don't think you are going to sell the resulting game) makes it much more interesting.
Then you just don't have enough interest in programming.
I should change career then!
Or have syntax definition pages as my bedtime reading
[edit] I actually did read syntax definitions like a story book when I was a (weird) kid. These days I google them!
That said, coding with a goal in mind (ie: Trying to make something) is a lot better than coding just because you can.
I'd give some links to compilers and stuff too, but I don't really know what the cool kids use nowadays. GCC is free though.
http://www.pygame.org/
However for learning some programming basics (at a high level, not memory management and the like with C) the resources available written with Ruby are fantastic:
http://pine.fm/LearnToProgram/ (great)
http://mislav.uniqpath.com/poignant-guide/ (awesome, but not for everyone)
No, don't do this. C++ is not a friendly language for beginners, and starting with something that doesn't make things easy will just frustrate you and make you want give up.
Between Java and C#, I'd pick C#. I find it much friendlier. That said, you might want to start with something even simpler like Python (with Pygame for simple game development).
w3schools sucks. They show the bare minimum syntax, and never any best practices, let alone theory. It's barely suitable for hobbyists.
To the OP, getting good at programming requires learning some theory. Any idiot can pick up a book, copy code, and become impressed that 'Hello World' popped up on the screen. In order to channel your imagination, you'll need to learn not only how to do a certain thing, but why. Moreover, you'll need to learn why one way of accomplishing a goal may not be as good (efficient, flexible, etc.) as another.
Since gaming is your thing, I'll echo the XNA recommendation. You can get a free C# IDE from Microsoft (search for Visual C# Express, and you should find your way to it), and the XNA framework is also free. You really can't go wrong with C# 4.0 In A Nutshell as your language reference, and that XNA book someone else linked to looks decent. You also may want to get the Gang of Four's book on OOP, as you'll be writing OOP code.
Links:
C# 4.0 In A Nutshell
Design Patterns by the Gang of Four
This should get you started. Start small at first. Write simple programs that can take user-supplied input, act on it, and display results. Move on from there.
Stack Exchange | http://www.mpdevblog.blogspot.com
Your "Design patterns" book recommendations is way, way too advanced. It is equivalent to telling someone who asked "How do I build a shed?" to get a weighty tome on architecture so they can fully understand the principles behind it.
Design patterns are great for someone who has got a "feel" for a language by mucking about with a few simple programs first. Otherwise, it will be sheer gobbledegook. The "C# in a nutshell" book should be good for getting up and running.
Once she gets a hold on that stuff she can start to learn the theories behind it.
Although now that you mention it 4 guys from rolla (I think that's it) might be a better site.
Coding games that use new information I acquire was what kept up my interest in programming as long as it did.