CanvasSprite
Author: David Newberry
Price: <free>
Download:
cafe.realbasic.com (Hotline)

  In last issue's cover story on new DR2 features, I mentioned the new SpriteSurface. As some readers (including CanvasSprite's author) have pointed out though, I failed to mention how horrid the new SpriteSurface really is.

  If you tried to run the sample that was provided however, you would have found that it ran extremely slowly. Unfortunately, even if you change the SpriteSurface's frame rate, it's still equally slow. This is because the new SpriteSurface automatically detects the maximum number of frames per second it can acheive, and then switches its speed to that. You have absolutely no control. And, as many an aspiring game programmer who has used DR2 will tell you, it stinks.

  David Newberry, the author of CanvasSprite, is one such person. However, unlike most others, he decided to do something about the situation. CanvasSprite, an open source canvas subclass, was the result.

  CanvasSprite attempts to mimick the SpriteSurface in every way it can. The result is an easy transition from a SpriteSurface to CanvasSprite for almost all programs. It has its own special Sprite class, and it uses the same events and methods (NextFrame, Collision, KeyTest, etc.) as the SpriteSurface. Though it doesn't support the new DR2 features for the SpriteSurface (tiles), it doesn't really need to. And, perhaps most importantly, it gives you total control over the frame rate. However, even with all these great features, there is one that stands out above all the others.

  People who have been using RB since DR1r31 (the last version before the name change) will remember how momentous the SpriteSurface's introduction was. Before this, creating games with any kind of animation was almost impossible using CrossBasic (as it was then called). What few may remember though, is that the REAL SW team said that they were "looking into allowing the SpriteSurface to run in a Canvas". Like many good ideas, this one hasn't been touched since. And that's where CanvasSprite comes into play.

  As you may have gathered by now, CanvasSprite can run in any canvas in any window. There's no need to black out the screen, and hide the menu bar. This allows the creation of significantly better games in RB. After all, the SpriteSurface made animation easy–but it was hardly practical for simple things. The CanvasSprite class is good for small things, and large things as well.

  CanvasSprite's goal is to mimick the SpriteSurface as closely as possible, and run in a canvas. And, thankfully, it succeeds in remarkable fashion.

 Pros: Lets you use sprites in a Canvas! Works exactly like a SpriteSurface. Very little flickering. Open Source.
 Cons: Slightly less speedy than the 1.x SpriteSurface. Doesn't support tiles.
Rating: 9.0
*****