How to start with a tetris clone?
Heh, i got the name wrong. That is the one i'm using but i find it very uncontrollable. For doing the toturials in the "how do i?" section it says you need basic knowlegde of C++ wich i dont have. All the C++ starter guides on the net requires you to have a compiler for testing the simple codes that you will learn. when i stuff this in VC++ i just get an error saying its outdated, very annoying. a guide on VC++ would be very appreciated (i've watched the 4 help vidoes, but they aint very informing).
Okay, the program is actually quite nice, hehe. But why would i learn C++ by using it, this program is not a lot of writing (wich is what you learn from is'nt it) also as i've said before the "hello world" explained on most websites dont work, VC++ simply states it outdated. so how do i get started using this? Okay i can make a calender thing wich changes name every time i shift the date and closes when i click O.K but i dont understand ANYTHING of why it does that i wrote like 2 lines, and i did'nt even do it myself a had a video guide to help me i would NEVER have been able to do that myself. So are there any books that can be used together with this, because this program looks like it tossing away the most basic things starting ahead of the beginners.
Okay, sorry for all this.... I did'nt realise that i could start an empty application (i'm tired) all thats left to do is go to the library and get some books. Thanks all!
Quote:Original post by Meateater
Okay, the program is actually quite nice, hehe. But why would i learn C++ by using it, this program is not a lot of writing (wich is what you learn from is'nt it) also as i've said before the "hello world" explained on most websites dont work, VC++ simply states it outdated. so how do i get started using this? Okay i can make a calender thing wich changes name every time i shift the date and closes when i click O.K but i dont understand ANYTHING of why it does that i wrote like 2 lines, and i did'nt even do it myself a had a video guide to help me i would NEVER have been able to do that myself. So are there any books that can be used together with this, because this program looks like it tossing away the most basic things starting ahead of the beginners.
Well, we're here to help :) But you have to state specifically what you mean by 'don't work'. You understand about compiling now, yes? When you compile you should either get error messages saying something is wrong with the code or it will compile successfully. If it compiles successfully, it may run, but incorrectly. If it runs incorrectly what DOES happen?
What exact version of Visual C++ do you have? I don't have the express edition, but I do have Visual Studio 2003 And 2005 (thank you MSDN AA!) They should be quite similar. I can post a step-by-step instruction on how to compile a 'hello world' program, but there might be too many differences between the versions.
Wait, how about this link?
http://cplus.about.com/od/learning1/ss/clessonone.htm
Quote:Original post by Meateater
Okay, sorry for all this.... I did'nt realise that i could start an empty application (i'm tired) all thats left to do is go to the library and get some books. Thanks all!
While I recommend owning a physical book, your library may have a crappy selection. Check out what they have and come back here and ask if they suck or not :) Number 1 thing to avoid:
Books that have iostream.h in the example programs toward the top of the code listing. If the example programs have just plain iostream with no .h file extension then they are fine. The C++ language used to be non-standard. That is to say, there was no official way to tell what programs were correct or not. Before it was standardized, many C++ compilers made use of extensions in the standard library header files (.h), but after standardization standard files removed the extension. Non-standard header files still use extensions though.
In any case, there are at least two online books you can read if you can't find any good ones at the library. C++: A Dialog
http://www.steveheller.com/cppad/cppad.htm
and
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
Not to mention countless tutorials.
Oh boy, thanks! i found a book called "The C++ programming language 3rd part" but the 2nd part is called "C how to program" does this require me to read number 1 (wich i cant find) then 2 then 3?
I'm using Microsoft visual express C++ 2005
Also the most guides on microsofts learning page are for C# whats the actual difference between C# and C++?
Also the most guides on microsofts learning page are for C# whats the actual difference between C# and C++?
Quote:Original post by Meateater
Oh boy, thanks! i found a book called "The C++ programming language 3rd part" but the 2nd part is called "C how to program" does this require me to read number 1 (wich i cant find) then 2 then 3?
I believe you mean The C++ Programming Language: Third Edition. People don't always write just one book and then leave it gathering dust. They find they can improve it, clarify parts people found confusing, and get rid of errors in the text. And make more money by releasing a new book, of course. A new edition of a book is just the old edition with modifications.
It's not a sequel as you seem to think it is.
As for "The C Programming Language: Second Edition" it was written by Brian Kernighan and Dennis Ritchie. Ritchie invented the C Programming Language and worked at Bell Labs with Kernighan and they both wrote the 'definitive' book on C. This will cause you to ask "what's the difference between C and C++?" which can be explained on a superficial level by saying 'classes are in C++, not C'. C++ was meant to be as backwards compatable with C as possible(in fact, the first compilers simply converted C++ code to C code and then the C code was compiled), but there are still differences, especially in their philosophy. The differences became even more pronounced when a new standard specification for C was released
Finally, as C++ was created based on C, C# is a 're-imagining' of C++. C++ is an imperfect language, in many parts due to spot-welding the new features onto an exising language. C# said "screw that' and used a similar syntax to make an entirely new language from scratch. C++ or C code will absolutely not run under C#. While related, they're like brothers seperated at birth who may look the same, but have entirely difference personalities. C# is an invention of Microsoft and they're pimping it out like it's going out of style so that could be why they're putting up a lot of guides on their website. C# is what's known as a 'managed' language. Basically, it takes care of a lot of ugly details that C++ places on your shoulders.
many make the mistake of thinking a simple game idea is simple programming, tetris is not simple to code at all, its the simplicity of the games mechanics that starts these posts off. Tetris includes very good tracking, vectors and general entity memory to work, a complicated game that is a good workoit for any accomplished programmer, pong on the other hand maybe a simpler game as all you have to thing about is paddle movement on the x and y and a basic physics and collision engine for the ball.
the simplest game i can think of is programming a game of black jack in console.
Game: using very simple rules, hit 21 in 5 cards or less but dont go over (take the dealer out of the equation to make this even more simple)
Things you should try to cover or program
1. How numbers are randomly generated 1 - 10
2. The ace 1 or 11, user choice
3. The event of over 21 (bust)
4. The event of a 5 card draw.
How does the game loop.
advanced features could be
1. betting system
2. dealer incorporation (stick, hit)
3. Card tracking, you cant draw 5 1's cos there are only 4 aces in a deck
the simplest game i can think of is programming a game of black jack in console.
Game: using very simple rules, hit 21 in 5 cards or less but dont go over (take the dealer out of the equation to make this even more simple)
Things you should try to cover or program
1. How numbers are randomly generated 1 - 10
2. The ace 1 or 11, user choice
3. The event of over 21 (bust)
4. The event of a 5 card draw.
How does the game loop.
advanced features could be
1. betting system
2. dealer incorporation (stick, hit)
3. Card tracking, you cant draw 5 1's cos there are only 4 aces in a deck
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement