Quote: "I don't believe it was meant to be a "half-assed workaround". It was meant to be a genuine solution."
Well obviously just texturing a flat plane would not accomplish the desire to keep the retain the sprite's functionality (which you can read further up) intact, which means the solution BatVink provided would only accomplish part of what I have been talking about. I did not mean to offend anyone (sorry BatVink if I did, not my intention) but at the end of the day, it is what it is.
Quote: "The systems that detect 2D collisions are inherently not 3D."
Not so sure about that. I didn't write it, so I can't say for sure how AppGameKit works internally but my best logical guess is that AppGameKit collisions use box2D raycasting whether you are using physics or not...3d but on a 2d axis. They share the same collision shapes anyway. The fact you can use shaders on sprites, set alpha, set the color, and change the UV of the texture... I mean sprite image would also lead me to believe that sprites do exist in 3d space as textured planes but are confined on their z-axis (as I have already surmised above). This is just my best guess, if one of the programmers from TGC who knows for sure would like to set the record straight then that would be great, until then I will stick by this assertion, just thinking logically here and trying to put 2 and 2 together.
Quote: "To give you an idea of how complicated this actually is... First: Are you looking for physics collisions (i.e. a sprite bouncing off a 3D sphere) or just collision detection (i.e. if(spriteIsOver(sphereObject)==true))? And then there's the question of whether you want the collision to be detected when the sprite is visibly "over" the 3D object regardless of depth or... I don't even know what else."
So first I was thinking about something like:
integer GetSpriteCollision3DObject ( iSprite1, iObject1 )
So that would just give a detection if the sprite's shape collision makes contact with a 3d object's shape but you are right, doing that brings up a number of questions... and some actually pretty good ones at that. So you would have this problem for sure.. 2d sprites use a physics system based on box2d, the 3d system is suppose to eventually suppose bullet physics which I think would be nightmare to try and get them to work together and even if you could figure that out, you would always have to constrain the objects z-axis which would create presentation problems with the 3d object.
So as I am reading about this and giving it some more thought, since the whole idea resolves around a a couple of ideas..
1. Being able to use a 3D object in a 2D game to gain the benefit of the rotation and animation of a 3d object.
2. Maintaining the abilities of the 2D sprites including box2d physics.
3. Present the 3d object as a flat 2d-style sprite.
4. Detect collisions between 2d sprites and 3d objects.
So, after pondering this list for a while I am thinking there may be a different way to accomplish all these things. Why not provide a command to turn the 3d object into a 2d sprite?
SetObjectAsSprite ( iSpriteIndex1, iObjectID1 )
This would basically create a 2D sprite that would be textured with a flat 3d object and would be animated and rotated in 3d space using object's commands instead of a spritesheet but it would otherwise be treated as a sprite for the purposes of depth, collision detection, physics, movement, etc.
Also, using the command:
CloneSprite( iSpriteIndex1, iSpriteIndex2 )
Would clone the sprite (iSpriteID2) and would be textured with the exact same animation and rotation as iSpriteID1. To animate and rotate the same sprite object independently, you would just do this:
CloneObject( newobjID, objID )
SetObjectAsSprite ( iSpriteIndex1, newobjID )
I think this solves the issue by my reckoning anyway to achieve super smooth animation and rotation without having to use a ton of sprite sheets and would not require your whole scene to be rendered flat so you could still have background objects with depth.
Quote: "How do you actually expect these commands to work?"
Does this answer your question? I think I need a nap.
I love my Altair 8800 Replica.
http://altairclone.com/