Thread: [Engine] Pokemon Java Engine
View Single Post
Old February 13th, 2013 (5:09 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
    Join Date: Jan 2008
    Location: England
    Posts: 5,185
    While you're deciding what to do with your layers, might I suggest that you take the opportunity to make sure you think about bridges as well?

    The concept is that the player walks around on one of three levels, and can transfer between levels only at certain points (invisible to the player). Each level has its own movement permissions layer. I say three to allow for having one bridge (e.g. horizontal) over another bridge (e.g. vertical) over the ground, which is the maximum number of levels you can reasonably use before making maps look really bad and obfuscating.

    In addition to all the other movement permissions, there will be one which allows that level to connect with adjacent levels. While standing on such tiles, the movement positions of the current and all adjacent levels will be considered (with "can walk" taking priority over "can't walk"). Here I've said just one extra permission (for walking), but you may if you wish also have a similar one but for surfing - this would only really be useful for water slide-type maps and can certainly be lived without, but it'd be easy enough to implement. These special permissions would be placed on the same tile in both of the layers involved, so you wouldn't walk from one of the special ones onto another one - it'd be "step onto a special permission, see how the player wants to move from there, search all adjacent layers to see if it's possible, change the player's current layer to the one where it's possible, move player". That is, the same as usual, but just checking up to two extra movement layers and perhaps changing the current level value.

    Once that's done, just make the bridge tiles appear above or below the player depending on the player's current level. You could have special graphics layers which should only contain the bridges, relate them to the different levels, and change those layers' priorities depending on the player's current level.

    It can be rather complicated to imagine, but it makes bridges easier to make, and involves no events at all.
    Go to the Pokémon Essentials Wiki

    | Downloads | Tutorials | Fangames |
    | All Animations Project |

    Follow me on Twitter: @maruno42

    Reply With Quote