Hi there guys may I ask if there's anyone here who has a complete guide or maybe just a guide on how to make the tetris game in c#? Thank you very much I really need your help.

the tetris game is a trademark game and it is illigal to make a version of your own unless you work for the company and if you worked for the company it is not something that you would ask you would already know how to make a tetris game not to mention you could get 250000$ in fines for making anything that looks remotely close to the game considering its a trademark of a corporation.

Errr. I think he just wants to write it to learn something, not to compete with Tetris commercially. What conecpts are you unfamiliar with in creating this game?

I have no idea how I am going to design the graphics of the game, can you suggest a software that I can use to design the blocks. Some told me I can use paint to design the blocks but I think it would be better if I use like another software that's really for game graphics designing so I can get familiar with it. Also how am I going to attach the graphics that I have made from that graphics software, to my xna game studio so that I can make it appear there. Also I'm unfamiliar with how I will be able to manipulate the blocks like how can I rotate each piece for controlling.

This describes loading a bitmap to a Texture2D. There's nothing wrong with using paint - if you want to get fancy Photoshop is pretty standard for 2D images (although it comes with a big price tag). You can then apply this texture to a sprite. Then to manipulate the sprite, check this out.

One thing you may notice is that you don't want to have 1 giant bitmap for each shape. Instead, just use a single block bitmap texture loaded onto a single block sprite and create a group of these sprites to form the shapes. This will make deleting them when you complete a row very easy.

I agree with @skatamatic on this topic. If you must write a Tetris clone then start by learning the framework. You'll need to know how to load Textures (I use PNG but BMP works just as well) then you'll need to learn how to manipulate the texture (using keyboard and or game pad input, or if you have the Kinect SDK you can set it up for Kinect), drawing the textures to the screen, drawing strings to represent things like score, combo, etc. A lot of work comes with XNA development because we have to do everything on our own. There is no form designer. :D

Your work is only limited by your imagination; but before you begin writing a big game (fps, rpg, 3ps, etc) get in the habbit of laying everything out in a flow chart. You'll want that organization later on, when you get stuck on something, leave the project for a week, and come back not knowing what all is left to do; or sometimes even what you wanted to do.

**Note **
If you're reading this and are learning about 3D game design then in that case we do have a form designer: UDK :D It's perfect for creating 3D environments before sending them to the game. I wrote a nifty little app that "seeds" the environments straight to the live debugger of XNA allowing me to add in characters and everything and test the look through the game without all the big tools in the way. :)

hey TaCo Thanks for all the info. I really wanted to learn new skills as I am just starting from scratch here, but I liked the way you informed me of the things I need to know on my road to designing games. Thank you very much!

hey TaCo, quick question... Where do I place that .png or bitmap file that I have made so I can use it with the tetris game that I am trying to program?

In the solution explorer of Visual Studio (which ever edition you might have) there should be a folder called YourProjectNameHere Conent. Right click that folder and choose Add->Existing item. Then to load the .png or .bmp you would call Content.Load<Texture2D>("textureName"); and assign it to the Texture2D variable. For example, say my project name is RandomProjectTest. In the solution explorer there will be a folder that's called RandomProjectTestContent (Content), you can right click it and choose Add->Existing Item or you can left click it, and then just press Shift + Alt + A on your keyboard to do the same thing. Then to load the texture:

Texture2D MyTexture;

        protected override void LoadContent() {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Load the texture:
            MyTexture = Content.Load<Texture2D>("textureName");
        }

Now if you create folders within the Content area you will have to specify which folder the texture is in, if it's sitting outside of Content's sub-folders that's fine. But say you create a folder in the Content folder called MyFolder and then you put your texture called MyTexture inside of that folder. You would have to load it specifying exactly where the texture is:

Texture2D MyTexture;

        protected override void LoadContent() {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Load the texture:
            MyTexture = Content.Load<Texture2D>("MyFolder/MyTexture");
        }

Hope I helped a little more. Feel free to private message me if you need me because I get an email everytime you do. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.