Jump to content
  • Advertisement
Sign in to follow this  
nomichi

tetris clone (netris)

This topic is 4579 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

Well after pong I decided to try a tetris clone. It's been a bit tougher but I'm doing ok so far I think. I would have posted earlier but I was messing around with music creation, which I have to say I suck at...so I just put in a temp music for now. Sorry if it sounds a little creepy but I got tired of looking for sounds, the sound is a heretic track i think. All the art was done by me in photoshop. The source is ugly but i provide it for anyone who is interested. I'm still not great at making my code all clean and pretty, I'm just glad it works at this point. The level/score system probably needs some work but the game is playable. If anyone wants to try it out I would appreciate any feedback. Controls: use the arrow keys to move the block, UP rotates and SPACE drops the block. Scoring and Levels: -you get 100 points for each line cleared. -you get bonus points for combos of 2 or more lines. (is the max combo you can get 4? i wasnt sure so i gave more points for 5 and 6+ just incase :P) -each level makes the piece drop faster. it get's pretty fast but the speed maxes out at level 19. any level past it is the same speed. I think that's about it. I've put in a function to disable sound incase that is a problem on anyone's pc. I'm off to bed now, goodnight! DOWNLOAD NETRIS

Share this post


Link to post
Share on other sites
Advertisement
Good job game works well and I took a look at your source code and it was very clean and understandable. Keep up the good work.

Share this post


Link to post
Share on other sites
Nice and it even has sound! The graphics are good :)

I made a game like tetris recently, you can get it on my website. Boder.Us

Share this post


Link to post
Share on other sites
Quote:
Original post by Cosmic R
very nice. a little slow for my liking. how long did it take?

now onto pacman?


hmm maybe i should start lvl 1 a bit faster. I started coding it on Monday.

After I finish doing any tweaks this may need I might do a pacman next. I had originally wanted to start with pacman but decided to go a bit simpler from the start.

thanks for the feedback.

Quote:
Original post by Breander
Good job game works well and I took a look at your source code and it was very clean and understandable. Keep up the good work.


Thank you, I'm glad it makes sense to somebody else :)

Quote:
Original post by Boder
Nice and it even has sound! The graphics are good :)

I made a game like tetris recently, you can get it on my website. Boder.Us


Thanks, I'll be sure to take a look at your site. :)

Share this post


Link to post
Share on other sites
Nice, obviously using alegro?

Level 1 a bit slow, but pretty good. Like the graphics :D.

The code is fairly well kept, I personaly would have paragraphed it diferently but hey, thats just my style. Well Done!

Share this post


Link to post
Share on other sites
Quote:
Original post by Manaxter
Nice, obviously using alegro?

Level 1 a bit slow, but pretty good. Like the graphics :D.

The code is fairly well kept, I personaly would have paragraphed it diferently but hey, thats just my style. Well Done!


I think I'll change the starting speed so it's not as slow at the beginning. I maybe went a little overboard making it start easy. My last game, pong, I made way too hard at first :P Maybe that's why.

I knew I forgot to mention something hehe. Yea it's done with allegro, c++, graphics in photoshop, music is from www.partnersinrhyme.com

Share this post


Link to post
Share on other sites
hey man awesome code. im going to try to understand it. i didnt realize it could be done with that little code. is there more to your program?

a few noob questions if i may ask.

what is the deal with underscore in front of variable or function names? i am not used to that kind of naming. does it mean something in particular?

also, i notice that some functions have "::" in front of it. I am also not familiar with that kind of syntax. whats the meaning?

thanks and job well done!

Share this post


Link to post
Share on other sites
Quote:
Original post by baker
hey man awesome code. im going to try to understand it. i didnt realize it could be done with that little code. is there more to your program?

a few noob questions if i may ask.

what is the deal with underscore in front of variable or function names? i am not used to that kind of naming. does it mean something in particular?

also, i notice that some functions have "::" in front of it. I am also not familiar with that kind of syntax. whats the meaning?

thanks and job well done!


Thanks and yep that's all of the source included in the zip.

As for your questions, I'm quite a noob myself but I will try to answer what I can. :)

I assume your questions relate to the CHighResTimer class. Someone else actually posted the class up in another thread about timers. I ran across it and rather than reinventing the wheel so to speak I used their example which was essentially what I would have had to remake anyway.

The variables in the timer class start with "m_". This is just hungarian notation I believe which states that the variable is a member of the class. It's mostly for readability. Many times you may have other variables in your program with the same base name so this helps you remember what variable you are dealing with. Other things you may see is global variables with "g_" in front, etc. I'm still getting used to using the proper notation. It's a good habit to get into though from what I can tell.

The "::" is the scope resolution operator. A quick google search brought this up scope resolution operator. Basically, in the timer class it is just used for readability. It's just saying that the queryfunctions etc are not member functions. So when you read over it you know this is something that is included from somewhere else in the program. You can take out the :: in front of those functions and it will still work.

I hope my explanations are correct. I think they are but like I said, it's all still pretty new to me as well.

Share this post


Link to post
Share on other sites
here's an updated version. I made it start out faster. Let me know how it is. I also could use some feedback on the scoring. Do the levels go by too fast or slow? Any other feedback or recommendations are always appreciated.

download netris v2

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!