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

New Entity/MapObject model. #24

Closed
ZaneDubya opened this issue Mar 13, 2015 · 2 comments
Closed

New Entity/MapObject model. #24

ZaneDubya opened this issue Mar 13, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@ZaneDubya
Copy link
Owner

Currently, the Map contains Tiles, which contain MapObjects. Each frame, each Entity adds (or updates?) its MapObject within the associated Tile. Then, on draw, the Tile draws all of its MapObjects.

The dual Entity / MapObject is unnecessary, and an artifact of my implementing Clint's XNA renderer (he used MapObjects, and I pretty much bolted on his code to the client without considering how to re-implement the way it worked to better fit the client's code).

Instead, each Entity should belong to/exist within one MapTile, and on draw, the MapTile should be able to ask the Entity for its 'EntityView' object, which describes how that entity should be drawn.

In short:
Old Model:
OnUpdate: Each entity creates a MapObject, which is added to Tile.
OnDraw: Tile draws all MapObjects.
New Model:
OnUpdate: nothing.
OnDraw: Tile requests a EntityView for each Entity within that Tile, and draws these EntityViews.

@ZaneDubya
Copy link
Owner Author

Noticed some weird rubber banding with new Position3D code. Probably introduced in f4d6bbf.

ZaneDubya added a commit that referenced this issue Mar 15, 2015
... although prerendering for mobiles doesn't work properly.

Issue #24, Step 8 / ?
@ZaneDubya
Copy link
Owner Author

Completed in 5753068. Will not merge until deferred rendering is done.

ZaneDubya added a commit that referenced this issue Apr 21, 2015
ZaneDubya added a commit that referenced this issue Apr 21, 2015
... although prerendering for mobiles doesn't work properly.

Issue #24, Step 8 / ?
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

1 participant