Computer Science Canada Shooter game |
Author: | Thuged_Out_G [ Sat Dec 13, 2003 1:05 am ] | ||
Post subject: | Shooter game | ||
this program is really flickery, and the Pic.Draw doesnt seem to stay on the screen :S...as soon as i let go of the mouse, it goes away...any help please
|
Author: | drumersrule123 [ Sat Dec 13, 2003 1:28 am ] | ||
Post subject: | |||
i put a delay in front of the cls it slowed it down a bit but it didn't flicker that much here is the code
|
Author: | drumersrule123 [ Sat Dec 13, 2003 1:30 am ] |
Post subject: | |
you probbly don't want to use a delay over 250 |
Author: | Homer_simpson [ Sat Dec 13, 2003 12:02 pm ] | ||
Post subject: | |||
u forgot setscreen("offscreenonly")...
|
Author: | DanShadow [ Sat Dec 13, 2003 5:05 pm ] |
Post subject: | |
Yeah, when drawing the target over the mouse, "cls", then at the top of the loop, put: setscreen("offscreenonly") View.Update This stops the flickering, thats how I fixed my shooter. |
Author: | Thuged_Out_G [ Sat Dec 13, 2003 6:16 pm ] |
Post subject: | |
ok, all is good now...except when i draw the pic it doesnt stay on screen :S |
Author: | DanShadow [ Sat Dec 13, 2003 6:33 pm ] |
Post subject: | |
Make an array the holds the (x,y) co-ordinates of all shots taken. But make sure that the game doesnt drag on too long, or the array will overflow, heh. |
Author: | Thuged_Out_G [ Sat Dec 13, 2003 7:14 pm ] | ||
Post subject: | |||
im not quite understanding what you mean, the cls in the shoot procedure just keeps getting rid of the pic
is that what you are talking about |
Author: | DanShadow [ Sat Dec 13, 2003 8:27 pm ] | ||
Post subject: | |||
There ya go. I added onto the code, so everytime it finishes the loop, it redraws a black oval (10*10) where ever you have shot before enjoy |
Author: | Homer_simpson [ Sun Dec 14, 2003 12:37 am ] |
Post subject: | |
bullshit!!!! very slow... just draw the picture everytime after cls... edit... NVM... i just read what you said |