-
Notifications
You must be signed in to change notification settings - Fork 163
Pixel inaccuracy #7
Comments
Also, as it seems the cos transform is just way off. It seems a cause of the |
Written some code that corrects the transforms (round down the From 225 tiles up, it starts to do the same over again, because of the |
Originally I had a basic isometric projection implementation, however it only worked for pixel art style isometric projection. The newer, more complex approach correctly projects, however I have a feeling that maybe the accuracy of JavaScript's |
Ah, that sounds like a logical explanation I didn't think of yet! Awesome! The projection is somewhat correct as you could see in the first image, with some corrections it's already way better for med-size maps. I could go that road if you'd like? :) |
The alternative may be to try the old projection code - the commit where this changed is here: 01819fe |
Is this still an issue? I don't notice any pixel issues. Screen shot of http://rotates.org/phaser/iso/examples/interaction.htm |
As far as I'm aware this is still an issue (certainly there has been no further work on it) though maybe some of Phaser's recent changes could have fixed the rounding errors? |
I had the same kind of issue. If I understood well (and I'm not sure I did):
In the plugin, the projection values are computed with cosinus & sinus of the
... which does internally (in haser.Plugin.Isometric.Projector#projectionAngle):
... and results in:
To fix it, I bypass it by setting manually the values stored in the (private) variable '_projector' with a hardcoded 2:1 factor (actually 1.0 : 0.5):
The result looks better: Hope it helps ! Note: you'll find below the tile sprite used in my examples (a 64x32 tile): |
There seems to be an issue that as far as I can tell is not related to the projector which is causing awkward and inconsistent rounding of pixel art. The problem may be related to anchors (both sprite and the projector offsets) the dimensions of the assets used, screen positions or some combination of all of these factors.
The text was updated successfully, but these errors were encountered: