Platformer Level Creation

For questions about using Classic.

Post » Mon Aug 23, 2010 2:11 am

Hi everyone. I am working on a platformer right now using Construct 99.62
The tutorials by deadeye have been extremely useful, but I am grappling with an interesting problem.
This is my first side scroller, and I dont know how large to make the sprites that make up the land.

As an example, I have an ice cave level which I have mapped out extensively in photoshop using layers. The image is very large over the construct physics limit of 20,000 pixels. So I thought I would break it up into smaller chunks. This is a pain to do because I have to cut each one exactly right from the original image to maintain the pattern in the image. I have about 12 sprites that are full screen, but the images overlap slightly, so lining them up in construct is horrible. Each sprite is 2048x768. My application and layout are set to 1024 x 768. Without the zoom tool, and without perfectly cut images I cannot figure out a good way to do this.

Any help would be greatly appreciated. I am planning a full 8 level platformer and i am lining up assets, Construct is a great tool for this type of rapid development and I am excited to keep moving in the right direction.

Thanks!
Nate
B
2
G
2
Posts: 15
Reputation: 680

Post » Mon Aug 23, 2010 5:35 am

There is a grid, and a snap to grid feature(layout tab at the top). If you cut your images down into a specific power of two size, place a hot spot/image point(use the number keypad to place them accurately), this will help lining things up. Secondly, as far as i know, your 2048x768 sprites are being rendered as if they are 2048x2048. Which is wasteful. You should have a look at making tiles/reusable pieces that you lay down in the editor instead of making something huge in photoshop.

Photoshop has grid tools, "Edit, Preferences, Guides, Grids & Slices"- Set up the sizes there. Toggle the grid on and off with "Ctrl + ' ". Under "view - snap", will make your marquee selections snap to the grid you have set up. So you can be 100% precise.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Mon Aug 23, 2010 8:19 am

Just on a side note... Does this mean that Construct has to use square textures? So a 512x256 image will be internally padded to 512x512? Seems as if Construct is doing the wasting as video cards have had support non-square textures for years.

Edit to clarify: Yes, textures should be in a power of two for efficiency, but do they need to be square?
B
1
G
2
Posts: 7
Reputation: 639

Post » Mon Aug 23, 2010 12:23 pm

[quote="Bursar":3byje2u2]Just on a side note... Does this mean that Construct has to use square textures? So a 512x256 image will be internally padded to 512x512? Seems as if Construct is doing the wasting as video cards have had support non-square textures for years.

Edit to clarify: Yes, textures should be in a power of two for efficiency, but do they need to be square?[/quote:3byje2u2]
No, I'm pretty sure that Construct only pads out to the power of 2 size, not the square size.
Otherwise it would indeed seem to be a waste.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon Aug 23, 2010 12:53 pm

That's OK then, so the OPs graphics will be padded to 2048x1024, and not 2048x2048 as suggested.
B
1
G
2
Posts: 7
Reputation: 639

Post » Mon Aug 23, 2010 2:50 pm

[quote="Bursar":3bbnuoun]That's OK then, so the OPs graphics will be padded to 2048x1024, and not 2048x2048 as suggested.[/quote:3bbnuoun]
That's correct.
Padded out to the nearest power of 2 makes most sense, and I don't believe Ashley and David would have padded to the nearest power of 2 square for a second.

Unity "scales" to the nearest power of 2, so that 1024x1200 would be scaled to 1024x1024, which could be a useful feature for Construct.

To be honest though, if you plan your textures well enough, neither becomes important. :)

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon Aug 23, 2010 5:39 pm

All great info! Thanks everyone.

So in order to export all the images from PS, is there some kind of utility that will cut up large images for me into a specific number of smaller files? I can do it the old fashioned way, but it takes sooo long! :)

Thanks again, this is helpful stuff.
You will see me again around these parts as I trudge through the process of learning and building all at once.
Nate
B
2
G
2
Posts: 15
Reputation: 680

Post » Mon Aug 23, 2010 10:20 pm

[quote="KrushBrother":u7mmu88w] Bursar wrote:That's OK then, so the OPs graphics will be padded to 2048x1024, and not 2048x2048 as suggested.


That's correct.
Padded out to the nearest power of 2 makes most sense, and I don't believe Ashley and David would have padded to the nearest power of 2 square for a second.
[/quote:u7mmu88w]

Most of the time it will indeed be padded to 2048x2048. This is not a Construct limitation, but a graphics card limitation it seems.

[quote="Ashley":u7mmu88w]I think all graphics cards can support 1024x1024 textures, so for greater convenience you can cut textures in to chunks of that size. If you have edges to cover, you can cut them in to say 256x256 squares and they will use less VRAM than another 1024x1024 texture. Basically, the rule of thumb is to assume your texture is placed on the smallest square power-of-two size surface that can entirely fit your image (so 1024x50 size textures is probably a bad idea - it could use 1024x1024 size surface and waste VRAM - but some modern cards might be able to use rectangular power of two and place it on 1024x64).[/quote:u7mmu88w]


I quoted Ashley from this thread, where efficient high res texture loading is discussed at length.

viewtopic.php?f=3&t=6053&hilit=power+of+two


Mindlessmalk - If you use the grid and selection tools in photoshop it shouldn't be such a drag to get through :)
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Tue Aug 24, 2010 5:04 pm

Thanks steven. I just figured out how to zoom in Construct! YAY. That in combination with the grids in PS and Construct have been working alright. textures are such a pain still, none of my tillable texs are lining up. But I am making it work. I will let you all know when i have level 1 done!!
B
2
G
2
Posts: 15
Reputation: 680


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests