…it’s the best thing ever!
We left with me trying to come up with an alternative approach to handle the rotation problem because rotating first and centering later was a mess because of rounding errors piling up.
We also talked about bounding boxes.
So, the good news is that the new approach – it works.
It is definitely better than the other approach, compare:
The old & ugly one is left, the new and pretty one is right.
Even better, you can zoom as much as you want and it will stay perfectly centered instead of wandering around.
It’s actually good enough to play the J.U.L.I.A. Greenlight demo, ladies and gentlemen:
See those rays? Those are rotated & scaled sprites. Yay!
Just wait for the patch to be merged (or for some horribly bad showstopper to pop up), download the demo here and see for yourself.
How did I do it?
Well, we are talking about it in two blog posts:
- Rotation made stupid
- Interpolation made stupid
Now, the only problem with it is that it’s rather slow.
Well, not “with it” (even if the interpolating code could do with some optimization), but with the whole of the GFX/rect subsystem.
Something I’ll tackle on the the second half-term, I guess.