Sprite System?

BlitzMax Forums/BlitzMax Beginners Area/Sprite System?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Args ... german -> english error ^^

I use matrices to cut down the amount of calculations drastically, as scale and rotation can be combined and rotation offsets can be easily pushed through by vector matrix operations.
As it is 2D, you can even optimize the matrizes to a 2x2 for scale & rot + a 2x1 vector for position.
Another pro of the matrix approach is that you actually can store an internal and a global matrix and only need to recalculate it if something has changed on this object or the parent if it uses parent transformation.
Plays out very usefully if an object is added to a part of the hierarchy and not at its end or you want it to ask for the local coords of a child instead of the global ones or vice versa ...
But I'm sure yours uses similar optimations without using this :)