Author Topic: [C++] Learning it.  (Read 14335 times)

0 Members and 1 Guest are viewing this topic.

Offline Anjz

  • ZX 81
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
[C++] Learning it.
« on: April 26, 2011 »
Hey I'm fairly new to coding and i wanna work towards being able to program games.
For this I've heard that C++ is the best language to use so I'm giving it a go.

I'm looking for tutorials and any possible help i can get.
I tried looking trough some stuff i found but they were way to advanced and i gave up.

I also got a suggestion to go with Blitz Max if that's better starting off with.

Thanks for any help i might get. :||

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [C++] Learning it.
« Reply #1 on: April 26, 2011 »
Hum, good question.

For english speakers, I can't remember which website to look at when starting.
After, I can advice you to have fun with SDL (2D) or even SFML (2D) then moving on something more consistent -> OpenGL / DirectX

The point of: "C++ good for games dev" is that nearly all companies developping for consoles / PC (non smartphones or iPhone / android stuff) are using C++. Otherwise, some others langages can be fun too ;)

As IDE, I would advice you Code::Blocks (I hate now dev-cpp (since we have Code::Blocks ... so be prepared to have shame on you if I hear that you are using dev-cpp). Microsoft Visual Studio is good too but not free ... (apart the express version).
In games companies, they are using Visual Studio, but when you learn with one, you can handle all of them :)

Some good website that I have in my favs:

http://www.cplusplus.com/doc/tutorial/ (go around ;))
http://www.cprogramming.com/tutorial.html (I have used it a but, but can't tell the level)

Don't hesitate to ask questions :)
And you are very welcome on DBF :)
The demoscene will never die, never!

Offline Anjz

  • ZX 81
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
Re: [C++] Learning it.
« Reply #2 on: April 26, 2011 »
 :goodpost:
Thanks for the quick answer, I will check the sites out.

And what is ?  -->  Code::Blocks

Edit: Duh, a program x)
« Last Edit: April 26, 2011 by Anjz »

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [C++] Learning it.
« Reply #3 on: April 26, 2011 »
(I suppose you are and will be working on Windows )

Code::blocks -> http://www.codeblocks.org/

:D

Hum what is it ?
Something that we are calling an IDE -> Integrated Development Editor (or something close to that :D)

Stop the theory.
In C++ you need multiple things to get a program (.exe) ->
An editor (where to type the code). It can be Notepad ... or more evolved editors giving you the syntaxic colouration (very important to me :D) and others utilities
An compiler -> program able to parse your code to prodce the .exe ... The compiler is a multi task process ... but we will simplify

Then you have an .exe \ o / (displaying Hello World :D)

But you can have bugs (you will have bugs ... more than certainly). And to help you in the debugging process, you will use a debugger, which will be able to give you feedbacks on the program that you are running (values of variables ... stopping the program where you like to ...)

Now, the IDE is gathering all these tools in an unified interface.
So the IDE is the complete toolchain to do the developped. An editor, the compiler (MinGW for Code::Blocks) and the debugguer.

So please download Code::Blocks (with MinGW) and try to run a first Hello World ;)
The demoscene will never die, never!

Offline Anjz

  • ZX 81
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
Re: [C++] Learning it.
« Reply #4 on: April 26, 2011 »
I've probably done a million Hello World! in Visual C++  :P
But thought that was all i needed to edit the code and then compile it to run it?

edit:  I've also done some HTML, is the structure of the code anything alike?
And when creating a new project for these tutorials, what do i choose?
CLR or Win32?
« Last Edit: April 26, 2011 by Anjz »

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [C++] Learning it.
« Reply #5 on: April 26, 2011 »
Oh, in Visual Studio. No problem with it ... it is an IDE and so contains an editor / compiler / debugguer (which is really powerful)

You should start with a Win32 Console program :)
And I am not able to compare the HTML with C. It's completely different :D
The demoscene will never die, never!

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: [C++] Learning it.
« Reply #6 on: April 27, 2011 »
Hi anjz, welcome to Dbf.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: [C++] Learning it.
« Reply #7 on: April 27, 2011 »
Hi anjz, welcome to Dbf.
:hi:  Anjz!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [C++] Learning it.
« Reply #8 on: April 27, 2011 »
Hi Anjz, and welcome to the forums.

We tend to focus more on graphical effect demo's than games, but I'm willing to collaborate on design aspects if you wish.
You are our 9001st visitor.
Challenge Trophies Won:

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [C++] Learning it.
« Reply #9 on: April 27, 2011 »
We tend to focus more on graphical effect demo's than games, but I'm willing to collaborate on design aspects if you wish.
These two worlds are very close.
I wanted to program games and I discover demo. I am studying games programming, and in the spare time making demo (sometimes :D)
Both are using the same knowledge so :)
The demoscene will never die, never!

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: [C++] Learning it.
« Reply #10 on: April 27, 2011 »
True. A lot of demoscene members work in the game industry!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: [C++] Learning it.
« Reply #11 on: April 27, 2011 »
One thing I would say about c++ and making games or even graphics demos, you have to use includes and libraries outside the actual c++ language which can be confusing at first. This is were the high level languages like blitzmax make it easier and in some respects faster to learn and create stuff as the language includes access to all these things and there classed as part of the language*.
One of the cool features of blitzmax is the fact you can gain access to all the low level libraries like directx and opengl should you need to go beyond what it offers itself.

I really depends on your goal, learning c++ or making games. If its learning c++ then of course take that route but if its making games then I would say give c++ ago first but if your finding it confusing or heavy going, then consider trying something like blitzmax, you can always return to c++ once you have gained valuable coding experience in another language.



NOTE *(Technically there not as there just language bindings to the same interfaces as the c/c++ libraries but your hidden from all the setup code and stuff)

Oh and welcome to the forum.

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [C++] Learning it.
« Reply #12 on: April 27, 2011 »
The principles are mostly the same - I make games and present them here as interactive demos ;)
You are our 9001st visitor.
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Learning it.
« Reply #13 on: April 27, 2011 »
I'd recommend to visit and download the free express version of msvc++ http://www.microsoft.com/express/Windows/ 
the only real thing you may miss is the resource stuff, not vital for starting out with. And there's always resedit.

Once you've installed it you will need to download the directx sdk - I know it's big but worth the wait. Microsoft do send additional resources and there's links on the start page when you load up express. And there's a few bits on here covering C++

nehe / gamedev are very good, you may encounter glaux, which i've yet to find a replacement.

ps - sorry for not having more links etc - im learning cpp myself. I'm sure some of the other dudes can help better.

Wishing you well with your adventures,
Clyde.

Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Anjz

  • ZX 81
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
Re: [C++] Learning it.
« Reply #14 on: April 27, 2011 »
WOW! I love you guys already  :||
Thanks for all the welcomes, it's nice to be here.

1. What is CPP?

2. Ferris or Jake Taylor sendt me here saying i should go for blitzmax because that's what he started out with before he switched to Demos.

3. I'm confused  :)

4. Looks like there is a god afterall, i might get into a school where i can learn all this over 3 years.
I thought i was totaly screwed going the way that i already chose. :offtopic:

Thanks again.

Kriss~

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [C++] Learning it.
« Reply #15 on: April 28, 2011 »
1. What is CPP?
CPP is C++ (C Plus Plus). A oriented object programming langage. The origins are from C, to which one we have added some oriented object paradigm.

2. Ferris or Jake Taylor sendt me here saying i should go for blitzmax because that's what he started out with before he switched to Demos.
3. I'm confused  :)
Normal to be confused.
Everyone will tell you to chose one of other langage. Why ? Because each langage answer to one question, but no one answer to als questions. When you will have experience, you will see that you will choose the langage depending on what you need, what you like, what the amount of time you have ... and so on.

4. Looks like there is a god afterall, i might get into a school where i can learn all this over 3 years.
I thought i was totaly screwed going the way that i already chose. :offtopic:
If you wanted C++ because when you are entering to a school, you will do C++ (like in Games programming courses) so, don't hesitate go for C++.
If you just selected C++ randomly, that it is your first langage, and that you want to do 3D animations / stuff quickly, maybe blitzmax is better (I don't know it precisely).
The demoscene will never die, never!

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [C++] Learning it.
« Reply #16 on: April 28, 2011 »
3. I'm confused  :)

The best course of action, when programming anything complicated, be it a game or a demo, is to start simple.

Create the first thing you want the user to see, often a menu or a title screen, and then work on interactivity, and build the features one by one. Don't start work on the next feature until the current one is finished, though if you get stuck, either ask for help or move on. Don't forget to return to any incomplete features you move on from.

Another good idea is to save multiple versions - this way you can go back to a previous version if a newer version has a bad mistake which is hard to find.
You are our 9001st visitor.
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: [C++] Learning it.
« Reply #17 on: April 28, 2011 »
Quote
2. Ferris or Jake Taylor sendt me here saying i should go for blitzmax because that's what he started out with before he switched to Demos.

Thas because blitzmax is a high-level language based on basic that is easier for beginners to learn and when you get problems and post code samples almost anyone on here would be able to understand the code and probably help find a solution even tho they might not code in that language themselves.

Also the bmax source when compiled is very fast, so you dont lose out much if anything in proformance. Alot of games you find on the casual game portals are coded in blitzmax or in some cases earlier versions of blitz as well, so it does have commercial games and other products out there coded in it.

I suspect there some of the reasons jake suggested it, I use it myself for most of my coding. I can code in c/c++ but just find blitzmax faster for me to get things up and running and it's easy to expand with a great library of free modules that add things like 2d physics engines and more. Of course there are similiar things available for c++ but can be more work to intergrate together.


Which ever route you choose there will be people here who will do there best to try and help, but it can be difficult for us to say which language you should choose to use as there's a bit of a personal preferance to it as well.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Learning it.
« Reply #18 on: April 28, 2011 »
I think you'll find it was Blitz that Ferris started out with now known as blitz3d - with that you can do either 2d or 3d or both. And that would be a very good starting point, if like all of us at the start and sometimes still feel "a bit confused", you can grab a trial at http://www.blitzbasic.com/Products/_index_.php  it has alot more support and decent enough manual / documentation.

You'll find it a pretty good starter language - I did. And alot of  the graphical, maths functions, and music side of things have been done for you, hence why the file size is on the large side.

FreeBasic is also another candidate, it's heading in more of the C++ direction.

BlitzMax just out of personal preference, I wouldn't worry too much on, and you can do very similar in C / CPP
 
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: [C++] Learning it.
« Reply #19 on: April 28, 2011 »
I wouldnt really recommend blitz3d over blitzmax, its very old dx7 based and anything it can do blitzmax can do plus a whole shed load more. Blitzmax also supports OOP and stuff like that and with the free minib3d module has the same 3d engine abilities as blitz3d only in opengl and cross platform, with full source code so you can add to it.