Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → I want to learn to program...but I can't make myself a goal
12
I want to learn to program...but I can't make myself a goal
2004-05-31, 10:16 AM #1
I want to learn C++. I want to eventually create games. I've always know that, and I have the resources to learn. But I always lack a goal and I go all over the place or convince myself of this or that so that I get nowhere. Can someone help me out here? Maybe a small goal, a program to create? Explain the program then explain what I might need to know if possible.

I ask this because I figure some of you might be experienced programming. This way it would be more like an assignment given to me by a supervisor. I have no idea what I would make myself without knowing how to access windows.

Maybe even just post some cool resources you have found. I have a few, but I might be missing something. Thanks all.
2004-05-31, 10:17 AM #2
Hello World.

------------------
<]-[ellequin> Nothing is quite as satisfying as placing a .177 lead pellet in between the eyes of a cat.
<]-[ellequin> I think I will leave it's corpse there, to warn all the other cats to keep out of my hibiscus patch

Live on, Adam.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-05-31, 10:18 AM #3
better yet...

[This message has been edited by PnHobbit (edited May 31, 2004).]
2004-05-31, 10:19 AM #4
hehe, that's ^^^ a prog to print Hello World on the screen. A good noble start. [http://forums.massassi.net/html/smile.gif]

Pick up a book on starting programming, it'll give you goals to work to.

------------------
If at first you don't succeed, lower your standards.
2004-05-31, 10:19 AM #5
IIRC, when i had a similar feeling while i wanted to learn some sort of editor, i said "Meh" and went to do something else.

------------------
PWoT, NG, EW: The best sites on the net.

-@%
2004-05-31, 10:27 AM #6
Get the Jedi Academy SDK stare at it for about 4-5 months wihtout actually really doing anything, then figure out how to compile and in 6 months you can mod for JA, and thats a step towards coding. Or at least how I started. [http://forums.massassi.net/html/wink.gif]
Free your mind, use Open Source.
2004-05-31, 10:34 AM #7
Back in sec4, I thought the class was too slow and boring so I did a 3D animated Hello World with a bunch of buttons and functions [http://forums.massassi.net/html/wink.gif]

------------------
WAITER: Here’s your green salad, sir.
ANAKIN: What? You fool, I told you NO CROUTONS! Aaaaaaargh!
The music industry is a cruel and shallow money trench where thieves and pimps run free, and good men die like dogs. There's also a negative side.
2004-05-31, 10:36 AM #8
Classy [http://forums.massassi.net/html/smile.gif]

------------------
If at first you don't succeed, lower your standards.
2004-05-31, 10:37 AM #9
I have a book called C++ Primer Plus that is really good. I was going to do the hello world thing for a joke, but it won't compile.
// HelloWorld.cpp -Kirby Style
// This program will display
// "Hello world! jEDIkIRBY sucks!"

#include <iostream>
using namespace std;

int main()
{
cout << "Hello world! jEDIkIRBY sucks!\n";
return 0;
}

I'm going wtf here, the same code worked on the software at school. I ordered my edition of microsoft visual studio from the school. It is the exact same program. I got the thing to run with the above code, but no text shows up.
2004-05-31, 10:40 AM #10
try putting a getch(); before the return 0, and it will wait for a keystroke before terminating the program.

------------------
Have a good one,
Freelancer
"it is time to get a credit card to complete my financial independance" — Tibby, Aug. 2009
2004-05-31, 10:42 AM #11
#include <iostream.H>

maybe that will help....

------------------
Quote:
<font face="Verdana, Arial" size="2">whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it</font>


---Thomas jefferson, Declaration of Independance.
whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it
---Thomas jefferson, Declaration of Independance.
2004-05-31, 10:45 AM #12
cin.get(); does nothing to help the text show

#include <iostream.h>
I get this error:
c:\Programming\Tests\Kirby2\Kirby.cpp(5): fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
2004-05-31, 10:49 AM #13
You're making the program way more confusing than it has to be.

Code:
#include <iostream.h>

int main()
{
  cout << "Hello World!" endl;
  return 0;  
}


------------------
<]-[ellequin> Nothing is quite as satisfying as placing a .177 lead pellet in between the eyes of a cat.
<]-[ellequin> I think I will leave it's corpse there, to warn all the other cats to keep out of my hibiscus patch

Live on, Adam.

[This message has been edited by jEDIkIRBY (edited May 31, 2004).]
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-05-31, 10:50 AM #14
for some reason you don't have the header files but your program is not loading because of exactly what it says, iostream.h does not exist.

------------------
Quote:
<font face="Verdana, Arial" size="2">whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it</font>


---Thomas jefferson, Declaration of Independance.
whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it
---Thomas jefferson, Declaration of Independance.
2004-05-31, 10:54 AM #15
So, do I need to reinstall visual studio or what?
2004-05-31, 10:58 AM #16
no it's probably something simple, like changing a director setting in your properties somewhere

do a little search on your hard drive for iostream.h

if its there then you go it but its jsut goofed up, but if you want a temporary fix until you can figure out what's wrong with the directory setting just add iostream.h to your hello world program folder.

------------------
Quote:
<font face="Verdana, Arial" size="2">whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it</font>


---Thomas jefferson, Declaration of Independance.
whenever any form of government becomes destructive to securing the rights of the governed, it is the right of the people to alter or to abolish it
---Thomas jefferson, Declaration of Independance.
2004-05-31, 10:59 AM #17
Or get an easier to use compiler.

------------------
<]-[ellequin> Nothing is quite as satisfying as placing a .177 lead pellet in between the eyes of a cat.
<]-[ellequin> I think I will leave it's corpse there, to warn all the other cats to keep out of my hibiscus patch

Live on, Adam.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-05-31, 11:06 AM #18
Microsoft Visual Studio is not a good compiler? I was under the impression that it was a professional grade tool, simple enough to use at first and very powerful when you learn the more advanced stuff. I have a legal copy so why not use it? I'll reinstall, I have no iostream.h file. I might have done a custom install or something silly and screwed it up.
2004-05-31, 11:56 AM #19
if you have a computer teacher at your school they might have some helpful books for you! thats what i did, and i got a great book, programming for dummies or something like that.

------------------
I Recieved an angel from god when he sent me Jess, I Love You Forever and Always Jess, you'll always have my heart.
I <3 Massassi
2004-05-31, 12:15 PM #20
Here's a coding project you can do.

Solve: P = NP

God I'm sadistic. [http://forums.massassi.net/html/tongue.gif]

------------------
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Code to the left of him, code to the right of him, code in front of him compil'd and thundered. Programm'd at with shot and $SHELL. Boldly he typed and well. Into the jaws of C. Into the mouth of PERL. Debug'd the 0x258.
2004-05-31, 12:28 PM #21
All right now! It works!
http://home.comcast.net/~grsardou/Works.jpg

My friend sent me a link to:
http://www.bloodshed.net/

I downloaded dev-c++

I am so on my way. I shall now start C++ Primer Plus again. Relevant topics with projects are welcome.
2004-05-31, 1:13 PM #22
Just for the fun of it, I wrote the Java equivalent of your code. [http://forums.massassi.net/html/smile.gif] [http://forums.massassi.net/html/rolleyes.gif]
Code:
/* The "HelloWorld" class.
 *
 * This is the equivalent of PnHobbit's C++ code
 * This class will display:
 * "Hello world! jEDIkIRBY sucks!"
 */
import java.awt.*;

public class HelloWorld
{
    public static void main (String[] args)
    {
        System.out.print ("Hello World! jEDIkIRBY sucks!" + '\n');
    } // main method
} // HelloWorld class

For ideas, I suggest maybe Pong or Hangman. If you're good enough, Tetris or Asteroids, or a card game of some sort.

------------------
for(i = 0; i < 00; i = i + 1) Print("massassi is good");
PrintInt(i); //print the integer value of infinity
May the mass times acceleration be with you.
2004-05-31, 3:23 PM #23
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Flexor:
Back in sec4, I thought the class was too slow and boring so I did a 3D animated Hello World with a bunch of buttons and functions [http://forums.massassi.net/html/wink.gif]

</font>


I so did my hello world program by writing out "Hello World" with option buttons, and then making them flash on and off every half a second.

It dominated everything.

------------------
[16:38] Correction: dick tracy was a real man
[16:38] happydud: Actually...
[16:38] happydud: He wasn't. :D

[19:08] Dormouse: hi, my name's happydud and i'm passive-aggress.. SHUTUP!! *stabs nearby orphan*
[You have gained 3 Dark Side Points]
My Parkour blog
My Twitter. Follow me!
2004-05-31, 3:51 PM #24
Quote:
<font face="Verdana, Arial" size="2">I want to learn to program...but I can't make myself a goal</font>


You have ADD. Give up on programming forever, realizing that making games is a far cry from playing them.

------------------
Flibbledy-dibbledy! Nyaaaaaaaahhh!

-The Last True Evil
COUCHMAN IS BACK BABY
2004-05-31, 4:36 PM #25
You have a mental disorder. Your college field of study was not psychology. Give up forum advice forever.
2004-05-31, 4:43 PM #26
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Tracer:
You have ADD. Give up on programming forever, realizing that making games is a far cry from playing them.

</font>


Heh. "Far Cry"

------------------
Snail racing: (500 posts per line)

-------@%

The Massassi JO/JA Single Player contest info
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2004-05-31, 5:07 PM #27
I haven't gone to college yet.

------------------
Flibbledy-dibbledy! Nyaaaaaaaahhh!

-The Last True Evil
COUCHMAN IS BACK BABY
2004-05-31, 5:21 PM #28
My point stands. I can make a text based adventure now with if statements and loops. Text games are still games. No idea why you gotta be so negative.
2004-05-31, 6:53 PM #29
You can include stdlib.h and throw in a system("PAUSE"); there right before return 0;. That will give you a nice Press Any Key To Continue... like this:

Code:
// Simple C++ Program
// Hello World

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
  cout << "Hello World!\n";
  system("PAUSE");
  return 0;
}


hope the best for you and your programming... I started programming C++ about 10 months back and now I'm on to Win32 and OpenGL so if you stick with it, it wont take long to get where you want to go (as far as programming goes). btw... Dev-C++ is awesome [http://forums.massassi.net/html/smile.gif]

As far as <iostream> and <iostream.h>.. On older versions of compilers, you have to use iostream.h, but on new versions of compilers, you have to use iostream... its just the new C++ standard template library.. its like that for <vector> and <string> and <ctime> and lots of others... and then you have to put using namespace std; or you wont be able to use any of the commands.

------------------
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"
-Michael Kyle

MAK Studios 3D

[This message has been edited by MysteriousSith (edited May 31, 2004).]
2004-05-31, 8:09 PM #30
Go to the book store and get "Tricks of the Windows Game Programming Gurus" for a nice look into C programming for games. It covers all the basics to create nice 2d games like mario or somethin [http://forums.massassi.net/html/smile.gif]

------------------
EvilMagic.net: Brian's Web Log
2004-06-01, 1:12 AM #31
Heh, I took a class in Basic C++ in college last year during winter session. The funny thing is, I don't remember a damn thing. [http://forums.massassi.net/html/biggrin.gif]

...anyway, C++'s syntax is quite common in other languages like Javascript and Flash's action script. Even JK's cogscript is very similar to those languages (except it doesn't have arrays... those sobs and LucasArts!!)

-- SavageX

------------------
"...and if you don't like that, then you need to be slugged in the face repeatedly, until my hands are soaked in blood. Have a nice day!"
http://www.savagex.net
The cake is a lie... THE CAKE IS A LIE!!!!!
2004-06-01, 3:17 AM #32
Well you all knew this was coming (it was just a matter of time until I saw the topic... [http://forums.massassi.net/html/wink.gif]):

Use. Java. [http://forums.massassi.net/html/biggrin.gif]

Platform independent, the language is still having new libraries added to it, meaningful compiler errors (rather than C/C++ "bomb-outs and not tell you why" approach [http://forums.massassi.net/html/wink.gif]), useful web-based approach and security implementations (either via applets and/or full applications) and to top it off, Sun Microsystems actually take note of user feedback and implement new additions to the language - the last beta release (Java 1.5.x release, codenamed "Tiger" before it's launch) reflects this, as does the new Java IO (NIO) classes as released in Java 1.4 - all useful additions [http://forums.massassi.net/html/biggrin.gif]

Oh - and another reason to learn Java: well just because it isn't C# (barbaric cross-breeding hybrid of a language...) [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

And he's finally off the starting grid --> Zooooom -@%
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-06-01, 3:35 AM #33
Depending on the final year project I'm dealt out at uni, I'm going to have to teach myself either java, C++ or fortran. Yummy.

I already taught myself some basic C with the aid of a book - "C for dummies" so I should be ok.

------------------
If at first you don't succeed, lower your standards.
2004-06-01, 3:39 AM #34
My CS professor at Mizzou has ruined Java for me for forever. I can't stand it anymore. I'm in the process of learning Python and Perl, and these languages look much more promising. Python is constantly being developed and updated. Plus, the community is very strong and the developers listen. And Python integrates with Blender for easier game creation. [http://forums.massassi.net/html/biggrin.gif]

------------------
Our very existence is at stake

Yay! I can finally join the snail-racing crew.

-@%
Marsz, marsz, Dąbrowski,
Z ziemi włoskiej do Polski,
Za twoim przewodem
Złączym się z narodem.
2004-06-01, 4:42 AM #35
Python > *

------------------
<]-[ellequin> Nothing is quite as satisfying as placing a .177 lead pellet in between the eyes of a cat.
<]-[ellequin> I think I will leave it's corpse there, to warn all the other cats to keep out of my hibiscus patch

Live on, Adam.

[This message has been edited by jEDIkIRBY (edited June 01, 2004).]
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-06-01, 5:10 AM #36
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Gandalf1120:
Here's a coding project you can do.

Solve: P = NP

God I'm sadistic. [http://forums.massassi.net/html/tongue.gif]

</font>


I solved that, and then my brother deleted the code. Oh well, I guess I'll never be able to reconstruct it.
2004-06-01, 5:17 AM #37
N = 1

------------------
"I'd rather be hated for who I am rather than loved for who I pretend to be." -Janis Joplin
2004-06-01, 5:54 AM #38
Don't forget that P can also be zero. I've hear d nothing but good things about "Tricks of the game programming gurus" but I have already bought so many books that I think I will hold off. I'm going to keep going through C++ Primer Plus, then I will go to windows using web resources. I have a bunch bookmarked:
http://ultimategameprogramming.com/
http://www.ibiblio.org/obp/thinkCS/cpp/english/
http://nehe.gamedev.net/
http://www.gametutorials.com/
http://gamedev.net/
http://flipcode.com/
http://drunkenhyena.com/
http://cprogramming.com/
http://cone3d.gamedev.net/cgi-bin/index.pl
http://www.cpp-home.com/

I figure those should help me out enough to start game programming. If I am aware then I think the gamedev.net forums also have a walkthrough of someone who built tetris step by step for forumers. So I should be set for learning OpenGL, windows, whatever. Book suggestions are good too though, I'll write em down.
2004-06-01, 7:11 AM #39
Learn Perl as your first language!

[http://forums.massassi.net/html/tongue.gif]

------------------
"If I had a dollar for every time I had sixty cents, I would be Canada."
"Should slice indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration."
--@%
Ban Jin!
Nobody really needs work when you have awesome. - xhuxus
2004-06-01, 8:36 AM #40
Perl nor Python nor Java will help with real game programming. Actually this book I'm reading now about programming MMORPGs uses some Python on the server side.

------------------
EvilMagic.net: Brian's Web Log
12

↑ Up to the top!