Computer Science Canada

Off screen only

Author:  andrew. [ Mon Jun 09, 2008 6:57 pm ]
Post subject:  Off screen only

I have a quick question:

I am making a sniper game and I have it fade out when your mission is over. The problem is that it doesn't fade properly because I have offscreenonly turned on. When I turn it off, my game flickers a lot. How can I make the fade out work?

BTW, I used the Pic.DrawSpecial command in Turing 4.1.

Author:  Dan [ Mon Jun 09, 2008 8:49 pm ]
Post subject:  RE:Off screen only

It would help to see your code or at least the fade out part to see what is wrong and how you are doing things.

Are you calling the update method?

Author:  Zampano [ Mon Jun 09, 2008 9:29 pm ]
Post subject:  Re: Off screen only

You can use "offscreenonly" and "nooffscreenonly" at any point in your program, multiple times.
It's probably not the of 'habits', but you'll really never need to do such a thing again, so does it matter?

Author:  riveryu [ Mon Jun 09, 2008 11:04 pm ]
Post subject:  RE:Off screen only

Make sure you delay after you update, sometimes these mistakes screw up stuff.

If you just have pictures for absolutely everything, you can declare them all sprites and never clear screen. I just love sprites.

Author:  Dan [ Tue Jun 10, 2008 12:46 am ]
Post subject:  Re: Off screen only

Zampano @ 9th June 2008, 9:29 pm wrote:

It's probably not the of 'habits', but you'll really never need to do such a thing again, so does it matter?


Good programming habits are allways a postive thing, and he still might geting a flickery fading if he sets it to nooffscreen. (I could be wrong tho, i would need to see the code).

Author:  andrew. [ Tue Jun 10, 2008 3:50 pm ]
Post subject:  RE:Off screen only

Zampano's idea of nooffscreen worked. I didn't know you could do that. I was putting this:

Turing:
setscreen ("graphics:640;480,nobuttonbar,offscreenonly")
to
Turing:
setscreen ("graphics:640;480,nobuttonbar")


Thanks.

Author:  Zampano [ Tue Jun 10, 2008 4:19 pm ]
Post subject:  Re: Off screen only

Dan @ Tue Jun 10, 2008 12:46 am wrote:
Good programming habits are allways a postive thing, and he still might geting a flickery fading if he sets it to nooffscreen. (I could be wrong tho, i would need to see the code).

I know to follow the correct habits, but I'm just really tired of having books tell me how I should do things when their own code involves some of the most dubiously effective complication I've ever seen.

Right now I'm supposed to be making a QBasic survey, but I couldn't stomach the possibility of dozens of PRINT lines, so now, because of good habits, I'm having to learn file I/O. Isn't it just fantastic?


: