Best practices for building levels

Discussion and feedback on Construct 2

Post » Wed Oct 30, 2013 11:10 pm

I'm getting ready to build my first real level, so I thought it would be a good idea to figure out some do's and don'ts.

I've searched for this info on the forum, but most posts were of older versions, so I don't know what's changed. I also thought some answers were a bit vague, so I want to make sure I get things cleared up.

Let's assume that we are making a fairly large level, and we need to fill it up. Maybe we'll target a standard resolution of maybe 720p, but our layout needs to be big enough to provide a worthwhile level for a platformer, so at least maybe 3000 to 4000 px or more.

Now, we want the level to look as good as we can, but at the same time not need a supercomputer to run well. We might even want to put it on mobile platforms as well.

Here is a chart showing some ways to fill the level. The numbers are just placeholders for example purposes.



A: we could fill the entire level with a sky, maybe just use a single color and using a tiled background.

B: we could fill areas with single color tiled backgrounds that are a bit smaller

C: we could fill large to medium sized areas with fancy tiled background for areas we want detail

D: we could make a bunch of individual sprites to fill the areas

E: we could make a bunch of sprites but each one would use an animation frame (like the platformer tutorial I read on here).

F: we could use background tiles that are various sizes broken down into chunks and then placed side by side

G: we could use sprites that are various sizes broken down into chunks and then placed side by side

H: we could use moderate sized tiled backgrounds like 500px by 500px

I: we could use moderate sized sprites like 500px by 500px

So, I mean we have a lot of choices for what we use to fill out the level. On one hand, we can end up with a lot of objects if we use smaller sprites. On the other hand, we can have fewer objects but larger images to work with.

I figure we will use a combination of sizes. I just need to find out what the limitations are so I know what will break the game and make it run poorly.

I've read warnings about using too many objects and warnings about using too large objects. I'm trying to figure out where the best comprise is before I start working hard on detailed artwork.
B
75
S
30
G
35
Posts: 340
Reputation: 22,896

Post » Thu Oct 31, 2013 12:02 am

Depending on how much detail you want a small tile for the blue (or tall thin tile if you want your sky to have a gradient for sunset, etc..) then add other sprites on top of it for clouds, etc... nothing too large that would fill up the whole layout. You put enough layers of objects to fill up the screen about 3 times over and you blow out the memory on most mobile devices...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Oct 31, 2013 12:03 am

the small one would be a tiled background of course
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Oct 31, 2013 12:05 am

my platformer/runner levels are usually 20,000 or more in width and about 1300 or so in height..
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Oct 31, 2013 12:40 am

It all really depends on what you want to do. Usually, breaking things up into smaller parts is a bad idea, unless your image is larger than 2048x2048.

If you want to go with the detailed image, just put the whole thing into a tiled background and leave it as-is (unless it's larger than 2048x2048 pixels, but to save VRAM it should be much smaller anyway).

If not, then just go with the simple one.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Thu Oct 31, 2013 1:10 am

Okay, so it seems that larger (but not too large) images are the way to go.

I am going to have multiple layers so I can get some parallax effects.

I wouldn't really need anything to fill the entire layout since there will be some variation.

Can we go by the numbers that Construct gives us? Like if it says it is using x amount of memory, can we know if we are safe or not?

I can make a game look nice, my main concern is just making sure it will run. I'm just trying to plan ahead a little bit.
B
75
S
30
G
35
Posts: 340
Reputation: 22,896

Post » Thu Oct 31, 2013 1:19 am

B
93
S
33
G
8
Posts: 311
Reputation: 11,068

Post » Thu Oct 31, 2013 7:04 am

Unity3D extension is called 2D toolkit is capable to cut the big image into pieces of dice (128x128) by one click
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Thu Oct 31, 2013 2:18 pm

@DrewMelton

"We're working on a brand new tilemap editor for Construct 2, with support for importing TMX maps. Keep an eye out for the next beta coming soon!" -Scirra on facebook

i think you should wait a little bit to see how this tile map editor works and suit your needs

but on the go, what you have to keep in mind(i think) is to plan your game objects first:

-colision objects
-background
-platforms
-animated stuff
-characters

my first game test cant run on mobile devices, because i made it with a lot of isolated sprites and it crash as soon you run it

i dont know what kind of game you are making or the platform you looking for, but if your game need big places, try to break it in sections, levels, screens...

i dont know if it helps because this is a very simple proj and it cant be use to measure how it will impact a full game, but this is how i did with a jam game a time ago:

B
48
S
5
G
6
Posts: 210
Reputation: 6,297

Post » Thu Oct 31, 2013 6:56 pm

You really shouldn't use the tiled background object for filling the screen with a single color.

You should either of the following:
> use the background parameter (in layer properties) to fill the screen with the color you want
> create a layer that doesn't scroll (don't remember how exactly, might have something to do with parallax settings (0?)), have a 1x1 pixel image of the color you want added to it, then stretch it to your screen size (point sampling might give you better results)

And contrary to the beliefs of the guys here, i'd say that you should go with slicing up your image into smaller parts, here's why:
i read on one of the threads you can find here that the objects that are off-screen are not drawn, therefore don't take up some of the time needed for rendering a frame (however the images are still in memory, so there's that), which means that if only a certain part of your whole level will be visible at a time, the images that are off-screen won't take up the systems' resources and you should, in theory, have better performance than if you just used a single huge image. Or something... /speculation

Using a plain color background would still be faster than using a sprite... :/

If you'd like to know more about the performance optimization, i made a thread recently, where i asked for feedback from others on my views, but it appears that it's gotten buried now.
Here it is: http://www.scirra.com/forum/optimizing-a-game-for-mobile-platforms-your-tips_topic78778.htmlStiivais2013-10-31 18:57:52
B
10
S
1
Posts: 163
Reputation: 1,436

Next

Return to Construct 2 General

Who is online

Users browsing this forum: winsonzhong and 11 guests