Well, I need a function that makes a tetr shape rotate over its center
where do u get these???????????????? O.o
just trying to program a tetr and i need this function ^^
it should rotate when u pick right or left arrow keys,
i think that i should make an rectangle and then put the shape into of it and shapes and rectangels x and y should be same. then i should make the rectangle turn over its square
and i think that i can allot this rectangle to rectangles to make the collapsion test and to make this shape really rotate :)
WELL HERE ITS THE THINg i think
just look at the thing i am thinkining on it i mean rotate.jpg
well, rotation of an image is tricky; but you can cheat by having an image of it in each position and then flipping thru the images
like a movie screen
if (keypress == rotateleft) {imageN = imageN+1}
aha!
but whats N means?
N just means whatever number it is; you get the next image i the sequence
hmm i don2T got it sarry :(
image1 = up; image2 = left; image3 = down ; image4 = right display image3 when rotate left; display image2 when rotate left; display image1 when rotate 3 times to the right; display image2, then image3, then image4
ahh now i got it
so images change splaces with eacht other kk
its a CHEAT!! :(
if you are moving sections of defined areas; then have an array built up if area locators
its an effect lol
yea :D xd
but its the easier way of it but without this trick how can we rotate this?
similar method to the cannon rotating; converting polar coordinates into cartesians
but unless you have the computational power to keep track of all the points in an array, it gets messy
but the center of the shape is orign this time ye?
yes
kk
thank you and i have to leave now bb
Join our real-time social learning platform and learn together with your friends!