Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » Quick Question

This thread is locked; no one can reply to it. rss feed Print
Quick Question
Age Man
Member #661
September 2000

What was your guys C/C++ learning time? After how much time did you guys feel it was easy working with pointers, classes (C++), etc. ?

Matthew Leverton
Supreme Loser
January 1999
avatar

At age 13/14 I was using QuickBASIC with some graphics libraries and was quite content. I got a free C compiler and tried to learn it, but I had no Internet access and hardly any resources (including libraries like Allegro). So I gave it up after a short bit. A year or so later, after I had Internet access I gave it another try. With the help of two good C/C++ books and the Internet, I'd say it took me about a month before I really felt comfortable with what I was doing. The first couple weeks was always looking back at the books for every last detail. In that time I was easily able to "port" one of my graphical QBasic tetris games.
I'm still by no means an expert in C++ and still learn many new things (when I actually get to use it!) I personally learn the fastest working by myself; I've never taken any programming classes, as they are way too slow for me. (I know that, because I have friends in college and I routinely help them with their work.)
I was hooked on computers around age of 10 with the family's C64. We had many BASIC books that had programs you could type in, etc. Copying code before being able to type 100+ words a minute was very tedious to say the least! But those simple BASIC programs gave me a solid foundation...
--
Matthew Leverton - matthew.leverton@interclay.com

james shipman
Member #552
July 2000
avatar

my experience is very similiar to matthews i started programming on a c64, then qbasic then i tried pascal and some assembly and finally found djgpp and allegro , i started using only c but then i bought a programming book on c++ and picked it up very fast althought there are still things i don't know and things i know but don't use so , i think it took me a couple of months to get comfartable with c , i found ever bit of free source code and just learned from that , it took me about a 2 weeks to change to c++, althought i still use some c in my programs

StevenVI
Member #562
July 2000
avatar

I got hooked on computers when I was 8 (ha, beat that Matt!) when some guy who worked for my dad gave me some pirated games. If it weren't for software piracy I probably wouldn't be here today :P. I'd be a star football player or something... but anyways... when I was maybe 12 or so one of my friends told me of this cool program that comes with DOS called 'QBasic' and you can make music with it (I never had any intent or thought that I could make a game with this thing). I started reading over the help documentation that came with it (which was very complete, I thought, and helped a LOT in learning to program). That's pretty much where I learned the basic concepts of HOW things are programmed. Then my dad bought Quick C. I never really got into it, cause there wasn't any big help file that told you exactly how to program in it. Some time probably passed, my dad bought me MSVC4. I didn't really catch onto that, either (what a waste of money :P). I used QBasic for quite a while until I heard about DJGPP. I downloaded that, and also Allegro, and started just copying the example programs that came with it nearly word-for-word and changing around a few things, drilling into my brain what did what. I already had a little bit of experience with C at the time, cause I had downloaded source codes for games before and screwed with 'em, but... yeah... that's my life story that you didn't ask for :P.

It took maybe one week before I thought I could do anything in C (thinking something and actually being able to do something are two very different things ;). I'd say maybe 40 hours or so is what it took me to get things down good enough, and I still learn new things a lot.

On a side note, I bought a C64 a few days ago for $2.04, a steal in my opinion, considering it appears to be in mint condition (well, the unit at least, the box on the other hand...). I've been having trouble with POKEing values to the screen, it only wants to display something if text is already in taht space, but if it isn't it won't display anything. Go figure, either I'm just making a stupid mistake or the thing is messed up. I think the cart slot is dead, too... either that or the cart that I have is. I'm going way off-topic, though... I apologize for making you read all this.

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

epiwerks
Member #489
June 2000

Steven, before I also tell my mife story, I think I can help you with your C64 troubles.

You are POKEing to the wrong addresses. There are two sets of addresses for the 40x25 text grid: the character set and the color set. You are probably POKEing to the color set.

Addresses 1024 onwards are for putting characters on the screen.

POKE 1024 + X + 40*Y, N

This will put the character N (I don't think it corresponds to ASCII) at position X, Y. I think you use 53248 (or something like that) for the color offset (ie. instead of 1024). Also, I found out one day that you can get the graphics chip to read from somewhere other than 1024 onwards.

Anyway, onto my history....

At age 12, I noticed one of my older brother's schoolbooks had some BASIC code in it. I was at the same school and we had Amstrad CPC 6128 computers. I became really interested in the concept of a computer program and I begged my dad to get my a C64 for my 13th birthday. He did. He bought one off my uncle and it packed up after a few months.

Anyway, in that few months, I learnt the basics of BASIC. The year after, I went on to apply my knowledge on those Amstrad computers our school still had. I have to tell you, Amstrad BASIC is probably the best version of BASIC EVER. I didn't do much programming that year, but I did manage to write a program that imitated our school's bell (something I also did on a Roland JP synth in the music room!).

The year after that (1992, 3rd year of my programming career), I finally made a game on the Amstrad. It was called Firezone and I lost the disk. So I helped friends who were also writing games. I had great success debugging titles such as "Ally Afro's Quest", "Space Dudes", and "The Adventures of Fat-Head".

The next year saw me return to my C64 roots. I learned a lot of machine language, but I got very frustrated because I didn't have the tools to put it all together. The C64 programmers reference guide was way out of my reach.

The year after that (1994), I discovered GW-Basic and I thought it was pretty cool. That soon led to QBasic, which I couldn't figure out, because it didn't require line numbers.

In 1995, I started my uni course and learned Pascal. This was my first exposure to a non-line-number language. I paid attention and discovered what programming was really about. I went on to learn C and 8086 asm in the second semester. When I got my XT computer that year, it only came with QBasic, so I applied all that knowledge to QBasic.

It wasn't until late '96 that I got my first 32-bit computer. I soon discovered DJGPP and then Allegro. I have been using them ever since.

Recently, I have learned quite a bit of C++, which I really love so much. I have also moved to mingw32 because windows has good hardware support (and directx). I am still fixing the first game I made with Allegro, so I can't say I've come that far yet.

Well, that's my life story.

------
I'm back.

StevenVI
Member #562
July 2000
avatar

Epiwerks: Thanks, but I'm not that stupid... although I wish I were, cause then my problem would be solved now ;). I use the formula in the manual for it (I think it was the C64 manual) that says 'POINT = 1024 + X + 40*Y'

...see my post in the programming forum for more details on my problem.

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

ToNiZ
Member #638
September 2000

I actually started programming in QBasic, when I was 10... Now I'm 16 and I've been working with allegro about half a year. You may check out my first "game" which is done in C with Allegro, "W.K.F. - Who Kills First"... First I did those simple print things with qbasic and the I just got the idea of programming and learned quite fast doing graphics and things like that... All done with 286 and CGA display... Then I teached myself Pascal when I was 12, but I never found pascal enough useful, qbasic was more easy to do simple games. I wanted to learn C when I was about 13, but when a red some books, I looked really hard... First I did't actually use any C stuff in DJGPP, only allegro commands and the a bit later I started using those libraries which are included in DJGPP, but I'm not any pro in programming, but I think I can make games...

Thomas Fjellstrom
Member #476
June 2000
avatar

I guess I'm a bit of a latecommer to programming.. I started about 3 years ago with perl and moved on to C about 6 months later. Now that I've been an adult for a while now (well 18 anyway) I can honestly say that Im still learning how to program.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

PrimeSide
Member #687
September 2000

After reading all the respones, I feel inspired to post my own history...
When I was around the age of 6 or 7 (year 1994 or something), my dad bought a 386 IBM. It was awesome! (or to me). I can remember the first night it was setup. We ran the introduction to Personal Computers program...
I didn't actually start programming then. My dad got my brother (3 years older than me) semi-interested when they started editing the nibbles program. I, however, was confused when it came to computers and gave up.
Around late 8 or 9, I got an old learn Basic book from the library (I got to keep it for free... remember the year was 95). I still have it. Anyway, this was my first introduction to the wonderful world of programming. I made a few programs that went like this:
Hello. What's your name?
? PrimeSide
Hello PrimeSide!
Do you like the number 7?
? n
You stink!
Do you like the number 7?
? y
You rock PrimeSide...
END
I also made some guessing games (over 5, since I kept losing the program).
I took a break until late 10 - early 11.
I got interested again when (in 1997 or 98) we got a new computer. A P1, 200mhz.. thing. But, we got an internet connection. I soon discovered there was still a community based around Qbasic (there still is now). I started programming and learned to do simple graphics in Qbasic and made some pretty basic stuff... After realizing how little I could do in Qbasic, I stopped.
Age 11 (year 1999):
This is where I made a mistake. I bought VC++ 6.0, before even learning C. I was lost in a world of confusing crap. I almost dropped programming entirely then...
Age 12 (year 2000), summer time:
Realizing I had to do something about my failure at programming, I started reading a very thick book on VC++. Thought I was gonna make a 3d engine too.. Ha! I laugh at myself. Anyway, the book wasn't that good at explaining anything, and I once again became lost. I even thought once again to drop programming.
Age 12: Late Summer, early Fall (2000):
I decided to take action and learn C, so maybe later I could learn C++. I found and downloaded DJGPP, and thanks to the ZIP-PICKER, I downloaded Allegro too. I started learning as much as possible and made my first game. Wait, before I name it, let me say in summer 2000, we got a new P3, 800mhz computer. Anyway, my game was MattPong. It was awesome, until I tried to run it on my old 200mhz (for testing). It was so slow. I had known nothing about timing routines...
Age 12, Present:
Learned about timers and such. Programming much more. About to release first (working) game: Gamma Quest. It's a Pac-Man type game, but has many levels and tons of tiles. Expect a demo soon!
I've still got much to learn, but I can say I'm very happy to have started as early as I have (pretty good programming at age 12). Lastly, sorry for taking up so much space with my history.
-PrimeSide

PrimeSide
Member #687
September 2000

By the way, I noticed that a lot of replies had mentioned that the C64 was a starting point. Feeling sad that I missed out on such in influential computer, I ask if anyone is willing to sell me an old Commodore 64? I just really want to see what I missed out on...

NOTE: if you didn't know, I was born in '88, missing the prime time for home computers and garage developers... :(

Daniel_C_McKinnon
Member #685
October 2000

I have the usual life story.
I've never really known computing without programming, because one of the first things I did with yea-ol' 386 was found QBasic, and I played the gorilla game, within a few days I was hacking it, and copy/pasting/editing code in it.
I started with Quick-Basic, when I was about 8yrs old. I hacked with that for a long time. By about 10 I was confertable with Pascal, and I knew about 10 languages. I actually tried C when I was about 13, I learned it in about 1/2 hour, but that's because I already knew dozens of languages. But pointers and stuff, that took me about a day to feel confertable with.
I understood the concept long before I started using C.
I counted last year all of the projects that I have completed / not completed. (I was 15 last year) and at that count I found 132 Games! Most of which were in QBasic, but I was quite amazed with myself. (Most not complete) Now I just mung-up and never finish ANYTHING. I havn't completed a game in about three months. (I Need a graphics person, and to smoke more bud)
Anyways, I kinda' dislike C, but I love Allegro WAY too much to use anything else.
(More Life Stories anyone?)

Andy Geers
Member #135
April 2000

Oh go on then...
When I was 6 we got a BBC Micro, and my Dad bought me a subscription to Let's Compute! magazine, that tought you how to program and stuff. I messed around trying to write a couple games, and then in about 1989 we got an Acorn A3000. My Dad tried to teach me a bit of C then but I didn't really understand it, and decided to stick with BASIC.
In 1995, when I was 12, we got our first PC (a P75) and I started on QBasic, but by that stage most of my friends had started learning C. Feeling a bit jealous, I took on the challenge, and then I got a C++ tutorial off the internet. Now I've got VC6, and absolutely love it!

S Thompson
Member #748
November 2000
avatar

Well Hell, why not?
When I was ten my dad bought a Ti99/4a computer. Learned a little about basic. You know saving on to a cassette was the highlight of my life. The only problem with the Ti ( and I know others had them also) was the fact that after 1 or 2 hours of use the get too hot and oops lost everything.
14 years old my dad bought a IBM clone off of one of QVC. It was a 4.77mhz,monochrome, no hard drive, 5.25 in disk drive beauty. It had basic. It took me a week of messing with the thing to learn how to save a program onto a disk.
Programmed basic for a while. When I was 16 friend found out I only had basic. C was too big so he gave me acopy of Pascal. 3 files. no libs. Could do minimal graphics. It was pretty cool. I amazed my little brothers with those cheezy little games.
Bought my first real computer when I was 21.
Compaq 75mhz,And still only had pascal. I bought "Learn to program games in 21 days" It had a copy of MSVC 1.0 and it came with a pretty neat little graphics library. The drawback was when I started writing larger programs I realized that the library was written for 'small memory'.
Djgpp to the rescue. And subsequentially allegro. Great stuff.
I am now using MSVC 6.0 and Allegro 3.9.3.2.
I really like the windows port and the windows compiler.
That' all
http://www.stas.net/5/dimitri

Go to: