Feature/ninja convert tiledmap slopemap takes tilset indices#24
Open
winstonwolff wants to merge 4 commits intoenglercj:masterfrom
steveandkate:feature/ninja-convertTiledmap-slopemap-takes-tilset-indices
Open
Feature/ninja convert tiledmap slopemap takes tilset indices#24winstonwolff wants to merge 4 commits intoenglercj:masterfrom steveandkate:feature/ninja-convertTiledmap-slopemap-takes-tilset-indices
winstonwolff wants to merge 4 commits intoenglercj:masterfrom
steveandkate:feature/ninja-convertTiledmap-slopemap-takes-tilset-indices
Conversation
Owner
|
Well both should happen, we should check the specific tile first and fallback to the properties on the tileset that the tile represents. Keep it as keys into the tilemap but then lookup the tileset tile for each one and fallback to those props. That way you can use the tileset to do general config, but override on a tile-by-tile basis. |
added 4 commits
January 30, 2015 15:23
Was using index of in tilemap, not index in tileset.
physics.ninja.convertTiledmap's slopeMap now expects a map of indices to the tileset instead of indices to the map.
Author
|
I'm not understanding when you say "check the specific tile first"? We're talking about a Phaser.Plugin.Tiled.Tile instance? Is it getting a nina-tile-id somewhere I have seen yet? |
Owner
That is a tile. I'm saying instead of replacing the existing funcitonality, extend it to also check the tileset. Does that make sense? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Chad—
Thanks for accepting my previous PR. Here is another change that I need but I'm not sure if you want it. Your current version of physics.ninja.convertTiledmap() takes a slopeMap where the keys are indices into your tile map. I have changed it so the indices are for the tileset instead. In other words, the old implementation requires specifying all the slopes for each individual map you write in Tiled. My change assumes that if you use a certain tile from a tileset, that tile will always have the same Ninja slope. I think this is the common usage for tilesets—a tile in the tileset specifies what a tile looks like and it's properties such as collision Ninja slope. This is certainly an API change. If people are expecting the other way, this will break for them. However I suspect this change is what people expect from a slopeMap.
—Winston