-
Notifications
You must be signed in to change notification settings - Fork 1
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
entity._tile_cross() doesn't work on entities bigger than a tile #138
Comments
I made an entity that is 36 pixels tall and am seeing some odd behaviors:
|
Found an issue. When an entity is being drawn, the (entity.x, entity.y) coordinate represents the top-left corner of the bottom tile where the entity is standing. This is how tall entities were originally envisioned. All entities would have a 1×1 tile base but their graphics could be taller and that would cause them to appear tall. (The specific code here is the code that revolves around the But inside They disagree! |
Let's separate the concepts of entity size and entity graphic size. All entities are 1×1 tile in size. We'll handle big and small entities in #91. For now, an entity's graphic, which can be of any size, is anchored to the bottom center of the entity and can extend up, left, and right from the entity. This is an expansion of the tall entity concept. It keeps compatibility with the current player.png sprite. |
I had already assumed the problem with tall entities. Let's go ahead and do what you just said. |
I think #137 will fix this issue, too. |
With pixel mode tile collision, do entities actually always collide with the center of the tile, or will a really wide or really tall entity collide in the wrong place? We have only tested with entities about the size of a tile.
A FIXME comment has been added to the function.
The text was updated successfully, but these errors were encountered: