|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1090 |
moving image |
le 09/02/2005 @ 04:13 par 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
Réponse n° 1 -------- le 09/02/2005 @ 14:25 par Lugato
visiteur |
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
Réponse n° 2 -------- le 09/02/2005 @ 19:52 par Leonard Zajaczkowski
visiteur |
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
Réponse n° 3 -------- le 10/02/2005 @ 16:11 par Justin
visiteur |
thanks for all the information. I will give it a try this weekend. best wishes JC |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|