Half-Life Bullet Decals

Blitz3D Forums/Blitz3D Beginners Area/Half-Life Bullet Decals

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.


If the holes disappear, they must be sprites.

I think the easiest way to go about the hole sprites is to make an array of a suitable size (you can probably go up to some thousands). Stuff it up with handles for these sprites and then use them, starting out at one end. When you have used them all, go back to the first one. That way you will always use the oldest hole.


Why not use Types?

e.g.

Type Decal
Field X_Location
Field Y_Location
Field Z_Location
Field Fade_Time_Left
Field Decal_Sprite
End Type


This way, the 'array' size will match the number of decals you have, conserving some memory, and requires little maintenance. Also, they can be recycled simply.

I used a similar effect previously with my spaceship project, and had animated sprites that appeared on collision of lasers and structures. Worked okay with hundreds of them.