Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Mapping a play area for Tetris

This topic is 5529 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 am a bit confused as to what the next step or process is in creating my first game. Here is what I have so far and how I see it going. I have an array of [4][4] that is controlling the blocks that I will generate and have fall. I am using a sprite class to draw the individual blocks to the screen at this time and then have a function that generates random blocks. The blocks do not rotate as of yet but they will rotate by just redrawing the array. As in this: {0,0,0,1 0,0,0,1 0,0,0,1 0,0,0,1} you hit the up key and it now becomes this {0,0,0,0 0,0,0,0 0,0,0,0 1,1,1,1} This is atleast how I see it working, probally will change as this is my first game. What I am trying to get atleast an idea on is how to map out a playing field and then save the one array as it hits the bottom into a larger array which is the playing area. I am working on collision detection right now and getting that to work as it is my first time doing it. And once I get it up and running I want to be able to start working on the play area. Thanks for any hints or suggestions anyone has. Also to move the blocks I am using a translation like this one.


This is the best way I have seen people use, if there is another way to do it that someone knows let me know as I am trying to learn different ways to do stuff. Plexis

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!