Page 1 of 1

Mini Grid demo

PostPosted: Fri May 25, 2007 1:22 am
by Game A Gogo
This is really a small thing, just to show how to make a grid gripping thing.

And no need for a screens hot, its just a pacman icon whit a grid in the BG

COOL!!

PostPosted: Fri May 25, 2007 6:08 am
by kyensoftware
Cool!
Can I use it in the chess game I am makin'?

PostPosted: Fri May 25, 2007 2:21 pm
by d-soldier
That is pretty cool!
Does the
x=round(x/60)*60;
y=round(y/60)*60;
make it drop in 60 pixel incriments?

PostPosted: Fri May 25, 2007 11:56 pm
by Game A Gogo
Ir make sit go to the nearest point on a 60 pixel basic.

How it works:

I am compressing the x and y location, making it loose "quality" whit the round(); and to be able to show the "uncompress" version, i need to place *60, which uncompress the compress data but since the some of the data quality, it has to be "choppy", and because the round(); rounds up anything higher then ".5" it makes it move to the closest point.

PostPosted: Sat May 26, 2007 3:17 am
by Sgt. Sparky
Awsome Gogo! :D
I am using a function similar to this in my Snake 2007 II Game(posted recently and updated). :D
only the Grid is declared at the start and they move with a 25 x 25 pixel basis and if there is a certain pixel offset it fixes it,
my code it still a bit glitchy because it has so much movement,
but I am workin' on it!