0 Members and 1 Guest are viewing this topic.

0->block_countWhile game_is_running == True: If create_a_block == True: rand^94->{block_count * 2 + L1} // X-coordinate 0->{block_count*2 + 1 + L1} // Y-coordinate block_count++ End For(A, 0, block_count): // or is it 'For(A, 0, block_count - 1)' ? {block_count*2 + 1 + L1}++ // Increment each Y-coordinate so that every block moves down End [game code here]End

Well, assuming that you assign each block an X and Y coordinate in a buffer, you could simply do a 'rand^94' when assigning an x coordinate, then leave it alone.

.Creating xrand^94->Irand^94->Jrand^94->Krand^94->Lrand^94->M.Some other stuff.DrawingIf D<140D+1->DPt-On(I,D,Pic2)Pt-On(J,D-20,Pic2)Pt-On(K,D-40,Pic2)Pt-On(L,D-60,Pic2)Pt-On(M,D-80,Pic2)end.More other stuff.Checking if blocks collide with Pic1 which is located at x,yIf abs(I-X)<8If abs(D-Y)<8ReturnEndEndIf abs(J-X)<8If abs(D-20-Y)<8ReturnEndEndIf abs(K-X)<8If abs(D-40-Y)<8ReturnEndEndIf abs(L-X)<8If abs(D-60-Y)<8ReturnEndEndIf abs(M-X)<8If abs(D-80-Y)<8ReturnEndEnd

.Number of blocks (don't exceed about 350)100->N.Clearing L1 (there are more efficient ways to do this, .but I can never remember the exact syntax).For(I,0,N*2) 0->{L1+I}EndWhile 1 .Creating X and Y For(I,0,N) If {I*2+L1+1} > 64 rand^94->{I*2+L1} 0->{I*2+L1+1} End End .Some other stuff .Drawing For(I,0,N) I*2+L1->J Pt-On({J},{J+1},Pic2) {J+1}+1->{J+1} End .More stuff .Collision check For(I,0,N) I*2+L1->J If abs({J}-X)<8 ReturnIf abs({J+1}-Y)<8 End End .Obligatory emergency exit ReturnIf getKey(15)End

.Number of blocks (don't exceed about 350)100->N.Clearing L1 (there are more efficient ways to do this, .but I can never remember the exact syntax).For(I,0,N*2) 0->{L1+I}EndWhile 1 .Some stuff For(I,0,N) .Creating X and Y If {I*2+L1+1} > 64 rand^94->{I*2+L1} 0->{I*2+L1+1} End .Drawing I*2+L1->J Pt-On({J},{J+1},Pic2) {J+1}+1->{J+1} .Collision Check I*2+L1->J If abs({J}-X)<8 ReturnIf abs({J+1}-Y)<8 End End .More stuff .Obligatory emergency exit ReturnIf getKey(15)End

In other news, Frey continues kicking unprecedented levels of ass.