Page 1 of 1

Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 6:56 pm
by Nesteris
@Ashley (Sorry to bug you again)

Would it be possible to make Construct 2 able to make custom layout shapes instead of the regular box? I feel it would streamline game design and help eliminate some of the need for complicated cameras in certain games like platformers and stage-type games.
One thing it would prevent is the camera going of the "level" while following the player, e.g. the player is next to a wall and half the camera is in the wall, or making the ceiling high and having the camera halfway through the floor.

Would this be possible? It could be a feature to create custom layout shapes and sizes using boxes and rectangles.

Maybe the layout can be designed using boxes and rectangles that are multiples of the window size.

I think this has a lot of potential uses.

Thanks for the time spent reading and possibly replying to this!

Re: Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 7:16 pm
by Katala
Sorry but I don't see much logic on this. You should control your camera instead. Use methods like this https://www.scirra.com/tutorials/747/zone-based-camera-movement and use unbounded scrolling if needed.

There is no way the camera would automatically know what to do on what ever the layout shape is.

Re: Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 8:09 pm
by Colludium
Why don't you just position your play area away from the edges of the layout?

Re: Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 8:14 pm
by Nesteris
@Colludium you don't get it, the edges of the layout act as a lock for the camera so they don't stray from the playing area.

@Katala, thanks for the tutorial, but how would I go about making that?

Re: Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 9:08 pm
by Colludium
@Nesteris,

I think I get it - perhaps I should explain a different way. See the example below - you don't have to permit the player to be near to the edge of the layout if you don't want.

Re: Request: Custom Layout Shapes?

PostPosted: Sat Nov 08, 2014 10:03 pm
by Katala
You can download the CAPX from the left side of the page.

Re: Request: Custom Layout Shapes?

PostPosted: Sun Nov 09, 2014 12:18 am
by Ashley
Turn on unbounded scrolling and you can implement custom scroll bound logic for any shape.

Re: Request: Custom Layout Shapes?

PostPosted: Sun Nov 09, 2014 1:50 am
by Nesteris
I used Katala's suggestion, took a bit of tinkering to implement it into my game.

Thanks for the replies! I think this is gonna be my last post for a while as I got everything figured out for now.

Thanks for the amazing help! :)