TNT Basic Forums > Bugs!
Sprite priority and grain
< Last Thread     Next Thread >
Thread        Post A Reply

03-29-2003 01:18

Posted by:

Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

1- Sprite priority is obviously not working as it should. There's my code:

sprite 2,x,y,0
set sprite priority 2,-5
sprite 3,xx,yy,1
set sprite priority 3,200

and sprite 3 gets under sprite 2!!!

2- I started developping a parrallax game ( using sprites instead of tiles ) and so I need to make some area transparent. I use Copy Image to separate the tiles, but this operation seems to add grain, because the color mask doesn't work properly! I cheacked many times in Photoshop, and I'm sure there was NO GRAIN AT ALL.

03-29-2003 08:08

Posted by:

Click Here to Email Machi   Find more posts by Machi

I can't comment on the sprite priority issue. What you have sone appears to be correct, and I'm assuming that you don't have a "sprite off" or anything that is re-declaring the sprite.

However the colour mask / grain issue may relate back to the colour depth and type of image. I think that this is quite a different problem to the 256 colour and indeed, the 2 colour bugs that have been reported here.

1) If you are using jpegs then black isn't necessarily black
2) You should probably change the colour depth of the images to "thousands" before using in the program and before compressing if you are not using graphics hardware mode. Sometimes, although black is often the best colour for a color mask, it is better to use another colour that is not present in your image. Overall, it is better to use a proper b&w image mask than using the simpler colour mask and edges are a lot cleaner. I'm relatively sure that this will solve your problem.

03-29-2003 10:03

Posted by:

Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

About the sprite priority:

You should set sprite priority before you "sprite" the sprite. Second, every time you "sprite off" you loose all information on sprites (including priority).

About the grains, I had that to: it happens 'cause saving in jpeg medium quality the black aroud the borders of the objects becomes dark gray, so it is read by the mask detector not as black mask, but gray object

06-01-2003 07:08

Posted by:


Click Here to Email eekaydee   Find more posts by eekaydee

I was also having problems with priority, but I think I found my problem: setting a sprite's priority to the priority it's already at makes it go funky...

'put a sprite in canvas 1 (without setting its priority, so I 'assume it has the default priority of 0)
'set sprite 2 on top of first sprite, with priority 100

draw frame
wait mouse down

set sprite priority 2,100
Draw frame

when this code is run, sprite 2 appears on top of the first sprite, as expected. However, when the mouse button is pushed down, sprite 2 goes behind the first sprite.

06-04-2003 23:55

Posted by:


Click Here to Email eekaydee   Find more posts by eekaydee

Am I right?

06-08-2003 20:41

Posted by:
Mark Tully

TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully


I've not seen this before. I've made a note of it and will look into it properly soon.



All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.