-
Notifications
You must be signed in to change notification settings - Fork 73
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
Comments
Closed
ZaneDubya
referenced
this issue
Mar 14, 2015
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 / ?
Completed in 5753068. Will not merge until deferred rendering is done. |
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
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.
The text was updated successfully, but these errors were encountered: