Sign in to follow this  

How to start with a tetris clone?

This topic is 3937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm very new to programming, actually i am so new that i dont know what you are talking about when you say C#/C++, i understand it's some kind of code language, but that was just to demonstrate how new i am. So the real question, how to u start up a tetris clone? How do i beging programming? Do i need any 3rd party programs to program this? If so, what programs? And finally, i dont really undertsand programming, is it just like you sit there write a lot of codes and BOOM some blocks fall down on eachtother, or is it more simple? Guide on how to make a tetris clone would be appreciated too.

Share this post


Link to post
Share on other sites
If you're that new to programming you should take a month or so to just learn the language. Tetris = graphics = advanced programming. Read that FAQ and then pick up a "learn X language" book, work your way through it; if you need game-type project motivation work on a text-based RPG or something else fun and text-based

-me

Share this post


Link to post
Share on other sites
Thanks for answers. I'm looking at some C++ guides on the net but i noticed that i needed a compiler, so i looked up Windows vision, is that good?


How do i start with a text RPG? That sounds more complimiced.

Share this post


Link to post
Share on other sites
Quote:
Original post by Meateater
Thanks for answers. I'm looking at some C++ guides on the net but i noticed that i needed a compiler, so i looked up Windows vision, is that good?

The FAQ has a list of good, free IDEs for Windows C++ programming. An IDE (Integrated Development Environment) includes a compiler, useful code editor, and usually an integrated debugger. All three are all but necessary for programming, though technically all you need is notepad and a compiler (not recommended). I'll recommend Microsoft's Visual Studio 2005 Express Edition. It's free, quite compliant to the standard, and has a powerful debugger. Also, it's easy to use and free. Did I mention it's free?

Quote:
How do i start with a text RPG? That sounds more complimiced.

Programming a text game will be much easier than trying to incorporate graphics without first understanding the language. To start, learn the basics of C++ console programming. There are tutorials in the FAQ, as well, though we're more than willing to answer any specific questions.

Best of luck!
-jouley

Share this post


Link to post
Share on other sites
I got windows vision, both basic C++ and C# so i guess i'm just gonna try out the basic.... How do you use it?

[Edited by - Meateater on March 8, 2007 5:34:37 AM]

Share this post


Link to post
Share on other sites
Python, C++, and C# are good choices. C is not. None of them are related to the BASIC language, by the way.

Python is a good language for beginners, but C++ is more commonly used here. Either will serve you well if you go through a simple tutorial and work slowly.

Share this post


Link to post
Share on other sites
Okay, i got Borland and played around with it (read a tutorial on how to get it running). However i am encountering problems when doing the test part where it should display what version i'm using, copyright year etc it does half perfectly, the other half is just an error message. So i played around testing different documents in my borland server, when i tested the "turbo debugger" document it suddenly show the part that is missing at the other test, however the part that would show before is now an error message. Very annoying, also a last question, is microsoft vision better than borland?

Share this post


Link to post
Share on other sites
Quote:
Original post by Meateater
is microsoft vision better than borland?


There is no such thing as "Microsoft Vision". It's "Microsoft Visual Studio", and IMHO, it is infinitely better than Borland. (And did Jouley mention it's free?) ;)

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sounds likea good idea, Pepper. However thats still way to complicated for me, right now im messing around with the getline command and i wondering how to produce different outcomes for different answers. I know i could use the if and/or else command however it takes some practice coz i cant get it to say different things.

Share this post


Link to post
Share on other sites

This topic is 3937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this