|
Author Topic:   Where to start?
ALPHA
New Member
posted January 26, 2000 02:10 PM            
hate to barge in on yas :p
but I think I need some advice about how to start programming.

Ive asked a few others, and every time theyve said it takes several years of colledge and studies (something that dosent fit my time frame lol)

weve made models/textures/maps for game engins befor, but we dont know enough about engins yet to make the models do what we want them to.(ergo, the model has to be something the games already made to run)

any suggestions on how to start and get decent results?

IP:

Bryan T
Member
posted January 26, 2000 11:51 PM            
ALPHA,

Don't worry about barging in, that's what discussion boards are all about!

As for learning to program, I guarantee it does not take years of college. I learned when I was 12 on my father's 8088 in BASIC. And I have since moved on to other machines (Pentium, SPARC, Macintosh, BeOS, MVS, SCITEX, TI-Calculator Asm, & Palm Pilot to name a few).

I would suggest getting a few programming primer books "C++ Programming Primer" is a good one. Also pick up a big reference book on the language you choose. I have "The C++ Programming Language 2nd Ed." by Mr. Stroustrup himself.

The interplay between learning a language and moving beyond the primer is where the reference book comes in.

After going through the primer, get online and download some code for simple (Tetris, Breakout, etc..) games or utilities (HexEdit, SimpleEdit, FileBuddy, etc.).

These projects have been written and re-written so often by people that their basic skeletons are very robust and can afford you some insight into application writing.

If you have more specific questions (like compilers, etc) just ask!
--Bryan

IP:

ALPHA
New Member
posted January 27, 2000 02:10 PM            
ok, I will, lol

The beginners book im useing right now is "learn C+ in 24 hours"
(been reading for about 2 months :p)

the book unfortunatly, kept leaving me clueless as to why Ive got to write some piece of code in there a special way for chapters at a time.
after getting hung on arrays and pointers again, I had decided to give up and attack the problem from another angle.
(although I will try out some of those books you suggested

the main problem is that me and some online friends got fed up with what was availible from the game market. so weve decided to take things into our own hands and try to make something that we would like to play (sounds simpler than its turning out to be, lol)
The game Idea wasent too hard, and even making models isint seeming to be a problem. The problem is that we cant seem to get any thing in the way of game codeing done.

I tried to dload open source games befor, but the code is just a wee bit over my head
and the compiler(borland C+ 4.2 I think) just coughs up errors when I try to run it

well, Ill give it another go after I get back from the bookstore,
laters

IP:

Tim
Member
posted January 29, 2000 03:21 PM            
Programming isn't something that you can learn overnight.
I taught myself C in a few weeks (though I had previous experience with assembly, basic & pascal), however, I still didn't know how to really *do* anything. Knowing a language like C then actually using it effectively and efficiently takes YEARS. Sorry, but this is how it goes.

I started out with aspirations of writing a MUD as my first project, this all using 'cc' and 'make' on a HP-UX machine at school. Well, it didn't happen. That was '91. In 1995, I shipped my first product, and it was held together with bubblegum and bailing wire. By '97 I had programming credits as part of a team for a 3D modelling/rendering/animation package (Extreme3D by Macromedia, if anyone has heard of it). For the first time (yeah, in 97) I wrote code that I was really proud of, that worked, and other people on the team with many more years of experience deemed 'acceptable'. That's 6 years from the my first C book to shipping code.

Don't expect to read a book and go out and start writing games in a month. Not only do you have to learn C/C++, but the various API's you are writing on top of. Win32, D3D, OpenGL, Aqua, whatever. That'll take another 6 months to a year to understand, and another year to use well. Heck, even stdio.h/strings.h takes a while to learn.
Then there are things like good coding style, writing readable code, working on a team, compiler bugs, revision control, etc.

Finally, when learning C/C++, you have to use it. So get a compiler and start writing stuff, compiling it, watch it in the debugger.
Learn some assembly, that'll help you figure out pointers real quick.

Good luck, accept the fact that things take time, and work at it. You'll get there, jsut don't rush it.

IP:

ALPHA
New Member
posted January 29, 2000 11:48 PM            
Thanks for the advice

I dident expect to learn the full scale in any short period of time. but I was hoping I could mod some open source programs to my needs.
I think my frustration comes from my past experience with gw basic (on a tandy trs-80 and on the early macintosh)

even in basic I dident know much more than how to add numbers, take information, and generate limited text responses. but I was comphertable enough in my little world to go and make up my own variations on each program. and when something was broken, I had no trouble retracing my steps to fix it (well, my longest program to date was only about 100 lines, lol) but the point was, I knew exactly what the commands I had used, did.
with HTML I felt much the same. When some part of a page mysteriously doesnt work, even without a compiler to point out the problem I can read back and understand where it whent wrong (even if it does take me a half hour to do it, lol)

after poking around in my "c+ in 24 hours" book again, I keep feeling like I missed some important step or chapter along the way.

The compiler flags an error, and I break into a panic about trying to figure out where it all whent wrong (not to mention that it dosent seem to even compile open source games I just dloaded, and that one error generates several error flags)
I know its a whole different kettle of fish to what im used to
but it's still a little frustrating to be deprived of knowing how to do things that were easy in basic.
im not giving up that easy though, lol

Hopefully Ill be back in a bit with at least a slightly better understanding of what goes on in a C program.
thanks again

IP:

Bryan T
Member
posted January 30, 2000 01:37 PM            
An interesting asside.. When I first started to learn programming (after LOGO and BASIC), I tried Pascal on the Mac. After reading and reading and trying, it just didn't sink in.

Instead, I found a game called Core Wars. It's a game where you write assembly-like code for a virus program and 'fight' your warrior against other warrior programs in a computer's memory bank. If you write your program better than the other guy, you'll win.

This REALLY got me into programming. All about optimization, pointers, self-modifying code, illegal instructions, assemblers, system-level operations like context switching, processes, and APIs. They even have yearly tournaments for everyone to try their skills at.

There are also King Of The Hill servers where you send your warriors to try to take over the warriors already on the hill.

I know this game is available for every computer that's worth it's weight, so you should have no problem finding a version that works for your machine. Try to get the pMARS compatable versions though, as they use the newest standards.

--Bryan

IP:

ALPHA
New Member
posted January 31, 2000 05:12 PM            
That sounds like its dangerous, tricky, and a good way to blow a motherboard...

IM IN!

Just gotta find a win95/dos version of it, lol

IP:

Vin Lucentai
Member
posted February 02, 2000 05:13 AM         
Well, this sounds sort of abrupt, but ...
Which C compiler is good to start out with? I have SOME experience with Basic but that's as far as I've gone. From reading several introductions to C, I've heard it's a decent language to start out with. Of course, without a compiler, I can't do anything, right?

IP:

Bryan T
Member
posted February 02, 2000 03:30 PM            
Vin,

I'll make the assumption that you are using a Windows based machine. I've had good luck with DJGPP and LCC as compilers. These are free tools you can find off the web.

I liked LCC since it had an IDE (Integrated Development Environment - a pretty graphical front end to enter code with that makes the process smoother). I have heard that DJGPP also has an IDE but have not looked for it in years.

If you have some cash and are serious, just go purchase a copy of Microsoft Visual C++ 6.0 Standard Edition ($99.00 usually). It is the industry standard nowadays for windows programming. The standard edition does not do 'optimized' copilation, but you probably won't need it while learning to program.

The Enterprise Edition of VC++ is like $700.00 and includes a bunch of other junk you won't need.

--Bryan

IP:

henryj
New Member
posted February 15, 2000 04:05 PM            
The best way to learn programming is to write programs, but you've got to start small which is the frustrating thing. The other important thing is don't try to re-invent the wheel. Some one out there will have some code for opening a window in your API of choice (D3D, OpenGL) and an event loop so go find it and use that for starters. There's nothing more frustrating than struggling with the basics and not being able to see something pretty on the screen.

Open source 'projects' aren't that good an area to learn from because they tend to be big projects and every one and there dog has had a hand in it which makes for some confusing code for a beginner.

For a game all you need is some app initialisation code, a full screen drawing context (window) and an event loop. There are heaps of these little frameworks around and they're usually dead easy to understand, well documented and the authors will go out of there way to help you. I presume your on wintel so unfortunately (for you) I can't tell you where to grab some code. I'm a Mac/ unix/ OpenGL programmer. You could try Neon Helium (http://nehe.gamedev.net/) for OpenGL stuff.

Once you've got the base code compiled and running you can concentrate on the pretty pictures. Then after a few months you'll be amazed at how much you've learnt and will probably go back and start hacking you're base code to better suit your purposes.

Henry

IP:

Bwuce Wee
Member
posted March 15, 2000 01:29 AM            
If nobody minds my 2 cents , here I go

I just recently got heavy on C++, I started on Pascal, C, VB, Cobol (YUCK!!!),etc.

My best advice for you to start with - avoid MFC when you are still learning the basics.

It just makes your life incredibly complicated because of all their strange coding conventions and structures.
They use pretty advanced stuff (inefficiently, I might add), and you'll find yourself running around in circles trying to understand it.

I've decided to build up my own library, as I discovered Im good and fast enough now to make it worthwhile ignoring MFC.

Btw, dont try learning from manuals... its hopeless, that was my first mistake in learning to program.
Two words : Circular Definition! (see definition, Circular)

and Good Luck!

Btw, if you need any help at all, you can mail me at
bwucew@yahoo.com

------------------
--------------
Light? I haven't even found the tunnel!!

IP: