Sprite Surface Alternatives?

I used to use Realbasic in the past and it had this great sprite surface control. It no longer exists however :(, I was curious what alternatives there are to this now?

I need something that can set framerate(steps), allow placements of backgrounds, and tiles. Hopefully the ability to be able to rotate the images on the tiles. Any ideas?

You might try SuperSpriteSurface: http://www.tinrocket.com/superspritesurface/

I saw that, does that still work with Xojo though?

Indeed it does. I’ve just downloaded it, loaded the demo apps and ran them without issue.

Not in Cocoa

Ah… if it doesn’t work in Cocoa that is a big issue. I’ve been studying the 3d tutorials over at xojo3d.com, been pretty useful for learning openGL since I have to create this from scratch. I’ve learned how to finally load textures onto a face of the cube by mapping UV coordinates to vertex points, pretty interesting. I got rotating working with Quaternions now although… I don’t really understand them that well. I think the next step is taking what I’ve learned with openGL and drawing just 2D faces and putting textures on them in a grid to simulate sprites in a 2D enviroment and perhaps just set the camera to look down on it? Will this cause any weird perspective issues? If I wanted to truly simulate 2D what would be the field of view? Right now I have 60.

Joe, if you want to render 2D graphics using the 3D OpenGL API, it is probably best to set up orthogonal projection.

Here is a nice website that shows you how to set up OpenGL for 2D graphics.

2D graphics with OpenGL

The whole idea is pretty much the same than 3D, except that you now only work with the X and Y coordinates and ignore the Z coordinate.

They become easier the more you use them :wink:

I was going to originally do this in 2D but I’ve been experimenting with kind of a 2D/3D look/feel for the game if I can pull it off. If it winds up being too difficult to figure out I may do what you said and just try an orthogonal projection and keep this to 2D.

I’ve got lots of reading to do it seems. Thanks for all the links.

Oh, and I get quaternions actually pretty well now. I read up a lot on it. Apparently the guy who created it (William Rowan Hamilton) took him 10 years to figure that technique out and was mostly unused until the advent of computer technology and 3D graphics. It’s a pretty useful tool for describing the rotated state of any object. Furthermore if you wanted to quickly be able to figure out an objects new rotated state, you multiply it by a quaternion representing a rotation by which you want to rotate and just multiply the two quaternion (rotation states) together and you will have the new rotation state (in quaternion form). Then you just convert the new quaternion back into Euler space for openGL (if I understand that correctly) , pass the arguments needed to the glRotate command and wha-la, the object is rotated.

It’s still confusing how the math actually works, but I get what it’s doing at least.

I can run the compiled demo app for SuperSpriteSurface just fine – and it gave me great hope I could use it in my app. But I can’t get the source version of the demo to run at all (using RS 2011 4.1).

Has anyone here tweaked it enough to make it work?



PS - What I’m looking for is a control that allows me to include multiple graphics in it and then move them around via the mouse. One of the demos in SSS does almost that exact thing, so it’s close to what I need.