Reply
Reply
 
Thread Tools Display Modes
MithosKuu's Avatar
Old (#1)
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
Offline , null, 8 Posts, Join Date Dec 2008,  
   Reply With Quote

renderhjs's Avatar
Old (#2)
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.
Offline , veteran polycounter, 3,037 Posts, Join Date Mar 2008, Location Sydney Australia Send a message via AIM to renderhjs Send a message via MSN to renderhjs  
   Reply With Quote

MithosKuu's Avatar
Old (#3)
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...
Offline , null, 8 Posts, Join Date Dec 2008,  
   Reply With Quote

renderhjs's Avatar
Old (#4)
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.
Offline , veteran polycounter, 3,037 Posts, Join Date Mar 2008, Location Sydney Australia Send a message via AIM to renderhjs Send a message via MSN to renderhjs  
   Reply With Quote

MithosKuu's Avatar
Old (#5)
Interesting, using something like this I guess? If so then yeah, I'll definitely try that out, thanks!
Offline , null, 8 Posts, Join Date Dec 2008,  
   Reply With Quote

renderhjs's Avatar
Old (#6)
On one of my first Unity try & errors I worked on this demo
http://www.polycount.com/forum/showthread.php?t=75109

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-f...ategory/unity/

Offline , veteran polycounter, 3,037 Posts, Join Date Mar 2008, Location Sydney Australia Send a message via AIM to renderhjs Send a message via MSN to renderhjs  
   Reply With Quote

kio's Avatar
Old (#7)
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...




or "playable":

https://dl.dropbox.com/u/12430386/Ga...WebPlayer.html
Offline , triangle, 324 Posts, Join Date May 2008, Location berlin  
   Reply With Quote

tingham's Avatar
Old (#8)
Is the grid overlay in the WP build just a projector? Are you doing any culling?
Offline , null, 4 Posts, Join Date Sep 2012, Location NC, USA Send a message via ICQ to tingham Send a message via Skype™ to tingham  
   Reply With Quote

tingham's Avatar
Old (#9)
Quote:
Originally Posted by MithosKuu View Post
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
Offline , null, 4 Posts, Join Date Sep 2012, Location NC, USA Send a message via ICQ to tingham Send a message via Skype™ to tingham  
   Reply With Quote

renderhjs's Avatar
Old (#10)
Quote:
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.
Offline , veteran polycounter, 3,037 Posts, Join Date Mar 2008, Location Sydney Australia Send a message via AIM to renderhjs Send a message via MSN to renderhjs  
   Reply With Quote

kio's Avatar
Old (#11)
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.
Offline , triangle, 324 Posts, Join Date May 2008, Location berlin  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch