I am considering making an addon for PB, but I am not sure if there would be much interest in it.
The PB Graphic command set appears to be popular, but one area which it does not touch are sprites.
What is a sprite ?
To create animation in a graphic window can be difficult, especially if one must constantly redraw the image to produce the animation.
The term sprite dates back to the old days (remember the Commodore 64?), where the computers hardware could store small images called sprites, which could be moved over the background window. The advantage of a sprite is two fold. One is the sprite can have transparent pixels. Two the sprite was not actually drawn on the background image. The hardware actually combined the sprite image and the background image on the fly, so they appeared like they were drawn together, but you never had to redraw the background (unless the background changed), but only needed to move the position of the sprites,
EZGUI 4.0 Pro already has a Sprite engine, but I am considering making a version just for DDT's Graphic command set. You would be able to create, show/hide, move, animate (multiple frames), flip, anti-alias and alphablend the sprite images directly onto a PB Graphic control (which is technically a ownerdraw static control). You would not need to modify the background. The sprite engine would merge the background and the sprites for you on the fly.
So the question is:
Would there be sufficient interest in a sprite engine just made for the PB Graphic control ?
Some details:
The sprite engine would not be dependent upon any high level graphic engines in Windows, such as DirectX, OpenGL, GDI+, etc. This means it would run on Windows 95 to Vista.
The following commands would most likely be supported:
EZ_InitSpriteBuffers (initializes the sprite engine and buffers)
EZ_DefSpriteByPict (creates a sprite based on a standard bitmap)
EZ_FreeSprite (frees and existing sprite)
EZ_AssignSprites (assign a group of sprites to a Graphic control)
EZ_ShowSprites (show a group of sprites)
EZ_MoveSprites (move a group of sprites)
EZ_SetSpritesFrame (selects current animation frame for a group of sprites)
EZ_SetSpritesEfffect (sets the alphablending effect (0 to 100%) for group of sprites)
EZ_SetSpritesFlip (sets the horizonal and/or vertical flip state of a group of sprites)
EZ_GetSpriteXY (get position of a sprite)
EZ_TestSpriteClick (tests a coordinate position of a click to see what sprite gets the click)
EZ_GetSpriteFR (get a sprites maximum and current frame)
EZ_GetSpriteWH (get a sprites width and height for a single frame)
EZ_GetSpriteST (get a sprites current state such as flip, effect, etc.)
EZ_SwapSpriteOrder (swaps the zorder of two sprites)
EZ_TestSpriteColl (test sprites for collision)
Another question is ...
Would there be interest in a non-PB Graphic control version, so it could work with other types of graphic windows ?
Lastly, the price would be very reasonable (not sure of the price yet, but possibly in the $50 range).
The PB Graphic command set appears to be popular, but one area which it does not touch are sprites.
What is a sprite ?
To create animation in a graphic window can be difficult, especially if one must constantly redraw the image to produce the animation.
The term sprite dates back to the old days (remember the Commodore 64?), where the computers hardware could store small images called sprites, which could be moved over the background window. The advantage of a sprite is two fold. One is the sprite can have transparent pixels. Two the sprite was not actually drawn on the background image. The hardware actually combined the sprite image and the background image on the fly, so they appeared like they were drawn together, but you never had to redraw the background (unless the background changed), but only needed to move the position of the sprites,
EZGUI 4.0 Pro already has a Sprite engine, but I am considering making a version just for DDT's Graphic command set. You would be able to create, show/hide, move, animate (multiple frames), flip, anti-alias and alphablend the sprite images directly onto a PB Graphic control (which is technically a ownerdraw static control). You would not need to modify the background. The sprite engine would merge the background and the sprites for you on the fly.
So the question is:
Would there be sufficient interest in a sprite engine just made for the PB Graphic control ?
Some details:
The sprite engine would not be dependent upon any high level graphic engines in Windows, such as DirectX, OpenGL, GDI+, etc. This means it would run on Windows 95 to Vista.
The following commands would most likely be supported:
EZ_InitSpriteBuffers (initializes the sprite engine and buffers)
EZ_DefSpriteByPict (creates a sprite based on a standard bitmap)
EZ_FreeSprite (frees and existing sprite)
EZ_AssignSprites (assign a group of sprites to a Graphic control)
EZ_ShowSprites (show a group of sprites)
EZ_MoveSprites (move a group of sprites)
EZ_SetSpritesFrame (selects current animation frame for a group of sprites)
EZ_SetSpritesEfffect (sets the alphablending effect (0 to 100%) for group of sprites)
EZ_SetSpritesFlip (sets the horizonal and/or vertical flip state of a group of sprites)
EZ_GetSpriteXY (get position of a sprite)
EZ_TestSpriteClick (tests a coordinate position of a click to see what sprite gets the click)
EZ_GetSpriteFR (get a sprites maximum and current frame)
EZ_GetSpriteWH (get a sprites width and height for a single frame)
EZ_GetSpriteST (get a sprites current state such as flip, effect, etc.)
EZ_SwapSpriteOrder (swaps the zorder of two sprites)
EZ_TestSpriteColl (test sprites for collision)
Another question is ...
Would there be interest in a non-PB Graphic control version, so it could work with other types of graphic windows ?
Lastly, the price would be very reasonable (not sure of the price yet, but possibly in the $50 range).
Comment