- Home /
Create A World Map Like SMW with Changing Tiles
Currently, I'm trying to create a world map for my game, similar to the one in Super Mario World. It should be pretty straight forward to create the map in the first place, but the problem that will cause the most trouble is making the map switch out tiles when you beat certain levels, like making the path turn from dark to tan and making hills shrink and/or grow to different tile heights. What would be the best way to approach this? Could I do multiple layers for each change after a level is beat, but choose to only change a section of it to active? Thanks in advanced, and below is an example of what I'm trying to accomplish. https://youtu.be/J4F4P3Jr3MU?t=2m57s From 2:57 - 3:00
Answer by Tomer-Barkan · Sep 28, 2015 at 07:50 PM
Simply separate the background map from the icons that need to be switched. Then display the map in the back, and on top of it all the icons. When need, change the sprite variable of the icon.
public SpriteRenderer changeableIcon;
public Sprite normalSprite;
public Sprite beatenSprite;
....
changeableIcon.sprite = hasWonLevel ? beatenSprite : normalSprite;
That should work! It may take a bit, but it will take a lot less longer than my other ideas! Thanks!
Your answer