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

MapObject::Move is incorrect #21

Open
fallahn opened this issue Oct 19, 2014 · 3 comments
Open

MapObject::Move is incorrect #21

fallahn opened this issue Oct 19, 2014 · 3 comments
Labels
Milestone

Comments

@fallahn
Copy link
Owner

fallahn commented Oct 19, 2014

moving the points as well as the centre point adds up to double the movement (the points are supposed to be relative)

@fallahn fallahn added the bug label Oct 19, 2014
@fallahn fallahn added this to the 2.0.0 milestone Feb 8, 2016
@fallahn
Copy link
Owner Author

fallahn commented Apr 2, 2016

A potential fix for this has been pushed to the 'next' branch.

@astewartau
Copy link

Using the 'next' branch, I still have issues with both MapObject::move() and MapObject::setPosition(). See this video for demonstration

Is there a workaround for this?

@fallahn
Copy link
Owner Author

fallahn commented Oct 12, 2016

The best approach in this case would probably be to separate the map parsing from the entity building/image rendering as much as possible. This is a lessoned I learned when implementing a tmx parser (which supports much newer revisions of the format) for my game engine project. It might be best to use the map loader to parse the iniital map object data, such as size, position, type etc. and then use that data to create your own custom transformable entity, tailored to your game. If using the map loader seems a bit convoluted for this, then the linked code should be extractable with a little work (mainly to remove engine specific factory functions), and can be used to parse map data from xml to a series of structs/arrays which mirror the data layout of a tmx map. Then this data can be used as needed to develop your own entities, drawables and so on.

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

No branches or pull requests

2 participants