bbCreateSprite and bbLoadSprite parents problem

Archives Forums/Blitz3D SDK Programming/bbCreateSprite and bbLoadSprite parents problem

Mahan(Posted 2009) [#1]
Hi!

I'm having a problem where the parent parameter of both bbLoadSprite and bbCreateSprite functions don't seem to work.

If I omit the parent in these calls and do a call to bbEntityParent(sprite, parent) right after both these two calls everything seems alright. I use this as a workaround for the time being.

Does somebody recognize this problem?

I work with latest beta from svn with the provided PureBasic wrapper. Lastest PureBasic (v4.30)


marksibly(Posted 2009) [#2]
Hi,

Seems OK here.

I added this to the teapot sample after the teapot is created...
sprite=bbLoadSprite( "../../samples/BlitzMax/mak/castle/sprites/bluspark.BMP",1,teapot )

...and this in the main loop...
  If bbKeyDown( #KEY_A )
    bbMoveEntity(teapot,0,0,-0.1)
  EndIf
  If bbKeyDown( #KEY_Z )
    bbMoveEntity(teapot,0,0,0.1)
  EndIf

...and the sprite moved 'with' the teapot as expected.


Mahan(Posted 2009) [#3]
Hi Mark!

Just wanted to say that I haven't been trying/verifying anymore with sprites. The thing was that i got a real noticeable lag in my app already at 100 sprites on my Laptop (Nvidia Quatro NVS 140M) and after checking the B3D forums for clues I decided to use custom quad meshes instead to make my own sprites, and reducing the number of surfaces.