Computer Science Canada

pictures and cls

Author:  pavol [ Fri Jan 20, 2006 11:03 am ]
Post subject:  pictures and cls

is there any way to cls everything on the screen besides something like a background pic. i'm starting on a game, i draw a background pic and the user controls this guy on it. the only problem is that this makes the game very very slow cuz i have to redraw the background pic every time. so is there any way to cls, keep the background, and redraw the user guy in the new position? Hit Wall
any help appreciated

Author:  sylvester-27 [ Fri Jan 20, 2006 11:17 am ]
Post subject: 

could u post the code please. It'll make it easier.

Author:  do_pete [ Fri Jan 20, 2006 11:19 am ]
Post subject: 

Well according to the manual picXor should do the trick ... but it doesn't so I don't think you can do it.

Author:  Albrecd [ Fri Jan 20, 2006 11:38 am ]
Post subject: 

How is picXor supposed to do that? I never could make any sence out of it...

Author:  do_pete [ Fri Jan 20, 2006 11:45 am ]
Post subject: 

There is something about that in [Turing Tutorials]

Author:  Prognosis [ Sat Jan 21, 2006 11:20 pm ]
Post subject: 

in your loop, whenever you want to do a cls, just draw all of the graphics over again for your backround.

Author:  codemage [ Mon Jan 23, 2006 1:22 pm ]
Post subject: 

Noo... use Xor. Wonderful Xor.

Draw OVER your on-screen objects with Xor.
This erases them, but leaves the background layer.
You can then re-draw the objects in their new positions.

Shake-rinse-repeat.


: