Author |
Message |
pavol
|
Posted: 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?
any help appreciated |
|
|
|
|
|
Sponsor Sponsor
|
|
|
sylvester-27
|
Posted: Fri Jan 20, 2006 11:17 am Post subject: (No subject) |
|
|
could u post the code please. It'll make it easier. |
|
|
|
|
|
do_pete
|
Posted: Fri Jan 20, 2006 11:19 am Post subject: (No subject) |
|
|
Well according to the manual picXor should do the trick ... but it doesn't so I don't think you can do it. |
|
|
|
|
|
Albrecd
|
Posted: Fri Jan 20, 2006 11:38 am Post subject: (No subject) |
|
|
How is picXor supposed to do that? I never could make any sence out of it... |
|
|
|
|
|
do_pete
|
Posted: Fri Jan 20, 2006 11:45 am Post subject: (No subject) |
|
|
There is something about that in [Turing Tutorials] |
|
|
|
|
|
Prognosis
|
Posted: Sat Jan 21, 2006 11:20 pm Post subject: (No subject) |
|
|
in your loop, whenever you want to do a cls, just draw all of the graphics over again for your backround. |
|
|
|
|
|
codemage
|
Posted: Mon Jan 23, 2006 1:22 pm Post subject: (No 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. |
|
|
|
|
|
|