Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile object Y coordinate not saved properly #386

Closed
AmzBee opened this issue Mar 14, 2013 · 4 comments
Closed

Tile object Y coordinate not saved properly #386

AmzBee opened this issue Mar 14, 2013 · 4 comments

Comments

@AmzBee
Copy link

AmzBee commented Mar 14, 2013

I'm guessing it's just an oversight, but if you create a new 32x32 tile object, set it's coordinates as 0,0 it'll disappear off the top (y) of the canvas by 32 pixels.

I'm sure it's something super simple like changing (rows * tileHeight) to ((rows-1) * tileHeight) or something :)

Aimee

@bjorn
Copy link
Member

bjorn commented Mar 14, 2013

It's not an oversight, but a feature. And I fully admit that it is a confusing feature. The registration point (or origin) of tile objects is their bottom-left corner. Once that is clear, it is obvious why a tile object at 0,0 will disappear off the top of the canvas.

Now that it is established that an origin at bottom-left for tile objects is in many cases confusing, there is the plan to make this configurable. I thought there would be an issue open for this already, but I can't find it now.

@AmzBee
Copy link
Author

AmzBee commented Mar 14, 2013

Thanks bjorn, I just wanted to make sure before I coded a permanent work around into our engine.

Aimee

@AmzBee AmzBee closed this as completed Mar 14, 2013
@gamedevsam
Copy link

It's interesting to note that when parsing objects, I only have to offset objects by their height (the origin in HaxeFlixel is top left), for objects that have a guid (an image). All other objects seem to be drawn in the right place.

@bjorn
Copy link
Member

bjorn commented Mar 15, 2013

@crazysam Yes, this issue is about tile objects only. And actually, you don't offset the objects by their height, but by the height of the tile image (tile objects do not have a size, currently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants