Computer Science Canada Flashiness during a process, more complicated than it sounds |
Author: | GOLDEN WEAPON [ Tue Jun 10, 2003 6:54 pm ] |
Post subject: | Flashiness during a process, more complicated than it sounds |
Ok in my game, there is a process for drawing and moving the enemies. The problem is that it doesn't run in time with my drawscreen (which draws the background, jets, stats, etc.), that has the View.Update in it. In the for loop that draws the enemies, it draws some of them, then the drawscreen procedure does View.Update and not all of them show up, this creates an overall flashy effect. Is there anyway to time the View.Updates in the drawscreen to it only View.Updates after all the enemies on the screen are drawn or something that would have that effect? Game attached. |
Author: | Andy [ Tue Jun 10, 2003 7:06 pm ] |
Post subject: | |
well first you have to set the screen to offscreenonly View.Set("offscreenonly") then you can View.Update what View.Update basicly does is that it takes everything on the offscreen and dumps it on to the viewable screen, and inorder to do that you have to set it to offscreenonly if you want the thing to not flash, draw the background, then draw ur moving objects, then View.Update |
Author: | Andy [ Tue Jun 10, 2003 7:09 pm ] |
Post subject: | |
and see homer, i do help... ![]() and naoki, i dun spam all the time, unlike u |
Author: | Mazer [ Tue Jun 10, 2003 7:10 pm ] |
Post subject: | |
"more complicated than it sounds"? ![]() |
Author: | Andy [ Tue Jun 10, 2003 7:30 pm ] |
Post subject: | |
hey nick, what did u get on ur game? |
Author: | Mazer [ Tue Jun 10, 2003 7:55 pm ] |
Post subject: | |
i don't know yet! why do people keep asking me?! ![]() actually, i have to wait until he reads the documentation and stuff before i can get a mark. normally he's supposed to read that before the interview but i wanted to do my interview during class so he said we should have it a few minutes later. i'll probably know tomorrow |
Author: | Tony [ Tue Jun 10, 2003 8:04 pm ] |
Post subject: | |
whats the point of drawing in a process? I mean, since View.Update is located in another procedure, it would have to wait untill process has finished... that just complicates things a lot more, and you dont gain anything from using it, over single/multiple procedures. |
Author: | GOLDEN WEAPON [ Tue Jun 10, 2003 8:21 pm ] |
Post subject: | |
Tony is the only one that will probably make it work. DT, I know about offscreenonly and View.Update and that shit, my problem was that in the process that the enemies were drawn in, it would draw the first few out of nine, then in the drawscreen procedure that was running at the same time, it would View.Update and only some of the enemies would be shown becuase only a few were drawn! So I have to put it in my drawscren procedure! So simple now lol. Is anyone going to that video game programming camp? |
Author: | GOLDEN WEAPON [ Tue Jun 10, 2003 8:44 pm ] | ||
Post subject: | |||
Actually, that didn't work either. DAMMIT!!!!!!! Argh, needed to get that out... Ok here are the chunks of code that apply to this,
Told ya it was more complicated than it seemed... |
Author: | Tony [ Tue Jun 10, 2003 9:54 pm ] |
Post subject: | |
turn the process into a procedure, and so that you dont get stuck with a delay, just use a timer with a flag variable. Keep on calling the procedure up untill the timer reads that w/e time has passed and the rest of procedure can be executed. Keep in mind that processes DONT run at same time as rest of the program. It fakes multitasking by randomly picking from which procedure to execute the next line. You're better off having a procedure. |
Author: | Andy [ Wed Jun 11, 2003 3:34 pm ] |
Post subject: | |
cause nick, ur gonna get like 150% on ur game |
Author: | GOLDEN WEAPON [ Wed Jun 11, 2003 3:44 pm ] |
Post subject: | |
ok that's helpful but how do I use a timer? |