• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

where to learn c++?

Started by rocky, March 19, 2006, 03:55:44 PM

Previous topic - Next topic

rocky

I am only 15 and I would like to know where i can learn c++ to make games, do they offer any classes for it for 15 year olds?  or do I have to learn it on my own? where can I learn it?  anyone know of any online books or books I can buy that I can learn it from?

Thanks

omaemad

lol im 15 too

well for ppl our age its a pain to learn c++ but learn c first ( c++ conatians some fancier bits like classes (object thingies in simple language) inheritance and polymorphism

you can get a game going with structs instead of classes i might start a c/c++
classes right here if there is demand like i did with the linux

anyway i see u made some webpages which is a good start as you have done the forst step which is understanding stynax of pc languages such as html
man fears time but time fears the pyramid"

bitblt

Quote from: "bitblt"Many well known programmers are self taught. For example John Carmack (founder of ID Software) never attended a university. Ken Silverman published his first software title at age 15, and 3 years later signed a contract with Apogee software to create Duke Nukem 3D. Bill Gates started developing basic interpreters when he was in High School, and dropped out of college after he formed a company called Microsoft. Microsoft sold variants of his BASIC interpreter to big corporations like Atari and Commodore, and later acquired ownership of a little homebrew application called (MS)DOS. . .

Read more and find eBook links here . . .

i want to learn!!
http://www.scdev.org/forum/viewtopic.php?t=2592

Also have a look at . . .

A Tutorial for beginners!
http://www.scdev.org/forum/viewtopic.php?t=2811

lord_kthulu

Good luck :)

I'd start with plain C before tackling C++

When you do look at C++, its would be worth getting reading material on Object Orientation Concepts (ouch!)

I'd be surprised if I was the only code monkey on the forum, so if you had problems you might be able to ask questions in the "Off Topic" area.

If I notice them I'd probably respond.

I currently work as IT Dev trainer specialising in Microsoft .NET.
I've worked with C/C++ in the past and most of my current coding is in C# (which is similiar to C / C++ / Java / Perl etc....)

I've also looked at writing games in the past but I dont have enough hours in the day now!

Anyway all I'm saying is that I'm sure people could help ya.

Intoxicated with the Madness,

Kthulu

PS  Its probably also worth checking out http://forum.gbadev.org/

bitblt

I want to make it clear to would-be programmers that you do not need to learn concepts of Object Oriented Programming to write software for GBA/DS.  With some basic knowledge of C you can make simple games, or graphic demos.  The C programming language can be thought of as a subset of C++.  So the GBA/DS can be (and usually are) programmed in traditional C style.

bitblt

Please allow me to elaborate on the subject of C++ and OOP.

So what is OOP?

Traditionally software has been developed in a bottom-up approach.  This approach to software design can be compared to construction workers building a sky-rise without a blueprint, just a general goal.  Imagine a foreman telling his workers months into construction that the sky-rise needs to be moved over 20 meters, or the sky-rise needs to be oval rather than rectangular.  The reason why bottom-up design doesn’t work well for software is because requirements will often change during and after development. More often then not complex software applications developed in a bottom-up approach will become grotesque and unmanageable.  This kind of software is affectionately referred to as "spaghetti code".

Object oriented programming approaches software design in a much different way: from the top-down.  This design concept is more like building a sky-rise from the perspective of an architect.  An architect must design a sky-rise in an abstract way.  The architect must first imagine a sky-rise as a single object; it's general shape, dimensions, and location.  Then the architect must break down the project into smaller parts, the foundation, the framework, each floor, each office, the elevators, the plumbing etc.  Only after the project is broken down into objects in a blueprint will total cost, materials, and completion time be estimated.  The great thing about OOP and objects (classes) is the blueprint IS the software.  Making changes to an individual object doesn't affect the rest of the project much.  Imagine an architect having the power to make changes to his blueprint and having his sky-rise morph into a new shape.  Object oriented design gives software developers the power to make major changes with minimal impact.  OOP also lends well to reusable software code.

So what is C++?

For some people C++ takes years to master, for others not so long.  You will have to approach problem solving in this new abstract way.  For many veteran programmers the transition from C style programming to C++ style programming can be challenging.  It’s challenging to them because it’s different, not because it’s difficult. Without getting into the specifics of code syntax I’ll try to explain what C++ is and how it came to be.

The "all mighty" BIT can be thought of as the atom of the programming universe.  Bits of information are arranged in groups called a BYTE (8 bits).  Groups of bytes are arranged to represent data like "HELLO" (5 bytes) or the number 65535 (2 bytes).  Groups of bits are also arranged to form CPU instructions called machine language (ML). Machine language instructions are sequenced to form procedures (or functions) used to manipulate data in useful ways.  An organized collection of procedures and data are called a software program.

It’s just 1’s and 0’s how hard can it be?  The inventors of computers realized that working with bits and bytes and ML instructions is rather difficult for most humans.  So software engineers invented something called a programming language.  Programming languages were developed to make life easier for humans by allowing computer instructions and data (the software) to be represented as readable text, not as 1’s and 0’s.  Special software called a compiler translates human readable text into the bits, bytes, and CPU instructions. The very first text-based computer programming language was Assembly language.  Assembly is a direct text representation of ML instructions, the native language of the CPU.

Assembly language makes software development more manageable, but is still cumbersome to work with.  One major problem with assembly is that it is platform specific.  This means software developed for one make of computer will not run on a different make of computer.  Also assembly language syntax is different for each CPU type.

The next advance in software development was the introduction of standard programming language.  Some of the first standard programming languages were FORTRAN, COBAL, and LISP.  These programming languages generally specialized in large data processing and math calculations. Standard programming languages allow old software (code) to be ported to new computer platforms with less effort.

With the introduction of the microprocessor, the computer became accessible to the masses.  Small businesses and universities could now afford to own computers. As more people were exposed to computer programming a new generation of general purpose programming languages appeared like BASIC, PASCAL, FORTH, and C.  Even Object Oriented Programming languages started to surface like Simula and Smalltalk (but no C++ yet).

By the early 70's computers had become affordable and the Personal Computer had become a reality. Millions of people purchased PC’s (not IBM PC) and many learned to program them.  In those days if you wanted your computer to do something useful, you usually had to learn to program your own software.  For most PC's back then the programming language BASIC (an interpreted language) was also the Operating System.

By the 80's the PC software industry was a billion dollar business.  No longer was it necessary to learn how to program your PC, so even non-geeks could learn to use a spreadsheet or play games.  PC manufacturers started replacing BASIC with a dedicated Operating System.  Many professional PC software developers had started to adopt the C programming language over traditional BASIC and PASCAL.

The C programming language became popular in the 80's because it was well suited for development of Operating Systems and other complex software applications.  The C language has its roots in Unix OS.  The C programming language is well structured and very efficient.  The C language is often referred to as "high-level assembly" or "portable assembly".  The development of fast and efficient software was imperative for resource starved PCs of the 80's.

By 1985 Bjarne Stroustrup had developed the C++ programming language.  The C++ language retained all of the benefits of C, and offered object oriented programming concepts.  C++ can be used as a high level language "Java like" and/or be used as a low level language "assembly like".  Windows and Linux are both developed in C/C++.  In fact higher-level languages like Visual Basic and Java are created with C/C++.  In 2006 the C/C++ programming language remains the language of choice for industrial software applications.

robo

I'm 13. I learnt C++ a month or two ago. Don't moan about its a pain for you as you are 15. I can do it. You can too.

I did have a fair amount of programming experiance before hand, I learnt Html when I was 7, VB when I was 9, Javascript roughly when I was 9 and C++ when I was 13 (which I still am).

I learn't it from www.cprogramming.com and a book called C++ for Dummies.

pwherman

Don't you have any "Computer Programming" classes at school? Or, anything like that will do. I took basically all of my school's computer classes, and I learned quite a lot in HTML, C++, Java, Flash, and such. (Not as much as I learned teaching myself, but hey.) ;)

rocky

Quote from: "pwherman"Don't you have any "Computer Programming" classes at school? Or, anything like that will do. I took basically all of my school's computer classes, and I learned quite a lot in HTML, C++, Java, Flash, and such. (Not as much as I learned teaching myself, but hey.) ;)

No they dont offer the classes in high school, are you in collage?

omaemad

I only said its a pain becuase c++ is generally a pain to all ages ( you know with all those diffrent string types it get confusing, in one and a bit years i have built a nice understanding of C++

You dont really need c++ at this stage (esp as your ds applications are relatively simple in the leraning stage anyway) structs would do the job and arrays are easier than lists any way

Rocky( just get palib and devkitpro they even teach u C in their website leraning by example is the best thing)

just give its some hard work and you will get results like this

http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=11407

yep im sorry for showing off my hdr

so final message got to

http://www.palib.info/wiki/doku.php

and read everthing

goodluck
man fears time but time fears the pyramid"

bitblt

Quote from: "robo"I did have a fair amount of programming experiance before hand, I learnt Html when I was 7, VB when I was 9, Javascript roughly when I was 9 and C++ when I was 13 (which I still am).

Impressive. I was playing with LEGOs when I was 7, programmed my BigTrack toy when I was 9, learned Sinclair 1000 Basic when I was 12, and started programming FORTH, 6502 assembly, and some C on my C64 when I was 14.

I'm 37 now, and I live a comfortable life in Las Vegas working as a Game Software Engineer for a successful international Gaming company. I am self taught.

Cyprien Walker

start simple and expand go to the library for a book and start . expand trough out the internet.

robo

Quote from: "bitblt"
Quote from: "robo"I did have a fair amount of programming experiance before hand, I learnt Html when I was 7, VB when I was 9, Javascript roughly when I was 9 and C++ when I was 13 (which I still am).

Impressive. I was playing with LEGOs when I was 7, programmed my BigTrack toy when I was 9, learned Sinclair 1000 Basic when I was 12, and started programming FORTH, 6502 assembly, and some C on my C64 when I was 14.

I'm 37 now, and I live a comfortable life in Las Vegas working as a Game Software Engineer for a successful international Gaming company. I am self taught.

Oh yeah BASIC dude. BASIC owned. I knew that too. Just before I learnt HTML

lord_kthulu

Quote from: "bitblt"
Quote from: "robo"I did have a fair amount of programming experiance before hand, I learnt Html when I was 7, VB when I was 9, Javascript roughly when I was 9 and C++ when I was 13 (which I still am).

Impressive. I was playing with LEGOs when I was 7, programmed my BigTrack toy when I was 9, learned Sinclair 1000 Basic when I was 12, and started programming FORTH, 6502 assembly, and some C on my C64 when I was 14.

I'm 37 now, and I live a comfortable life in Las Vegas working as a Game Software Engineer for a successful international Gaming company. I am self taught.

Taking your first steps as a Code Monkey was so much easier in the 8 bit days hey :)

I cut my teeth on a Microbee and then moved onto C64 coding and then onto the Amiga and so on..

It must be harder now, with the more complex GUI based OS's and richer more complex languages.

What sort of games dev do you do?
What platform?

Intoxicated with the Madness,

Kthulu

bitblt

Quote from: "lord_kthulu"
Taking your first steps as a Code Monkey was so much easier in the 8 bit days hey :)

Yes and no.

Quote from: "lord_kthulu"
I cut my teeth on a Microbee and then moved onto C64 coding and then onto the Amiga and so on..

Amiga was the bomb dude!

Quote from: "lord_kthulu"
It must be harder now, with the more complex GUI based OS's and richer more complex languages.

Yes, the GBA and the DS are excellent platforms to learn how to program C and ASM. They are embedded systems with well organized 32 bit flat memory models. They are much simpler to program than DOS or Windows, especially games. When you program GBA/DS there is no DOS4GW, or Win32, or DirectX, or APIs, or OS or anything . . . just your code.

Quote from: "lord_kthulu"
What sort of games dev do you do?
What platform?

Well, you will have to go to a casino and spend some money to play the games I develop.  My current project is a virtual live table game system.