Bricks and Mortar: The layout editor

The next couple of posts will be a very basic outline of how the two main parts of Construct work – the layout editor (your levels) and the event sheets (your code). First up – Layouts.

Don’t expect this to be a comprehensive guide to Construct; the Construct site has plenty of documentation up on its wiki. But essentially, this is the sort of thing you’ll usually be looking at while building a layout:

Click for the larger image. You know you want to.

Click for the larger image. You know you want to.

In the middle is the layout itself. Most of its contents at the moment are sprites. The “Ground” is actually a tiled object – a resizable object with a repeated pattern which is perfect for quickly laying down tiled areas. Also making my life easier is the grid which I have switched on, marked by the small dots across the screen. I can choose to show or hide this, as well as force objects to snap to it when I move them or resize them.

The “Objects” toolbar lists everything on this layout, and if we wanted to add another slope, for instance, it’s as easy as dragging from the objects list and dropping it somewhere on the layout. We can also make use of layers, as seen on the right. This is especially useful for making sure HUD elements, like our crosshair, are always drawn in front of other objects.

On the far left is the properties dialogue. This changes depending on what we’ve selected. At the moment we’re seeing the properties of the layout itself, where we can change the size. Each object has its own properties – to add movement to an object, for example, we’d add a new behaviour using the properties dialogue. Setting our PlayerBox (the player’s collision mask) with a Platform Behaviour does all the basic collisions for us; all the various pieces of the floor have been given the “Solid” attribute, and the platform engine responds accordingly to ensure the player doesn’t fall through the floor or walk through walls. It really is that simple.

We’ve not even started coding, and we’ve already got:

  • a basic platform movement set up
  • a test area built
  • a camera that focusses on the player (though we’ll be making this more complicated later), and
  • a crosshair which is aimed with the mouse
Chances of it remaining this simple? Nil

Chances of it remaining this simple? Nil

Coming up next: A whole six lines of code! with at least three comments!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.