kissomos
30th Aug 2008 Sat, 11:02
pa tulong po ako sa pacman code..
kung pano po pagalawin c pacman...
sabi ng instructor ko eh parang dalawalg line na gumagalaw daw...
patulong po polzz
nupandu
30th Aug 2008 Sat, 13:31
panong pagalawin.. yung kusa gumagalaw o ikaw mismo ang kokontrol sa arrow key upang mapalumipat siya ng position.. just like in snake ba??
kissomos
30th Aug 2008 Sat, 21:59
ung kusa pong gumagalaw po!alm mo po ba?
prototype
30th Aug 2008 Sat, 22:43
delay(85000000); // Delay of the loop.
gotoxy (nSnakeX[0], nSnakeY[0]);
textcolor(GREEN);
cprintf("%c", SNAKE);
gotoxy (nSnakeX[nLength], nSnakeY[nLength]); // This erases the "trail" the snake leaves behind.
printf(" ");
for (i = nLength; i >= 1; i--) // Passing of values on the array. This means that the value of nSnakeX/Y[6] will be equivalent to the value of nSnakeX/Y[5] and so on. So nSnakeX/Y[1] would be equal to nSnake[0] and that makes the body of the snake.
{
nSnakeX[i] = nSnakeX[i - 1];
nSnakeY[i] = nSnakeY[i - 1];
}
if ( kbhit() )
{
nDir = getch();
if (nDir == 0)
nDir = getch(); // Detects arrow key input.
}
switch (nDir2)
{
case UP: nSnakeY[0]--; break;
case DOWN: nSnakeY[0]++; break;
case LEFT: nSnakeX[0]--; break;
case RIGHT: nSnakeX[0]++; break;
}
Sana makatulong yan... Yan yung code ko para sa snake program ko, binago ko lang ng konti para magmukhang pacman. Ikaw na bahala sa variables. :lol:
kissomos
3rd Sep 2008 Wed, 19:11
need ko po sa may c++ po xa gawin..plsss po
lamentation25
4th Sep 2008 Thu, 19:29
salamat po!
just hit http://symbianize.com/images/colortheory/buttons/post_thanks.gif
na lang bro...
goldy...hahahaha
musta stay dito???:lmao:
kissomos
4th Sep 2008 Thu, 20:23
gwapo!!!hehehe madi d apay met naited ajay birbirukek..sabali ajay inted da iddi
lamentation25
5th Sep 2008 Fri, 19:27
bro...filipino lang para maintindihan tayo ng nakakarami...:lol:
wait ka na lang, daming magagaling dito...
ako kasi wala akong alam sa c++ eh..
c-- pwede pa...:lmao: