Using the sprite control

Blitz3D Forums/Blitz3D Programming/Using the sprite control

SkyCube(Posted 2006) [#1]
Hello everyone,

Has anyone used the Sprite Control? It's an include file that adds 2d like functions to works with sprites in 3D. I am having a little problem using it. I am using a 2D image as background. CameraClsMode is set to False, True (don't clear video buffer) so the image won't be erased. However, when I use Sprite Control's functions to display a sprite, a dialog box to be exact (which is supposedly drawn in front of the camera, sometimes it's not drawn, or only the text appears, or only the dialog appears. Here is my dialog function called from the main loop:
Function ShowDialog(msg$)
  dlg_sprite = LoadImage3D("dialog_bg.png") ;dialog box background
  message = Text3D (0,200,msg$) ;message text entity 
  DrawImage3D dlg_sprite,0,200
  EntityAlpha dlg_sprite,0.5

  ;dialog loop 
  While 1
  UpdateWorld
  RenderWorld 
  Flip
  If KeyDown(57) ; spacebar
    FreeEntity message
    FreeEntity dlg_sprite
    Exit 
  End If
  Wend
End Function


What am I doing wrong? Thanks.


kfprimm(Posted 2006) [#2]
where can one find this Sprite Control include?


Pinete(Posted 2006) [#3]
I remember to have some problems when the sprite size, width as well as height didn't power of two.
Be sure you update your "spritecontrol sprites" before your renderworld...
And take a look if you don't need any extra parametres to define some behaviour or state of your sprites...
Sorry for the lack of information but I used spritecontrol many time ago and I remember to abort its use because some problems freeing sprites and similar stuff...
I use now nsprite, free version, it's more stable than spritecontrol.

good luck and regards,