View Full Version : C programming
80sSmurf 5-07-02, 02:15 PM I'm expecting looooong replies on this one from Shakey, Wavey & Aaron (once again I spelled it right :D )
I'd like to learn how to program, and I'm starting from scratch ... All I know is a little about variables and Javascript ...Not much to start with I know, but everything has to start at some point.
I'm not extremely good with numbers (I do know how to subtract, multiply and add :p), and I'm too stingy to take a course (they are like $3-500 for 2-5 days), so I was thinking I could learn from books and the net.
I was thinking I would like to learn C. Seems like I can do some good stuff with this and it might not be as hard to learn on your own as many other languages ... Or maybe Visual basic is a better place to start ???
I know I need an assembler and a compiler. Which can you recommend, and are there any other software I would need ????
edit
Completely forgot....
Anything you guys can recommend will be greatly appreciated, be it books (english only), websites, software, hints & tips
That's great Smurfy. What kind of stuff do you want to programme? Websites? Enterprise applications?
80sSmurf 5-07-02, 03:37 PM Well I've been fiddling a lot with emulators this past year, it's very fun indeed, so I was thinking of making a NES or GameBoy emulator ... There's lot of info and tech on these on the net, so I think that would make a great learning experience.
Where I go from there I really don't know ... I was thinking about making a flash game or 2 (tho' that means learning actionscripting). Websites might be a interesting area too. I can do some pretty great stuff with a WYSIWYG, HTML and javascripts ...Altho the javascript part mainly cocnsists of me downloading a script and tweaking it a little...
All in all I just want to broaden my horizon, and see if I have what it takes to learn to program :)
I can give you all the detail you need, but I'm at work right now and don't have a lot of time to write. Like you said, a reply will be very long and involved.
I will reply a little later today. Stick around.
80sSmurf 5-07-02, 05:08 PM Thanx Aaron :thumb: I'm looking forward to that, just don't hope this evolves into some sort of sensei/pupil relationship ;) :lol:
Later today for you, will mean middle of the night for me, and since we're having some old friends over for dinner and a flik tomorrow I'm not likely to see your reply untill thursday ... Again any help will be greatly appreciated, thanx :p
*EDIT*
Originally posted by aaronw
I can give you all the detail you need ...
Oh boy am I gonna keep ya busy for a loooooooooooooooong time :D
Hey just be thankful I don't start by throwing a bunch of source code out.
I actually read a C book YEARS ago (before I really knew the language), and in less than 10 pages, the author already put a full page of source code asking you to pick it apart.
How the hell will that help out??
Ok lets start C programming 101: Can you tell me what this program does:
#include <stdio.h>
char ch;
int i;
void main()
{
FILE *fp;
fp = fopen("filename.txt", rt);
while(!feof(fp)) {
if(ch = fgetc(fp) < 127)
putch(ch);
}
return 0;
}
I'm not going to guarantee that will immediately compile, since I typed it out of memory, but the deal is, his FIRST example without giving any detail was about like that...
What an idiot author.
Anyway, more to come...
Yeah. I have seen those books. Definitely not written with a newcomer in mind. Although! Reading is most certainly one of the best ways to learn (barring a professionally taught course).
I know that there are "C++ for Dummies" books. You may want to check those out. While they don't necessarily go into great depths, they are a good way to become familiar with subjects. I own several of them, as well as the "Sams - Teach Yourself" series.
Also, try out this site - Programmer's Heaven (http://www.programmersheaven.com/). They have tutorials as well as a fairly decent downloads area.
Hope this has helped.
Originally posted by 80sSmurf
Well I've been fiddling a lot with emulators this past year, it's very fun indeed, so I was thinking of making a NES or GameBoy emulator ... There's lot of info and tech on these on the net, so I think that would make a great learning experience.
Then C is probably your best bet Smurf. Not my specialty so I'll leave it to Aaron and Shakey :) But yeah, it is a nuts and bolts language so well suited to building things from the ground up.
The only programming that jiggles my gigglies :) is data access. I really get a kick out of hooking into databases (It's a sicko thing. No explanation for it). I love the idea of being able to do it for nothing too. There are some Open Source projects out there that are just fascinating. There are limitations to the tools available but they are improving constantly. You'd be amazed what you can do using Python as a language in conjunction with MySQL or PostreSQL and a little PHP. And it's all free. Yippeeeee!
sketcher 5-08-02, 09:37 AM 80sSmurf, I work with Flash and I can tell you that I've never been able to grasp Java and C++ (and javascript). But, I picked up actionscript like a fish to water. Actionscript is basically a clone of Javascript which is a clone of Java which a clone of C! Maybe what you can do is learn Flash first then C ;)
Nowadays, there's C Sharp.
I'm babbling. Anyway, I was told to learn Visual Basic as a first language. I almost did but then I got into Flash.
I hope I helped somewhat! If you have any questions with Flash, let me know!
80sSmurf 5-08-02, 10:45 AM Thanx to the lot of you :thumb: I'm sure that with your help I should be able to learn something ... I believe in John Dewey's Lern by doing theory, so I wanna get my hands dirty as soon as possible :D
A quick Q ... Which compiler and which assembler should I use ????
I'm asking this, coz it might be a good idea to use what some of you guys use, that should make it easier to help me out, when I get stuck (which is inevitable) :p
Programmer's heaven is now added to my faves, thanx for that link Shakey :) And C++ for Dummies might be a good place to start, just to get a grip of the basics (after all everybody crawls before they walk) .... Never seen the Sam's books you mentioned Shakey, I'll take a trip round Amazon soon.
As for Aaron's li'l slice of source .... Yipe that was greek to me, no comments or anything ... But you seem to know what you're talking about, so consider yourself stuck with a new Padawan learner :lol:
Sketcher thanx, but for now I'll stick to C, if I eventually learn it (I still don't know if I have the abilities or not :D ) I might be interested in moving into new areas of programming
Ahhh it's a good thing I have the next four days off from work, should give me some time to get the basics down :D
Thanx again everybody keep it coming
Ok Smurfie... I had a short reply typed in notepad, but I decided to forfeit and start over.
Starting to program is definitely an involved topic. You won't learn to program overnight. You will spend YEARS doing this. I first picked up a language back around 1985. Myself and my brother tried to write a simple bulletin board using BASIC. Oddly enough, it worked, just not real well. It answered the modem via BIOS interrupts and sent/received characters. That was about it. Not bad though for only being about 12 or so.
First and foremost, you will need to decide if this is right for you. I took an intro to programming as a single course last year (I was given bad advice by a counselor, so I showed the programming teacher about 6 pages of C source code, just a simple address book that I really never finished and he waived the class), and one thing the teacher said, which I totally agree with, programming is NOT for everybody.
There were roughly 20 people in the class. I got it waived so I don't know how many continued, but my guess, based on averages, is that no more than 1/4 stayed with it.
Programming is VERY rewarding. How often do you find any software that works EXACTLY how you want it to? Have you ever used a word processor, database, html editor, you name it, that had every function you needed? I know I never have.
The beauty of writing your own software is that it works how YOU want it to. The downside is that it takes a lot of time.
As a prime example, I wrote a simple little color picker. It popped up a box with the 16 basic DOS colors and had a light bar to scroll up and down, then you hit enter and it told what color you picked. Nothing award winning, but it was something I needed.
Just a program that simple, a box with 16 colors in DOS with a light bar took me about 3 pages of source code. To get even a minimum do nothing program can take 2 or 3 pages of code.
The nice thing is that you learn how the computer works. Lines like this used to be super cryptic to me:
if(function_call == NULL && var[x]-1 == 'x') then { perform_this_function() }
Once you have mastered the basics, its looks like english.
Now don't get me wrong, you won't be able to write your own 3D engine or anything kick ass right off the bat. The biggest mistake that newcomers make is thinking "ok I've never written a single line of code in my life, I can't even write my name on the screen, but I want to write a quake clone!"
That's like not knowing how to change your oil, but wanting to rebuild a diesel engine. Not going to happen.
I'm sure you are aware of John Carmack, programmer of Doom, Quake, and MANY others. Read some of his early interviews. He started off on an Apple and writing application software. His earliest games were side scrollers.
These guys that write massive games have YEARS of programming experience. John Carmack is only about 3 years older than me, but he started programming at a younger age and does it daily. I don't.
So start off small. Write the simple things. When you think you understand the language, write small programs that really don't have a big purpose. Here are some examples of the early programs I use to write:
1. Ask for your first and last name, then print it to the screen as last name first name.
2. Get a line of input and print it backwards.
3. Display a simple 1,2,3 menu on the screen and ask for input.
4. Write a very simple calculator. Like "enter first number:, enter second number:, *, /, -, +:".
5. Understanding loops. Use a loop to fill the entire screen with a random character or word.
6. Write a simple random number generator
7. Try a tic taco toe game.
8. Try to write a guess the number game.
9. Write a blackjack game (its more involved than you might think)
10. Give a shot at arrays, like filling one in, then displaying what each array element contains
11. Work with strings as much as possible.
To an accomplished programmer this looks very easy, but for someone with NO experience, even #1 can be different.
So the point is to start off with SMALL things. There is no shame in writing something that has already been done 1000 times. In fact, on a C message board I found a few months ago, many guys were writing text adventures!!! I haven't seen those written mainstream since the mid-80's. But hey... we all start somewhere!
As for which language to use, that depends on you. I can tell you that you will want to use a modern language. The two most popular will be C/C++ and Visual Basic.
I don't recommend using anything else. Turbo Pascal is very english like, but long since discontinued from Borland. They still write Delphi, which looks like TP, but I don't know anybody who uses it and its really not all that popular.
You need to decide which platform you will write for. DOS, Windows, Unix, or what?
I recommend starting with DOS. Using DOS is very easy and doesn't require 95% of the overhead Windows programming does. You don't have to stay with DOS, but as a starting point, it is much easier.
Pick a platform and go from there. As for a compiler, there are many free and trial versions available. Borland has older versions of Turbo C++ available. Excellent starting point. I believe Microsoft has trial versions of Visual C++ for download, but I can't say for sure. I have no idea if they have trials of Visual Basic.
I have only ever used VB once for about 10 minutes. Personally I don't like it and will never use it again.
I skipped over assembly language because if I lost you with my other code snippet, you will be VERY lost with assembly language. If you aren't sure what code and data segments are, instruction pointers, registers, jump commands, and so forth, you will be EXTREMELY lost. I can program in some assembly, but nowhere near as good as C.
Don't get me wrong. Assembly kicks ass. It is FAST and makes SUPER small executables, but the learning curve is at least 3 times that of a high level language. I have only known 1 full blown assembly programmer in my life. But the sweet thing about some language, C/C++ being one of them, is you can use INLINE assembly language. In other words, you can do something like this:
function()
{
do this;
and this;
asm {
mov ax, bx;
inc ax;
jne ax, 5;
}
So if down the road you want to sprinkle in some assembly language without withing your own assembly objects, you can just add it inline. Not all compilers support this though.
My recommendation is to try either C/C++ or VB. Of course you can use whatever you want.
There are many free C compilers out there. Visual C++ is not the only one. Besides Borland, DJGPP also has a free compiler, and I've tried out at least 2 others, but I forget their name. Just punch in "free c compiler" into google.
Look over some source code on the web. Whichever language seems to be easier for you, give it a shot.
I DON'T recommend going to college to learn programming. Here's why: back in 1994 I was thinking about going to Western Business College to learn C. I had not picked up the language yet. I talked to the counselor and got a good impression. Then came the cost. $12,000 for 1 1/2 years!!!
I said to hell with that. In early 1996 I started buying books to learn C. Within 6 months I had learned C and could pick apart about 98% of the source code I read. Last year I find that old course outline and looked it over again. It was NOT worth $12,000, no way in hell. In fact, my $25 Teach Yourself C book taught me at least 75% of what that course would have.
Books are an excellent way to learn. I have over 1000 various hardware and programming books.
Once you have found the language you want to use, then found a good and basic compiler, get cracking away at writing code! Don't just read a book and try to memorize. You will never learn to program if you don't practice. That is a MUST.
Write the standard hello world that everyone does. Throw some twists in.
Practice, practice, practice. Don't bite off more than you can chew. So your first big program is a simple tic tac toe game? So what. There is not a master programmer on the planet earth who started off big. In fact, I have read interviews with MANY, MANY programmers who did huge projects like 3D engines, flight simulators, and other HUGE applications. All of them had at least 10 years experience, while some had 20!
That doesn't mean it will take you that long, but my point is, you will not be programming for 6 months and write another Doom. That just doesn't happen.
Practice programming daily. Write even little things. When I haven't programmed in a while, I write simple things. An address book, a small database, I write ascii games (still love them), or something to take a string and put it backwards, or an something to convert your lower case to upper case on the fly.
While these might seem old school, even programs written today have these things in them.
As for compilers, check out Borlands web site, DJ Delorie (DJGPP, even though I don't use it nor like it, many people do), and Microsoft for trial versions.
That is, if you want to have legitimate copies. :D
Spend at least a month learning the language. Pick up several books at your local library before buing any. Make damn sure the books you get are what you want.
When I started learning C, I went to the library and checked out nearly a dozen books. They ALL sucked. I was just about to give up learning it when I found "Teach Yourself C" by Herb Schildt. It is by FAR the best book I have ever found. He gives you LOTS of examples, tests you at the end of each chapter, and puts the FULL source code in the back of his books.
Remember that programming is a very daunting AND rewarding task. You have full control over your machine, it does what you tell it to do, and the only limit is what you are capable of.
But also remember, there is a LOT of work involved. Even the simpliest programs that seem to do nothing often require several pages of source code. I have spent nearly an hour writing something that reads strings and picks out the upper and lower case letters and numbers.
I read an interview with Charles Petzold who wrote Programming Windows (he is a killer Windows programmer) and he even said to beginning programmers that there is no shame in writing another calculator. I totally agree with that.
Does this help steer you in the right direction?
Roemello 5-08-02, 01:32 PM Originally posted by aaronw
First and foremost, you will need to decide if this is right for you. I took an intro to programming as a single course last year (I was given bad advice by a counselor, so I showed the programming teacher about 6 pages of C source code, just a simple address book that I really never finished and he waived the class), and one thing the teacher said, which I totally agree with, programming is NOT for everybody.
There were roughly 20 people in the class. I got it waived so I don't know how many continued, but my guess, based on averages, is that no more than 1/4 stayed with it.
Man, do you ever got that right. My first major was Computer Science...took a Pascal I class...barely passed with a C-. Took a Pascal II class and failed miserably....couldn't do one thing in that class at all and ended up waiving the grade off my record (thankfully). I think that class I was in started with about 15 people and I think only 2 or 3 passed...:eek: Definitely not for everyone....certainly not me...
<----total programming idiot :lol:
How true that is Roemello. I'm not a master programmer by any means, but I can write most things I need. MOST people will never succeed at it. Not because they are stupid, but it is very demanding and the majority of beginners burn out.
I knew a guy back in 89 that we both did some Turbo Pascal (he was WAY better than me), and about 6-7 years ago he finally burned out programming and went to work at a pharamacy.
Two of my other friends tried to pick up C. One took it at college and bought Turbo C++ 3.0 (which he later sold to me), but he got lost and finally dumped it. The other tried to learn it about 2 years ago. I loaned him 2 books and my compiler. He gave up after 2 weeks.
The thing that surprised me is that we both wrote Turbo Pascal demos for his high school computer class. We made ANSI screens in Thedraw (this was around 1990) and made an EXE file which did a slideshow. My point is that he was really into programming way back then, but he finally burned out on it.
But as we both say, its not for everybody. That doesn't mean people are stupid for not lasting, its just hard and demanding.
You don't have to be good in math (god knows I'm not), know what every part of the computer is from L2 cache to interrupts to the drive change line signal, but you do need patience (and lots of beer) and have a good amount of hands on computer use.
I'm really glad I gave up Turbo Pascal. I always heard that C so much harder, but it isn't. In fact, I find C is every bit as easy. Just the syntax is different. On top of that, Borland discontinued Turbo Pascal in 1992. C compilers are still written today.
The last programming class I took was my junior year. The teacher totally pissed me off. I didn't understand his style, but I could use Pascal pretty good. Because I didn't use HIS style that made NO sense to me, he failed me. Prick.
I learned C pretty much on my own. I only wish I would have picked it up years earlier.
Roemello 5-08-02, 02:00 PM Originally posted by aaronw
The last programming class I took was my junior year. The teacher totally pissed me off. I didn't understand his style, but I could use Pascal pretty good. Because I didn't use HIS style that made NO sense to me, he failed me. Prick.
Yeah, I had a pretty shitty teacher for that Pascal II class...I mean the first day he expected us to know how to do shit we didn't even learn in Pascal I :rolleyes: No lecture, no actual teaching....he just sat is front of the comps and says 'here, make a program that does so and so using this and that' (I don't remember what the heck it was....took it in '97 :p ).
Strangely enough, I do understand HTML, javascript, css and DHTML to a good extent....even learning a lot of PHP from working with this forum :verycool: But straight up programming.....I just don't really got the mind for it.
sketcher 5-08-02, 03:55 PM I can't program my way out of a paper bag but I can sure as hell script it in HTML! :) Java, which is supposed to be the easiest thing since slice bread was the most dififcult for me to learn. And never grasped :(
Thank goodness for Flash! It makes learning actionscript as easy as...well, slice bread! :)
I used to play around with Basic when I was in grade 4 but all I could do was print and input. But I made neato text-based games though:p
80sSmurf 5-08-02, 06:22 PM Ha ha ha another nice long rant from Aaron :lol: Don't get me wrong, it's appreciated :p
I know that learning how to program will take time, and I'm not looking to make the next Quake 3 clone ... After all a good game these days involves around 70-100 people workingh hard for 1-2 years on a budget only slightly smaller than that of a Hollywood production .... So don't worry, I'm not expecting to become the greatest progarmmer of all time within 6 months (12 months that's another story ;) ) .... Seriously, I'm doing this coz I've fiddled a lot with several emus, and that got me curious. Can I learn how to program ??? To what extend will my abilities (if any) go ??? Could I make an emu ??? Stuff like that!
This is something I do for me, to see if I can and nothing else .... I've chosen C coz it seems like a fairly easy language to learn/get into and once you know it, you can write pretty much anything you want (within the limits of you abilities of coz).
As for a timeframe; well I'm not turning 40 (which is mydeadline for now for when I want to be able to program) untill 2013, so that gives me a li'l time.
What I'm looking for here ??? Help WHEN I run into trouble or problems ... Yes I'm aware that there are programming messageboards, but I'm likely to get flooded with all sorts of well meaning replies when asking a Q there ... In here I'll get the advise from a few members (who BTW know my way of posting and is therefor not as likely to misunderstand me).
Lastly; Aaron empty your in box, I'm in a spamming kinda mood ;) :D Don't worry, I just have a li'l PM for ya :p
Originally posted by 80sSmurf
I know that learning how to program will take time, and I'm not looking to make the next Quake 3 clone ...
Interestingly enough, there are some new programming tools out there aimed at the new programmer, wanting to explore game coding.
There is Blitz Basic (http://www.blitzbasic.com/) and Dark Basic (http://www.darkbasic.co.uk/). Keep in mind that I have never used these, just read about them. So... If you give them a shot and they aren't all they're cracked up to be, blame the reviewers and not me. :p
80sSmurf 5-09-02, 06:35 AM No way Shakey! From this point on I'm holding you responsible for all my computing and programming errors .... Ahh what the heck, every li'l fluck up I do from now on is your fault ;) :lol:
Thanx for the links Shakey, I think I'll stay clear of them for now. 1st things 1st and that is learning C ... I'll just end up stretching myself over too many areas .... And when I finally make a working emulator (shouldn't take more than a few weeks ;) :D) we'll see where I go from there ... For now I'm still at:
10 Print "Smurf's the posting king"
20 goto 10
run
:lol: Oh me loves C64 basic :p
I should know bwtter than to have read this! I am totally confused now! :rolleyes: LOL
Originally posted by 80sSmurf
I know that learning how to program will take time, and I'm not looking to make the next Quake 3 clone ... After all a good game these days involves around 70-100 people workingh hard for 1-2 years on a budget only slightly smaller than that of a Hollywood production .... So don't worry, I'm not expecting to become the greatest progarmmer of all time within 6 months (12 months that's another story ;) ) .... Seriously, I'm doing this coz I've fiddled a lot with several emus, and that got me curious. Can I learn how to program ??? To what extend will my abilities (if any) go ??? Could I make an emu ??? Stuff like that!
What I'm looking for here ??? Help WHEN I run into trouble or problems ... Yes I'm aware that there are programming messageboards, but I'm likely to get flooded with all sorts of well meaning replies when asking a Q there ... In here I'll get the advise from a few members (who BTW know my way of posting and is therefor not as likely to misunderstand me).
A large scale game isn't necessary dozens of people writing it. Let's take a few examples here:
1. The quake series was only WRITTEN by a few people. John Carmack is the lead programmer and always has been. The first Quake game was programmed by 3 people I believe. The second and third were about the same, maybe a few more were added. There are also artists, musicians, and more.
2. Unreal was put together by a total of about a dozen or so people. There were about 5 programmers. I believe there were more artists than programmers, but I could be wrong. I haven't looked at the credits in ages.
3. No One Lives Forever was written by a team of a few dozen.
4. Fly II (a good flight simulator I have) had a programming team (not artists or anything else) of about 10.
I have seen games where they list DOZENS upon DOZENS of people who were involved, but usually these are the programmers, artists, musicians, level designers, QA, testing, R&D, game designers, and much more. My flying game has about 3 PAGES of testers. I've NEVER seen so many.
As for time frame, not necessarily 1-2 years. All of this really depends on the game, how large scale it is, and how many people are working on it. Each Quake game took about 1 to 1 1/2 years, Unreal took a total of 4 years to write, but James Schmalz who invented the game admitted that the first year it was just him, the second year or so was him and one other person, and the final 2 years was the full team.
Unreal 2 has been in development for well over a year now. I originally heard of it in LATE 98, and it is supposed to be released this year. It's a HUGE project.
But that doesn't mean everything is. I remember back in the days of early computing most games never had more than 2 programmers. Games weren't done on a $150,000 budget, it was just one or two poor programmers working out of their basement trying to make some games.
Before you can become a good programmer, there are several things you need to do. Obviously you need to pick a language and get a compiler.
Start programming immediately. Get some books, get a bunch of source code, go to www.cprogramming.com and read over their message board. You would be surprised how much you can pick up from other programmers.
Write some really basic things. Try your hand at string manipulation, replacing characters in a string, write a simple menu, make a bunch of loops.
As you learn more and more, you might want to try file I/O, pull down menus, pop up windows, programming the mouse, accessing ports on the computer, interrupts, and more.
I would spend enough time learning the language that you can pick up someone elses source code and pick it apart. If you read it like english, you are in good shape. That alone probably took me 6 months to really be able to pick C apart.
For your first projects, don't aim too high. Nothing complex. Write simple and small. Calculators, memory allocation, strings, arrays, structures, address books, small databases (like 5 or 10 entries), that sort of thing. Don't bite off more than you can chew.
I recall some idiot kid in a newsgroup about 5-6 years ago who said something to the effect of "I have never programmed in my life, but I want to write a DOOM game!".
Ok sure. How about this as well. You have never driven a car, but why don't you fly a commercial airliner. It's about that severe.
John Carmack was about 21 when he wrote Wolfenstein and around 23 when he did Doom. He had also been programming for more than 10 years at that time.
I see many new programmers feeling overwhelmed. They see all this huge software and want to complete. Those people who wrote those large scale applications didn't start out that way. They were just like you, learning how to print hello world on the screen and went from there.
If you really study hard, get lotsa books, read source code, lurk over some message boards, and practice many times a week (preferably daily), you could be really good in less than a year.
Don't push yourself too hard, but eventually one day you will realize that you know how to program.
It's not that people are stupid and can't learn it, you just need a lot of patience. There are always 20 ways to do the same thing. Take your time and learn the language. Learn program flow, structuring, and keywords. Take someone elses code and pick it apart, rewrite parts of it. Understand how it works.
You won't always be able to do this, but do the best you can.
If your ultimate goal is to write some sort of an emulator, thats a lot to think about. I have no idea how those guys get the video game ROMS or how they did the code. Never really asked.
If the project goes into uncharted territory, just start asking around. Ask on message boards. Someone will know.
My best advice is to start out small. If your first project is to write a 3D game, you are going to be overwhelmed and say screw it. Write SIMPLE. Even a breakout game is complicated! I started to write a pong game YEARS ago, but I quit because I hate pong.
The best things to do when using a public message board to get assistance is not to ask anybody to write it for you, and post the source code you already have. People will help.
I remember one of the first prank utilities I ever wrote was a fake format utility back in junior high. We had a few IBM compatible machines. I wrote a simple little program in Turbo Pascal that acted like it was formatting your disk.
Basically, it opened a file and wrote characters to it, then put the ..... on the screen like the old DOS format command USED to do back in the dark ages.
All it did was wrote a character to a file, but my god, when I ran that on some peoples machines they FREAKED OUT!
Good cheap laughs at their expense! I've known people who wrote keyboard remappers. You can do that with ANSI commands though. They hit F3 and FORMAT C: comes up!
80sSmurf 5-09-02, 05:58 PM Originally posted by aaron
... But that doesn't mean everything is. I remember back in the days of early computing most games never had more than 2 programmers. Games weren't done on a $150,000 budget, it was just one or two poor programmers working out of their basement trying to make some games.
That was my thought excatly when I wrote that ... I remember 1985 when 2 friends could make a C64 game in less than a week (eg. Tiger Mission).
If your ultimate goal is to write some sort of an emulator, thats a lot to think about. I have no idea how those guys get the video game ROMS or how they did the code. Never really asked.
I wanna write an emulator coz supposedly it's a good learning experience ... Even if it's something I won't be able to do for a looooooooooooooong time, it's still a good thing to have a goal to aim for.
As for dumping a rom ... You simply connect the arcade cpuboard or game cartdridge to a computer via some specialized electronic tools and start dumping. Then you work/convert the rom ... Much like working with soundfiles, and you have your rom image ... "all you have to do then is write an emu that can run the sucker :D
As for source codes for emulators, there're plenty to find. A good example would be Mupen64 (a N64 emu for Linux) that's open source. Some authors make some of their source open, thus allowing others to write plug ins for it
Thanx yet again Aaron ... I can't wait to go book hunting tomorrow :D
I think the first small time game I played that I really liked was an OLD CGA game called Astrotit.
If you haven't seen it, the game is sort of like astro smash (so I hear, never played it) and space invaders. Tits, dildos, bibles, hamsters, and so forth drop the the screen and you use your penis to shoot sperm at them. Funny as all hell. Your shield is just a rubber. Oh yeah you can hit rubbers with sperm go gain more bonus shilds. Heat seeking dildos, AIDS viruses, and so forth.
The game runs EXTREMELY fast on a 386, so I won't even bother trying it on my Pentium III.
Most all games back in the dark ages were written by 1-3 programmers. I think even the Kings, Space, and Police Quest series were only done by a very small team. Usually only about 5 people were involved.
One person can make a big difference. The deal is you have to be a GOOD programmer, willing to sacrifice a LOT of time, and know what your doing. I don't just mean games, I mean anything.
Start off small and work big. If you want to write a word processor, start off with a small screen editor. Make it so you can move the cursor around. Make it scroll text. Add pull down menus, file I/O, word wrap, search and replace, and so forth. Just add pieces at a time.
So like I've said many times, if you want to learn C, get a compiler. Go to borland, djgpp, or just about any others. There are MANY free C compilers out there. I prefer Borland myself, but to each his own.
Get some books. Get several introductory books. Read through them. Practice. Type in the code, don't just read it. Try some things on your own. Put it at least an hour a day. That's the only way you are going to learn the language.
After you have several weeks under your belt, a statement like this won't look so cryptic:
if(option == 'x' && array[#] == 'y') {
array[#] = 'X';
num++;
}
You will get there. Just be patient.
|
|