Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4

Author Topic: Learning to Program  (Read 4054 times)

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #15 on: February 09, 2010, 07:17:43 pm »

I can just say welcome aboard the devtrain and good luck.

My experience so far has been hitting my head against a wall repeatedly, but there's cracks and dents showing. Slowly. Don't get discouraged too fast, is what I'm saying.

What are you working on Siquo?

If you want to do Python, may I suggest http://inventwithpython.com/?

It specifically teaches you programming through making small games.

Also, the thing I've noticed about learning (through failed and successfull attempts) over the years is that there are three things you need to get somewhere: first, drive (which is actually learnable itself, who knew that); second, repetition ("tell me something I don't know" inorite?); third, models, as in: people who are already good, who are willing to share their knowledge.

A plan is also good, but I see you have that down. I'm also embarking on learning python (along with Spanish, which is also a language ;)), so if you ever need a study-buddy (or goal buddy or whatever), you know you have one on the forums.

Wow Minstrel, thanks! I've put this into my favorite, for later viewing.
Logged

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Learning to Program
« Reply #16 on: February 09, 2010, 09:03:03 pm »

I'm here if you ever have a doubt and don't know where to ask... You've got my live account.

I might guide you in the right direction, who knows...  and I always learn something from it.

If you ever want to learn C++ the link in my sig is the best I've encountered, so far. 

Here's a great site for all things relating to game development: http://www.gamedev.net/
Has pretty much everything.
Yep... That's the holy site.  :P
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Learning to Program
« Reply #17 on: February 10, 2010, 07:02:15 am »

I'd say go for C# and directx 9 or 10, or use Java.

I'm trying to learn C# at the moment. It's pretty easy, especially when using the ms visual studio.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to Program
« Reply #18 on: February 10, 2010, 08:08:30 am »

C++ is kinda hard. Because you can do almost anything, there are zillions of ways to screw up, as well.

And compiling with external libraries is a drag.

Currently I'm working on A Game With Everything. Combine haven&hearth with dwarf fortress with toribash and spore. With my schedule, it will be done in about 2030. Right now I'm still working on the terrain and render engine.

Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Kippling

  • Escaped Lunatic
    • View Profile
Re: Learning to Program
« Reply #19 on: February 10, 2010, 10:54:41 am »

Good luck to you OP!

I've got a points/tips to contribute. Lots of people say that the first language you learn is the hardest, which I tend to agree with. Once you've got a handle on one, then it's easier to understand others because there are often similarities between them and you'll know some of the jargon too which helps.

I think you should start learning C, then move on to C++ when you feel ready. You could also start with C++ right away if you wanted. I believe there are several reasons for this. Firstly, if you want to program games then there's loads of code written by other people in C/C++ which you can make use of (the excellent Allegro library comes to mind - not that I'd recommend starting with that on day one), which can make the process easier. It's widely used in all sorts of applications, so there's tons of information & examples available online and plenty of books too, which can help you along. More than python I think. C++ uses a lot of things from C, so that eases the learning curve somewhat when moving between them. I suppose it could be argued that C/C++ is in some ways harder then other languages e.g. python, but it's not that bad! Chances are that if you get into game programming you'll learn it at some point anyway, so why wait?

I highly recommend the book Accelerated C++ (see http://www.acceleratedcpp.com/) as a starting point. It's really good. It teaches you what some consider the 'advanced' parts of C++ (e.g. ST, iterators etc) right from page one and it's very accessible, non-intimidating, simple to understand and provides tons of easy examples. It's not a huge doorstop of a book either which is a bonus.

I'd suggest not using MS Visual C++ as your first IDE. It's a good IDE for sure, but not all that easy for beginners. Skip Dev-C++ too, despite any recommendations you may see elsewhere. It's not been updated since 2005 and it's showing its age now. The compiler it comes with is seriously outdated too. I'd recommend Code::Blocks. It's free, still being updated and newbie friendly. I think it comes bundled with a compiler, but if it doesn't, search google for MinGW, assuming you're using MS Windows. If you get stuck or can't set it up, send me a message and I'll help you out.

A list of good online C/C++ sites would include http://www.cplusplus.com (my favorite reference, it's got tutorials too).
Logged

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #20 on: February 10, 2010, 01:30:58 pm »

Alright, I'll look at C/C++. Do I need a special program or something? One site said I could write it in Notepad?
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: Learning to Program
« Reply #21 on: February 10, 2010, 01:42:38 pm »

Learning programming is not for the goal-oriented.
This is the best summation of learning programming I have ever, ever seen.

I am stealing that line.

I'm always amazed at the people recommending that newbies start with languages that don't even have a consistent library from platform to platform. Jesus wept, just because we were tortured with C and C++ to begin with doesn't mean that other people have to be or should be.

OP: For serious, start with something that's actually a sane programming language. Start simple, where the "hard parts" are abstracted away by the system, and then move on to languages where you handle what is abstracted in other languages when you need to. By the time you need that power and flexibility, you will be able to learn when it is appropriate to use it and you will be in a much better place for actually learning those languages. Python is a great choice for beginners. C# is also a great choice. C/C++? Not so much. Learn how to program, then learn how to pervert what you know to work in C++.


EDIT: Incidentially, the post below me shows why you should avoid GCC and the MinGW ecosystem, if you insist on bashing your face off the wall that is C/C++. Just go effing get Visual C++ Express and concentrate on learning to program instead of jerking off about setting up your tools. Use Microsoft's tools on Windows, use GNU's on Unix. This isn't that hard of a concept, and it saves you a hell of a lot of time.

Siquo, thank you for demonstrating my point very admirably. Don't get me wrong: the GCC tools are usable (if poor) if you have nothing better, and on most Linux distributions they come with sane enough default settings that they're quite good, but on Windows, they're pretty damned poor and even a novice has better things to do than screw around with that sort of thing. I'm kind of wondering if the advice below is a parody: I mean, geez. "Manually update autoconf." What is this, 1994? You haven't even had to do that on Linux for a decade. And cygwin...man, the hits just keep on coming, don't they?
« Last Edit: February 10, 2010, 01:54:30 pm by Blacken »
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to Program
« Reply #22 on: February 10, 2010, 01:44:33 pm »

I'd recommend not to start with C++. C++ is a lot harder, and you'll spend more time on pedantic semantics than actually getting something done.


If you do go for it, get code::blocks, it's a decent, free and still updated IDE. MinGW with g++ should be included. You can use cygwin for library-compiling, although I use msys myself. If you do use msys, make sure to install all 3 necessary components, and then manually update autoconf and some other utilities for it to work. Keep short directorynames for your libraries without spaces, and try to use global variables in code::blocks for easier linking and including libraries, which you of course need to set up per release or debug build version. Also don't forget to set the libflags for the g++ compiler, and then there's the DLL's that need to be in the $PATH, and be careful about throwing them in sys32, you might forget about them when you need them the most. If you're ready for the complicated stuff, just ask away :)

Really, I'd recommend Python for a starter-language ;)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #23 on: February 10, 2010, 01:58:43 pm »

I guess it would be best to start simple, seeing as how it's reiterated that once you learn one, picking up another would be much easier.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to Program
« Reply #24 on: February 10, 2010, 02:17:23 pm »

I'm kind of wondering if the advice below is a parody: I mean, geez. "Manually update autoconf." What is this, 1994? You haven't even had to do that on Linux for a decade. And cygwin...man, the hits just keep on coming, don't they?

It's a real summary of the hell I've been through. Jerking off is not the term I would use, smashing your head against an unsmoothed wall is less painful. Persistance is a virtue. Did I even mention that the mingw site was hijacked for a while and there is no documentation about setting up msys anywhere else? Or the almost complete lack of documentation of openGL 3.2? Or needing unstable libraries right out of the svn?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: Learning to Program
« Reply #25 on: February 10, 2010, 02:23:36 pm »

That's the kind of thing that pisses me off about learning to program.  You have to be a programming literate IT guy to learn how to program in the first place.

So, do you gurus have any advice for a goal-oriented person who wants to program?  I'd like to think my goals are very achievable, I've just never found a goal-oriented tutorial or command dictionary to make them happen.  Or for that matter, a program language good for beginners, since apparently every language is either an exercise in package wrangling frustration, or Python which doesn't actually run on it's own.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Kippling

  • Escaped Lunatic
    • View Profile
Re: Learning to Program
« Reply #26 on: February 10, 2010, 02:57:18 pm »

OP don't listen to these guys trying to scare you off. Loads of people learn C or C++ as a first language and do just fine, really. I guess it has got a steeper learning curve than python, but literally anybody can learn it if they put the effort in. Goodness, even I can do stuff with it, and I'm a complete shambles. I can't remember my own age without counting up from the year I was born. On my fingers. I frequently try to put my shoes on the wrong feet. I can't work out if "k" comes before "l" in the alphabet without singing the song in my head.

Setting up Code::Blocks for newbies in 8 steps:-

1) Go to http://www.codeblocks.org/downloads/5
2) Download the file codeblocks-8.02mingw-setup.exe
3) Run it
4) Click the Code::Blocks icon on your desktop. Twice. Quickly.
5) Press File->New project
6) Select Win32 GUI project. Accept all the defaults. Save it where you like.
7) Press F9
8) Bask in your glorious victory as an example program is compiled and run for you

So which unstable libraries did you need to download? How did the lack of adequate openGL3.2 documentation hinder you? Did evil GCC 'splode your computer? Report back!
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to Program
« Reply #27 on: February 10, 2010, 03:26:56 pm »

SDL 1.3 which needed separate compiling using msys. OpenGL3.2 documentation... well, just go to the site, go to the 3.2 wiki, and click a few links. I found 5 working pages, so far. GCC didn't splode and is working fine, but I never said it was bad. Right now I've run into a wall setting up the shadercompiler for the videocard, but decided to skip that step until later and work on something else first.

You know, sometimes when you program something big, you code and code and code and then compile and run and it works right away? C++ never did that to me ;)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: Learning to Program
« Reply #28 on: February 10, 2010, 04:12:08 pm »

C++ isn't too bad, I learned most of it in 8th grade. The trick is finding a good book which fits your learning style. And believe me when I say that part is harder than it sounds. Optimally, you could take courses on the language in a college/community college.

As for being goal oriented with learning programming: Don't. Even the most astute proffessional game developers will end up delaying releases by extraordinarily long periods of time; if you aren't in it because you enjoy the process itself, it is going to be less fun than WoW gold farming. Especially when you begin the inevitable bughunting phase of development.
Logged

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #29 on: February 10, 2010, 04:15:27 pm »

As for being goal oriented with learning programming: Don't. Even the most astute proffessional game developers will end up delaying releases by extraordinarily long periods of time; if you aren't in it because you enjoy the process itself, it is going to be less fun than WoW gold farming. Especially when you begin the inevitable bughunting phase of development.

What do you mean by this?
Logged
Pages: 1 [2] 3 4