Sprites?
Re: Sprites?
The term you are looking for is "billboards", as in a 2d image that is drawn at a 3d location always facing the camera.
There is not a billboard object in V2. There may be something you can do in V3 using the lua scripting interface.
You can define a mesh that is a rectangle that is "standing up" that has your image on it but it will look like a line when viewed from it's edge.
There is not a billboard object in V2. There may be something you can do in V3 using the lua scripting interface.
You can define a mesh that is a rectangle that is "standing up" that has your image on it but it will look like a line when viewed from it's edge.
JeffM
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: Sprites?
In case you are indeed referring to sprites, they are possible with the "texsize" option and using texturematrices.
Re: Sprites?
sprites are a 2d screen aligned image. The texture size matrix will simply allow you to scale a texture on a object. It will not make it always face the screen, and the object will still exist in 3d space.
JeffM
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: Sprites?
In my understanding a sprite is a texture thats got multiple textures on it. Like four 500x500 textures on one 1000x1000 image or similar. Like the missile.png or explode1.png or explode2.png from BZFlag's data folder.
Re: Sprites?
That is not a traditional definition of a sprite. Technically the shots are animated billboards, they always face the screen. The fact that we shove more then one frame of animation into the same image is simply an optimization.
In order to benefit in the way the poster suggested, using images instead of geometry, you would need a screen aligned image. For example as it would be simple to use a billboard (2d image) of a ball instead of a round ball shaped mesh. The billboard would draw using 2 triangles and the geometric ball would draw using many many more. For simple shapes this can be a huge savings in drawing speed.
Traditionally a sprite is defined as a bitmaped graphic used as part of a scene. It is a valid request to ask if the bzflag engine supports them.
http://en.wikipedia.org/wiki/Sprite_%28 ... raphics%29
In order to benefit in the way the poster suggested, using images instead of geometry, you would need a screen aligned image. For example as it would be simple to use a billboard (2d image) of a ball instead of a round ball shaped mesh. The billboard would draw using 2 triangles and the geometric ball would draw using many many more. For simple shapes this can be a huge savings in drawing speed.
Traditionally a sprite is defined as a bitmaped graphic used as part of a scene. It is a valid request to ask if the bzflag engine supports them.
http://en.wikipedia.org/wiki/Sprite_%28 ... raphics%29
JeffM
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: Sprites?
Maybe use the drawinfo animation technique I have used? Apply the multiple images to a plane, and use a set of dyncols to modulate the transparency.
It's pretty easy to do, once you know how. Contact me via PM.
It's pretty easy to do, once you know how. Contact me via PM.
Take a look at my Defender game mode concept.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.