Home Unity

How should I handle Metroidvania style rooms?

polycounter lvl 9
Offline / Send Message
MithosKuu polycounter lvl 9
Hello all, I'm trying to throw together a metroidvania style exploration platformer and I'm wondering how I should set up my scenes.

In a typical Metroidvania style game the world is split up into multiple distinct areas with their own music, theme, and enemy set, each area is then divided into "rooms" for the player to explore, something like this.

My question is, should each area be its own scene, only loading a new area when the player crosses between them, or should each room be its own scene, loading a new room almost constantly as the player progresses through the game?

Thanks in advance

Replies

  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    depends on how and where you are comfortable with. Personally I would use something like tiled to create the levels and initialize any level within 1 scene. Obviously for that one would have to parse the XML tiled or alike map editors create and instantiate sprites / tiles from a pool that is already in the unity scene available.
  • MithosKuu
    Offline / Send Message
    MithosKuu polycounter lvl 9
    I was hoping to go the 2.5D route ala shadow complex and use 3D assets, but I suppose I could just render them out as sprites and use Tiled...
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    well even though you map or tile your map in 2d (using layers etc.) you could still instantiate 3d prefabs instead of 2 billboards or sprites. E.g. make a 3d cube kinda sprite for every tile in the tiled map.
    Anyway that's what I would do, my main reason to go with something as tiled is its simplicity and as such power in production later on. Imagine revisiting unity scenes to change certain tiles - a big big pain because of the clumsy way Unity can be at times. On the other hand tiles is so primitive even in its file format (xml) which can be modified in any text editor. This can be useful for example if you need to swap or change tile id's in the map. But again this is my experience others might have a different approach or experience on this.
  • MithosKuu
    Offline / Send Message
    MithosKuu polycounter lvl 9
    Interesting, using something like this I guess? If so then yeah, I'll definitely try that out, thanks!
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    On one of my first Unity try & errors I worked on this demo
    http://www.polycount.com/forum/showthread.php?t=75109
    7764253590_4ae10aeddd_o.jpg
    As you can see the layout is pretty much 2d but the tiles are fully 3d.

    It was one of those projects where I learned that Unity is not really designed to be a good level editor. Even today when they introduced snapping and multi selection edits (although very primitive) - it is still no match to something like the unreal editor. But i'd say for a simple game keep the level editing simple or primitive - it will be easier to manage the game and more consistent in execution or design that way.

    Other inspirations I found online
    http://www.firedroid.net/kings-can-fly-devblog/category/unity/
    tile2Dto3D_thumb.png
    tiles.jpg
  • kio
    Offline / Send Message
    kio polycounter lvl 16
    yeah this is a really cool approach - i wrote a simple tmx parser for unity some time ago ( which is actually pretty easy ). I used custom properties in each tile to define the 3d counterpart.

    this combined with on asset import setup frees you from the broken prefab workflow in unity - which can be pain in the arse...


    Tiled2Unity.PNG

    or "playable":

    https://dl.dropbox.com/u/12430386/Gamebakery/Strikers/WebPlayer/WebPlayer.html
  • tingham
    Is the grid overlay in the WP build just a projector? Are you doing any culling?
  • tingham
    MithosKuu wrote: »
    My question is, should each area be its own scene, only loading a new area when the player crosses between them, or should each room be its own scene, loading a new room almost constantly as the player progresses through the game?

    Architecturally, you would most likely want to have two-tiers of design. A Zone would encapsulate the overall theme of your level, with rooms inside the zone (that may or may not span a single screen's worth of space.)

    The problem in Unity is that unless you handle Additive level loading, you're going to constantly be fighting with the brief but disruptive delay between loading scene files. Metroid had that really nice screen transition effect when moving between rooms that I think you'd want to keep.

    There are a ton of small issues that you'd want to sort out as well that would have specific, pointed questions, to answer.

    Would love to rap about it if you got further with your project.

    -Thomas
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    The problem in Unity is that unless you handle Additive level loading, you're going to constantly be fighting with the brief but disruptive delay between loading scene files. Metroid had that really nice screen transition effect when moving between rooms that I think you'd want to keep.
    Scenes or levels in unity remind me of the early Flash feature called "scenes". If you are pro in flash you don't use them, if you don't know flash that well and prefer a visual driven workflow you will like them - but eventually learn to live without them.

    Just write your own level loader / management especially if its tile based. Its a lot easier and faster to handle the level switching that way.
  • kio
    Offline / Send Message
    kio polycounter lvl 16
    tingham: no its a simple alpha plane - i dont remember exactly, but i think i wrote a little function which mapped mousecoordinates to the plane gridspace - which updated the alpha plane position accordingly.
Sign In or Register to comment.