Weather / Spam / www |
Lyon Weather
aldweb against spam
|
|
|
|
|
|
|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1090 |
moving image |
09/02/2005 @ 04:13 by justin cooper
|
in the game i am developing it is a lunar lander type game where you have thrusters to move a rocket around, the problem is when i move the image it leaves little bits of the image behind. any suggestions |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 09/02/2005 @ 14:25 by Lugato
visitor |
Justin this is normal because the image isn´t a sprite.
Exist many forms to simulate a sprite in the screen .. the more easy is redraw all objects in the screen, background too. The problem whit this is a very use of CPU = slowww :(
To obtain more speed is necessary redraw only the area of the image (x1,y1,x2,y2) and put the image over this redrawed area.
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 09/02/2005 @ 19:52 by Leonard Zajaczkowski
visitor |
One way you can remove the image is to use the boxfilled command. Set the color to your background and then use boxfilled to draw a box, same pixel size as your image, at the same coordinates as your image. This will blank the spot your image was in and you can put the image in a new location. You would have to do this every time the image moved, unfortunatly, the side effect might be a flashing image.
An other way, would be to create a second image, exactly the same as the first, but, color the lunar lander the background color of the game. Then place this image over the first image to get the same results as the boxfilled solution. The plus side of this method, if you are using transparencies for your image they will stay intact.
Hope this helps... Leo |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 10/02/2005 @ 16:11 by Justin
visitor |
thanks for all the information. I will give it a try this weekend. best wishes JC |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|
|
|
|
|