My tetris game needs levels
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
never mind I got it to go faster after 10 points now I just need to figure out how to increse every time without making 50000 enterys of the same code
if( number % N == 0 ) { Do( ); }
Makes Do( ); run every time number increases by N.
Makes Do( ); run every time number increases by N.
Victor Nicollet, INT13 game programmer
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]
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]
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!|
Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|
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.
Try it first, then post here if you have problems. Your not going to learn anything if we sit here and make your game for you.
Well I been trying every thing under the sun
example
this one to slow and
this one to fast
I even tryed
fatser -1
[edited by - kingpinzs on February 21, 2004 3:39:27 PM]
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]
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement