heres what Im working with now
if (osl_keys->held.down)
{
sprite_position = DOWN;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y += 16;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y += 16;
}
if (osl_keys->held.up)
{
sprite_position = UP;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y -= 16;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y -= 16;
}
if (osl_keys->held.right)
{
sprite_position = RIGHT;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->x += 16;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->x += 16;
}
if (osl_keys->held.left)
{
sprite_position = LEFT;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->x -= 16;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->x -= 16;
}
sceKernelDelayThread(750000);
and I have difinantly decided to have each sprite be 32x32 so collision may be more aplicable
by lokiare1 you still have to check for collision with the tiles. The most thorough way to do collision is to check to see the location of each visible pixel of a sprite against every other pixel of every other sprite, then return a pointer to the sprite that is collided with. This would be very slow. The method I describe should be a slow and dirty working collision detection. If I'm wrong please tell me how I'm wrong.
This is the part i am having trouble imagining(I like to make sure things work in my head before I try it out that way I dont hop to something random) I have spent a few amount of nights sitting in the shower trying to think of a way or it to check if something was there
Im thinking of something that presets that tile x,y is solid so if a solid object is infront of it dont move else move Im working in my post >.>
if (osl_keys->held.down)
{
if (y+1 == bush=>y)
{
sprite_march = 4;
SpriteAnimate();
else
{
sprite_position = DOWN;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y += 16;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y += 16;
}
But then again how would i be able to shorten the amount of code by just asking (y+1 == solid) im not sure how to go about that