With news of the new Sprite API maybe it’s the right time to push for those:
Even with a new sprite API I really think we need better acces to the polygons. Because thats wat its simply is. Everything in Corona for games are pretty much a bunch of quads. And even without shaders etc. Access to the standard Textured quads with fog and vertex color that all hardware supports as there lowest and quickest is almost a laugh that we can have full access to below the great functions above which corona gives us.
Sprite / Drawings objects vertex acess.
For each sprites/object “main”
Blending mode (more than the one we have)
Fog value
Tinting (better and clear way)
Additive tint
Tiling mode
Skew
Taper
HIGHER FUNCTIONS
Higher functions like gradient, skewing do stuff to the vertex x.y uv color fog etc. which is good for easy standard task and not so advance users and direct acess is for those who wants it.
* Blending modes
Come on, give us access to the standard all supporting blending modes. How hard can it be. Let the users themselves create “filters” like additive etc by just combining those. Or include some definitions of blending presents like “additive”
object.sourceblend = mode
object.destinationblend = mode.
* Tiling / Clamping.
object.tilemode = tile/clamp
Allow us to make cool zoom and scroll effect inside our objects.
* Tiling
object. xtiling = value
object. ytiling = value
* UV scroll
object.xscroll = value
object.yscroll = value
* Shearing-Skewing.
object.xskew = value
object.yskew = value
Good for quick animation effect. As this is very quick on a transformation matrix it should not affect performance at all.
* Taper
object.xtaper = value
object.ytaper = value
A little like skew, but can be used to “pinch” sprites. Both good for making “bouncy” animation and to produce “fake” 3D perspective.
* 2.5D / aka quad rotation around X and Y without a global vanishing point.
If those are put into code, it would probably be easy to add functions for X and Y rotation as well. (otherwise its easy for a user to write this up themselves)
* Tint
(We have it now through the “object:setFillColor()” but its do not feel consistence as we can set alpha with object.alpha)
object.tint = color
* Brighten
object.brighten = color
Like Tint but uses the additive vertex color instead (supported in hardware)
This is great to allow the object not just get darker with tint but brighter, used legendary on tons of games when you hit and enemy and it “flashes” up to white.
*Fog
fog = color
object.fog = value
Also just a value that blends the fog color into the sprite. Great to make object fade into darkness or other cool effects. Its totaly different FX than just tinting or brighten.
Those are the basic MUST HAVE functions for a sprite (along with correct masking) and we can be satisfied with this but not less. It has been supported since almost 20 years ago hardware so I think both Corona and the platforms can handle it.
Individual Vertex Access
Access the sprites ALL four coordinates - so people can play with animation, make perspective projection of the sprites etc. This would be wonderful!
For each sprites 4 corner (vertex)
X.Y position
UV
Fog
Color
Alpha
Additive Color
[import]uid: 37802 topic_id: 22703 reply_id: 322703[/import]