How do I create a platform that's composed of mltpl graphics

Just started using Construct 2? Post your questions here

Post » Sat May 07, 2016 2:27 am

So, yeah, I've been reading the "Learning Construct 2" book and have gone through the platformer chapter. I purchased a graphic set from the asset store for making my own platformer style game and tried to apply the stuff I learned. One thing I didn't see was how to create a platform consisting of multiple sprites. In the asset they have a left, center and middle graphic for a platform.
B
6
S
1
Posts: 3
Reputation: 356

Post » Sat May 07, 2016 6:32 am

I think 9-patches are what you are looking for.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sat May 07, 2016 1:06 pm

I'm not sure that's what I'm looking for. And while trying to create a screenshot I may have figured out a way to do it but I want to do what's considered standard for c2. I have photoshop. I could, in theory, build my platform in there using the individual graphics for the platform and save it as a new graphic that would be used as my platform. Is that SOP for c2? Do a lot of you use the assets you buy to "build" unique sprites in a separate graphics program and the utilize it in c2?
B
6
S
1
Posts: 3
Reputation: 356

Post » Sat May 07, 2016 6:43 pm

Without seeing the assets, it would be hard to say what would be best. So let's look at some assets from a tile-based game.

Image

Do you see those boxes in the picture? They are composed of multiple parts (tiles).

Image

A 9-patch will allow you to create boxes like the ones from the screenshot using a single image.

Image

If you put the above image into a 9-patch, set all of the margins to 16, and set the edges to tile, you will have a single object that you can resize at will, and all of the 'parts' will automatically be rendered in the correct places.

Image

If your assets are not tile-based, then you will need a different approach. In the interests of keeping memory usage down, you may want to add each graphic as a separate sprite, and use containers and/or event logic to keep the parts together. You may also want an invisible object to handle the game logic of the platform (such as collision and movement), and just have the art assets move along with it.

But, as stated at the beginning of this post, it's hard to say what you need without seeing the assets (or at least a better description on how they fit together). Everything in this post is speculation as to what you might need.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sat May 07, 2016 7:57 pm

Awesome - thanks for the pix! I tried adding screenshots but I need to find a home to store them online first ;) They should take your post and put into the docs for 9-patches. Based on your example I see where this should work for my problem. I'll give it a shot.
B
6
S
1
Posts: 3
Reputation: 356


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest