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 4066 times)

Siquo

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

Probably to don't expect to actually create something that's in your head right now if you're still in the learning phase within a reasonable amount of time. It's easy to get disappointed if you don't get results. If you don't expect results but enjoy the road more than the destination, you have a chance you'll get somewhere ;)
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))

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: Learning to Program
« Reply #31 on: February 10, 2010, 05:35:32 pm »

Depending on what you try to program, the impetus to add in silly or extravagant features is overwhelming.  I tried (technically still am trying) to program a RL in python, and spent most of my time playing around with a random cave generator and a field-of-view algorithm.  I also enjoy simulation programming, so many of those become "what do I want to try to make this do next."  Four-thousand tweaks later, the program is unrecognizable.  Here's a very important but difficult to practice tip:  Make lots and lots of backups, because there is always a 50% chance that what you are trying to fix or redesign is actually going to turn out worse than it was before.

Since you appear to have no past experience programming, I still vote Python.  Playing around in IDLE (the command prompt-esque code editor and executor) is a good way to get a handle of different functions.  The biggest problem with Python is when you look at code written by a really crafty bastard who managed to fit his logic into just a few loops - it's impressive and something to aspire to, but it's not a good learning tool.

Even if you ultimately discard Python, it's a great place to start.
Logged
EMPATHY - being able to feel other peoples' stuff.

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: Learning to Program
« Reply #32 on: February 10, 2010, 05:47:51 pm »

Learning python here.
I should just update the forgotten thread eventually.
But yeah it is in fact a lot easier to learn than C++ (I said easier not easy :P)
Logged

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: Learning to Program
« Reply #33 on: February 10, 2010, 06:15:53 pm »

I'm in the same boat.

I've programmed on and off for years, extremely basic stuff (In BASIC!) and vb back in the day. I took a course on C++ a long time ago.

I'm picking it back up again. To say programming isn't about goal-orientating is absolutely correct but a hindrance. When you first start programming, you need goals or to write mini-programs to actually learn about the development process and make you happy when you achieve something. No one builds their killer app/game on the first try, and often it takes years to have a decent one. You have to enjoy programming to get deep into game development.

Provided you understand basics like DF modding and those sorts of commands, outside modding/scripting for other games, which helps: you should learn the absolute basics of programming first before tackling game development.

Invest in a book, class, or read online lessons. By my experience I will recommend C++. I know it's difficult and not the path I took. But if you understand C++, which is essentially the industry standard when it comes to such things, tackling python will be a piece of cake.

Though, I have heard good things about using the libtcod library.

Anyhow, I'm still playing around with things, we'll see if it goes anywhere.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to Program
« Reply #34 on: February 10, 2010, 06:30:05 pm »

You know what we need? A programming subforum.
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))

Minstrel

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #35 on: February 10, 2010, 06:35:17 pm »

You know what we need? A programming subforum.

What? So "Creative" isn't "Programming" in Dwarfish?

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: Learning to Program
« Reply #36 on: February 10, 2010, 06:38:15 pm »

Right now it falls under creative projects and to be honest it appears most neckbeards appear wary of posting their own code up to the scrutiny of the internet.

Even the helpful ASCII: Terror dungeon tutorial had people complaining about how wasteful his code was and the Roguelike development thread has a guy working on a SDL tutorial library while people are saying SDL is bloat.

Minstrel

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #37 on: February 10, 2010, 06:47:09 pm »

Right now it falls under creative projects and to be honest it appears most neckbeards appear wary of posting their own code up to the scrutiny of the internet.

Even the helpful ASCII: Terror dungeon tutorial had people complaining about how wasteful his code was and the Roguelike development thread has a guy working on a SDL tutorial library while people are saying SDL is bloat.

Well part of becoming a creative worker is learning how to shield yourself from baseless criticism and extracting only what you need from the warranted one. It takes loads of respect for yourself, your work and your critics to pull that off, but I believe it's one of the most rewarding things possible - to be able to create in an environment you created to both nurture and challenge you.

florian

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #38 on: February 10, 2010, 06:49:50 pm »

Learning to program will take you about 5 to 10 years, depending on the amount of studying you do. Seriously, it is going to take a long time. It is not as simple as learning how to tell the computer to do something, you will also need extensive problem solving skills, the ability to determine which algorithm to use (and the ability to create algorithms and analyze them) and knowledge of a myriad of things I cannot possibly enumerate.

Also, before you have learned quite a bit, you cannot tell if a problem is simple or easy to solve. There are quite a lot of problems that will suddenly appear, for example problems with algorithm efficiency.

If you want to start, start by learning Python or C#. Those are relatively easy and modern. Do not even think about C++. C++ has more concepts than any other language and muddles them into one big steaming mess, and because there are lots of bad side effects that will suddenly crop up, be prepared to investigate mysterious errors. C would be possible, but it is quite harsh and the syntax is anything but nice.

Should you have learned a nice part of Python or C#, you can continue with Haskell (or ML or Lisp) and Erlang and JavaScript (or something equivalent; I do not know which languages will have the nice and shiny concepts in 5 years). Each of these will teach you something important. You can now continue with C, knowing all the concepts you have picked up before your programs will make sense, be beautiful and be fast.

Then you can work on algorithms and data structures. If you have got the guts to do it, read Knuth. Get better. And someday, make your game.

This is the path I should have taken. I started with BASIC, moved onto C/C++ (bad idea), onto various scripting languages (Perl, Ruby, PHP), onto functional languages (Haskell, Erlang). And now I am back at C and starting to work on my project.
Logged

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #39 on: February 10, 2010, 06:59:45 pm »

florian. This is the first time i've heard of Erlang or Haskell. Also, if I may ask, what's Knuth?

But onto something else that's relevant: 5 to 10 years? I understand that programming language isn't very intuitive for someone that's not used to thinking like this, but it seems a bit extreme.
Logged

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: Learning to Program
« Reply #40 on: February 10, 2010, 07:06:16 pm »

5-10 assumes reaching "mastery" of a particular language, but you don't have to be a programming master to make a fun game ;)

Toady has been doing this for years, since he was a kid. He by no means writes perfect code, and yet we have this pretty good game. heh.

The important thing to note is that programming is a process - if you keep at it eventually you'll find yourself making something amazing. It may seem daunting now, but no one was born with the ability; they enjoyed doing it, so they kept at it and getting better.

Alexhans

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

He doesn't want to program for a living, not yet at least... let him enjoy the ride instead of throwing all that scary prospects at his feet...

Josh... Pick a language that suits you... How will you know?  If you manage to do what you intend to do without having to go crazy with a million runarounds...

Just learn the basics and try doing basic stuff... With each new concept you learn, try to apply to something you'd find interesting...

Don't worry about games for a while unless they're really simple like guessing a number or a simple memory game, or a math game, etc...

EDIT:  I find that it gets even more daunting as you try to do more complex things or write better code (or really understand what is going on inside the computer)...  :P
« Last Edit: February 10, 2010, 07:12:18 pm by Alexhans »
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: Learning to Program
« Reply #42 on: February 10, 2010, 07:16:34 pm »

Yeah, for another example, look at Aurora:

It's an amazing game of incredible depth, but under the hood it's apparently a bit of a mess, in visual basic! (VB means I understand how the program works)

It was programmed in Steve's spare time to facilitate his writing.

florian

  • Bay Watcher
    • View Profile
Re: Learning to Program
« Reply #43 on: February 10, 2010, 07:28:16 pm »

florian. This is the first time i've heard of Erlang or Haskell. Also, if I may ask, what's Knuth?

But onto something else that's relevant: 5 to 10 years? I understand that programming language isn't very intuitive for someone that's not used to thinking like this, but it seems a bit extreme.
Donald Knuth wrote The Art of Computer Programming, one of the most important works about programming. Currently there are 4 volumes which contain lots of good information and will probably open your eyes, if you can understand them. It is a major challenge/achievement to read the books. You can be a competent programmer without reading them, but they will certainly help.

The 5 to 10 years estimate is based on this and on my own experience. You can write programs that will work after just a few months of learning, but you will not know about the intricate details.

Both Haskell and Erlang are a joy to use, but they require some serious learning—especially Haskell—and will frustrate you to no end. Haskell will show you functional programming, lazy evaluation and monads. Erlang will show you shared-nothing concurrency, immutability and message-passing.
Logged

Kippling

  • Escaped Lunatic
    • View Profile
Re: Learning to Program
« Reply #44 on: February 10, 2010, 07:44:18 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 ;)

I suppose so. I'm being a bit cheeky really suggesting C a cakewalk, because it's obviously not when you're doing something involved like you describe. As a beginner, getting "Hello, World", your alphabetical sorting program (or whatever) running can't be too much more difficult in C than in python/basic. The OP isn't going to be worrying about compiling SDL or anything for a while I wouldn't think. By the time the OP has got enough experience to start writing games, I'm sure he/she will have a better idea on where to start with things like that.

Good luck with the OpenGL =)
Logged
Pages: 1 2 [3] 4