Skip to content

MapObject::Move is incorrect #21

Open
@fallahn

Description

@fallahn

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

Activity

added this to the 2.0.0 milestone on Feb 8, 2016
fallahn

fallahn commented on Apr 2, 2016

@fallahn
OwnerAuthor

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

astewartau

astewartau commented on Oct 12, 2016

@astewartau

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

fallahn commented on Oct 12, 2016

@fallahn
OwnerAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      MapObject::Move is incorrect · Issue #21 · fallahn/sfml-tmxloader