Dlost1 Posted February 12, 2017 Share Posted February 12, 2017 Hello! Just looking for some advice: I am building a 2D-adventure game. I want my char collide with a building when walking up from below or from the side (partly) I want my char to walk behind to higher part of a building (the rooftop). So I was thinking to approach this by splitting the building into 2 objects: the lower part of the building and the roof. Than I might place the lower part in a object collision layer and the upper part in a "behind" layer. Now, I am wondering; is this the way to do it? Or is this a noobish approach? --> If so, how should I do it? --> I am using Tiled//Phaser btw;) Would love to hear your idea's! Link to comment Share on other sites More sharing options...
hexus Posted February 12, 2017 Share Posted February 12, 2017 I'd suggest using a single, invisible collision layer (doesn't even need to be rendered), then layering your visible artwork separately. Then, use a foreground layer for tiles that the character has to be behind, such as the roof of the building, and a background layer for everything else. This way, your collision information is separated from your artwork, giving you a little more freedom at the expense of another layer of data. Just my suggestion though. Link to comment Share on other sites More sharing options...
Dlost1 Posted February 13, 2017 Author Share Posted February 13, 2017 Thanks:) So I am not that far off;) Good to know! Got a complex map so its gonna be a lot of work, though:/ I geuse less layers will mean better performance. So I ll try to limit that. Link to comment Share on other sites More sharing options...
Recommended Posts