Nice
Nice
thank you, thank you, thank you very much ^_^
Code:#if _emo #define stereo_type_i_dislike #endif
Why d'you need that timer anyway?
Its just so that it can go up until you press a key, instead of pausing the program and waiting for input
Code:#if _emo #define stereo_type_i_dislike #endif
What are you making with the timer?
It's something like:
Code:#include <stdio.h> #include <conio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int microcounter = 0; int counter = 0; int x; while(!kbhit()) { microcounter += 10; if(microcounter == 1000) { counter++; clrscr(); printf("%d",counter); microcounter = 0; } sleep(10); } return 0; }
Last edited by Brian; 02-23-2002 at 11:55 PM.
Thank yoo.. I will try implementing it.. It would be great if some one could modify my source to stop the freezing stuff and post it here. So that we can get a better idea.
I don't have BGI on my compiler.
Well i have got another doubt.. THe misile cursor keeps moving from left to right in the bottom screen. Instead of that i want that to be positioned in the middle and only the angle of the cursor should change while shooting. I tried doint this. I kept the value of x and y axis of the bottom point of the cursor a constant. but i could not generate values for x and y for the above point of the cursor so that when it move the cursor make a perfect arc. ANy idea...
You mean so it rotates instead of sliding?
I've been trying to do that with one of my games, I'm not sure how yet, but it's more complicated than it seems.
Ok i want the cursor to move in an circll. With one of it's end fixed.. How do i do it..
Thats matthy and complicated.
I'm still trying to figure it myself.
Ok i got it but what is the HEX value for the up and down arrow key.. I have the hex value only for left and right
to find out, do this:
run it, and press any key and it's ascii code will show up on screen.Code:#include <stdio.h> #include <conio.h> int main(void) { int i; while(i != 'q') { i = getch(); printf("\n%d",i); } return 0; }