Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Which programming language is best for beginners?

Java
C#
C++
Other (Please specify)

Pages: 1 2 3 [4] 5

Author Topic: Learning Programming  (Read 12539 times)

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Learning Programming
« Reply #45 on: October 14, 2011, 10:32:51 am »

Aspen uses Fortran for scripting, so I'm not too surprised it pops up in engineering courses now and then.
Logged

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #46 on: October 14, 2011, 11:42:03 am »

Right, I'll start working through that book! :)

What would be a good first project to aim towards and give me some motivation?
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: Learning Programming
« Reply #47 on: October 14, 2011, 01:11:33 pm »

What would be a good first project to aim towards and give me some motivation?

Well for console window programs a Text Adventure is always good fun. For graphics, the classics like Pong, Space Invaders, Breakout are good starting points ^^

Aspen uses Fortran for scripting, so I'm not too surprised it pops up in engineering courses now and then.

Fortran is often used for high-performance mathematics and for the code for pic chips and the like, so for engineering it's rather useful to know. It also gets a lot of use for physics simulations ran on super computers. For number crunching it is a rather good language.
Logged

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #48 on: October 14, 2011, 01:22:28 pm »

Well for console window programs a Text Adventure is always good fun. For graphics, the classics like Pong, Space Invaders, Breakout are good starting points ^^

Hmm, a text adventure you say.. Well, I know this book covered random generation to a small extent, I might be able to make at least a slightly randomly generated text game, that would be cool! I'm very very heavily into randomly generated content in gaming. :P
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Learning Programming
« Reply #49 on: October 14, 2011, 01:24:16 pm »

Awesome, a new programmer. Can't have enough of those.

I don't want to brag, but I can program in LOTS of programming languages (not counting all these weird but awesome ones on http://www.esolangs.org/), and C++ is by far my favourite, good choice. It can be a bit tedious to write some complex games from rock bottom, but almost everything you write in C++ is reusable, so you only have to write that boring low-level stuff once.

Warning: Never ever use an advanced programming environment to learn programming (it will only frustrate you), just use some simple text editors, preferably with syntax highlighting.

If you want some projects to aim towards, I can recommend games, as they come in all stages of difficulty.
I would recommend that you do the following in this order (brackets denote stuff you'll learn):
  • Paper Scissors Stone (Basics)
  • Tic-Tac-Toe (Loops)
  • Four-in-a-Row (Graphics)
  • Maze game (Random Generation)
  • Chess board (Objects, sprites)
  • Battleships (AI)
  • Breakout (Physics, advanced input handling)
  • Roguelike (Advanced class system, external data)
  • Platformer (State system, entities, collisions)
  • Racing game (3D graphics, multiplayer support)
  • ???
  • Dwarf Fortress (optional)
Have lots of fun.

Spoiler: Rant (click to show/hide)

Edit: Double-ninja'd.
Logged

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #50 on: October 14, 2011, 01:44:51 pm »

Also, he thinks Pascal is great, because it is the only language he was taught.

Oh god, I know that feel, man. The last teacher I had was practically Amish in his fervent denying of all advances in programming beyond the 1980s. Very hard to get along with.

Thank you for your input, though. I'm going for C++, as I already feel semi-comfortable with it, having learned a tiny bit of it in the past. I will most certainly be taking in your suggestions of projects, too. Particularly the maze one, I have a couple of ideas for that just looking at it.
Out of interest, which library do you yourself use for graphics?
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."

Reiina

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #51 on: October 14, 2011, 03:26:47 pm »

Third problem: Our teacher generally doesn't believe that we have learnt anything unless we use it in at least 5 different programs, each of which takes an hour to program (see Second Problem). Also, he thinks Pascal is great, because it is the only language he was taught.

Lol I had a math teacher in middle school that was a pascal fanatic too. A friend and I already knew how to code in assembly/C++(though I'm sure I would cringe if I had still the source codes from back then :p) and spent our times trying to convince him of the superiority of C++ and he would have none of it :p.
Logged

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: Learning Programming
« Reply #52 on: October 14, 2011, 03:33:02 pm »

Re: What to work on for your project.


No matter what it is, make sure you have actual interest in it. Nothing's a bigger motivational killer than working on something you don't care about. If you've no interest in breakout or tetris, don't make a clone of those.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #53 on: October 14, 2011, 03:58:11 pm »

I have Visual Studio 2010 Pro (legitimately free from Dreamspark, if you're a uni/college student check it out.) and it's not recognising "cin" or "cout". It says they're "undefined identifiers". I've included iostream, which is all it takes to work in Dev-C++, so what gives?
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Learning Programming
« Reply #54 on: October 14, 2011, 04:00:08 pm »

Are you sure you are working in c++?

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Learning Programming
« Reply #55 on: October 14, 2011, 04:09:14 pm »

* I adore SNUSP despite never having any cause or desire to do any work with it. Even Brainfuck is more useful, but SNUSP is simply beautiful. From the link, this is a multiplication function;
Spoiler (click to show/hide)
I think this is why I actually enjoyed using LabView, where a simple program/Virtual Instrument looks like this;
Spoiler (click to show/hide)
Damn you, I was planning to do something productive today and instead I wrote a fucking SNUSP interpreter...


Also, holy hell I either made a mistake somewhere or that multiplier is slow as dropping tar. Are < and > used for single steps or to change the direction of movement? Because if I made a mistake their I may've ended up in an infinite loop. I would try to figure out what the Perl implementation here does, but I can't read that for the life of me (to much punctiation, and that comes from someone who just wrote an interpreter in Lisp :P )
« Last Edit: October 14, 2011, 04:17:55 pm by Virex »
Logged

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: Learning Programming
« Reply #56 on: October 14, 2011, 04:10:22 pm »

Don't you need "using namespace std" for cin and cout to work as well?
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #57 on: October 14, 2011, 04:12:01 pm »

Are you sure you are working in c++?

Derp, it's in Visual C++. I'm guessing that doesn't really deal with console stuff? If VS2010 isn't good for console apps, what's a good IDE/compiler that is relatively up to date? All I have at the moment is Dev-C++ and Code::Blocks which wont even load for some reason.
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Learning Programming
« Reply #58 on: October 14, 2011, 04:17:08 pm »

Are you sure your output type is a console application?
There is a process here to follow you know.

Chattox

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #59 on: October 14, 2011, 04:25:53 pm »

DERP. I completely forgot to put in "using namespace std;", totally slipped my mind.

Forgot to take off my +1 raiment of retardedness.
Logged
"10 z levels down, 10 tiles north is some blood, i shall go clean it before it drives me to insanity with it's crimson color"
The setting of Half-Life 2 Episode 3's release: "It is the 41st Millennium. For more than a hundred centuries the Gabe has sat immobile on the..."
Pages: 1 2 3 [4] 5