Archived

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

My tetris game needs levels

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

How would I put in levels in my game? I am not sure were to start on this part this game came from the one hour Tetris game tutorial so I wont have to put all the code in here. If need be I will but I figured no one would wont to go through it all. any way were would I begin on this? void GameLoop()//where the game actually takes place void Move(int x, int y); //coordinates to move. void NewGame();//make a new game! I know I need to put it in one of these functions or create my own. I just want the block to drop just a little faster after hitting 10 points so it would be something like this if (v_score = 10) { move block faster } else continue but it needs to be 10 then 20 then 30 ect I think I am going to have to keep the level score and the real score separate but have the level score get it''s info from the real score some how any help will be gladly excepted and appreciated

Share this post


Link to post
Share on other sites
How would I do that here

if( (GetTickCount() - start_time) > 1000)
{
PlaySound("MenuKnopka.wav ", hInstMain, SND_ASYNC | SND_FILENAME );
Move(0,1);
start_time=GetTickCount();

anytyhing I try changing ether makes to fast or does nothing

[edited by - kingpinzs on February 21, 2004 6:28:19 AM]

Share this post


Link to post
Share on other sites
When you change the 1000 to other numbers their should be a change in speed.



Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share this post


Link to post
Share on other sites
As ToohrVyk said, if your score modulus (%) 10 equals zero, then you should increase the speed because it''s gone up by a multiple of 10. If you can''t figure out how to implement that, you need to sit down and think about it for a while. It''s not hard.

Share this post


Link to post
Share on other sites
Well I been trying every thing under the sun
example



void nextlevel()
{

int faster ;
increasespeed(faster);
if( (GetTickCount() - start_time) < 1000 )
{

PlaySound("MenuKnopka.wav ", hInstMain, SND_ASYNC | SND_FILENAME );
Move(0,1);
start_time=GetTickCount();


}
}
int increasespeed(int faster)
{
if (faster = 1000)
{
faster = faster%10;
}




return (faster);
}


this one to slow and




void nextlevel()
{

int faster = 1000 ;

if( (GetTickCount() - start_time) < faster + 1 )
{

PlaySound("MenuKnopka.wav ", hInstMain, SND_ASYNC | SND_FILENAME );
Move(0,1);
start_time=GetTickCount();


}
}


this one to fast

I even tryed
fatser -1


[edited by - kingpinzs on February 21, 2004 3:39:27 PM]

Share this post


Link to post
Share on other sites
Neither of those make any sense to me at all. Really, this is such a basic operation that I think it would do you much more good to figure it out yourself.

Did you seriously write a working tetris game? I can't really believe you could do that and yet can't make the blocks go faster or slower.

It looks to me like you're just trying random things and praying that they'll work...

[edited by - twix on February 21, 2004 3:55:33 PM]

Share this post


Link to post
Share on other sites