How do I Make my Platforms appear correctly?

Get help using Construct 2

Post » Mon Jun 23, 2014 5:01 pm

I'm creating an Autorunner game where the platforms appear randomly in different lengths and i wanted to create a platform that looks quite realistic in the sense that the sides are not just straight rectangle lines but are sort of rugged or curved off.

Is there a way that i can use a image with rugged edges (or something similar) as my platform and the image appears correctly as a long or short platform depending on the size.

I'm having trouble trying to word this properly as it's a bit complicated to explain, so i can understand if anyone is confused. I've provided a capx file, which is just the Autorunner template. What i've done with this is added a platform image that i just quickly photoshopped from an image and inserted it into the game.

In the capx, you can see that if it's a short platform, it just cuts the image rather than resizing and if it's a long platform then it respawns the image and theres a gap in between, which doesn't look great. I know why there is a gap, as i'm using a tiled background as my platform and my image isn't really sutible for that.

If i wanted to use the image in the capx as my platform, how do i do that?
You do not have the required permissions to view the files attached to this post.
B
5
S
2
Posts: 126
Reputation: 876

Post » Wed Jun 25, 2014 3:17 pm

Can anyone help me out with this please?
B
5
S
2
Posts: 126
Reputation: 876

Post » Wed Jun 25, 2014 3:40 pm

Sounds like the 9-patch object is the right way to go for you. https://www.scirra.com/manual/151/9-patch
B
71
S
29
G
7
Posts: 86
Reputation: 7,588

Post » Wed Jun 25, 2014 4:37 pm

Thanks for the link, that does seem like what i need for my issue. I've tried to incorporate 9patch by replacing it with the tiled background block from the Autorunner template and replace everything in the event sheet with 9patch but it's not working for me perfectly, i'm not sure how to do it.

When i tried it, the platform for 9patch doesn't spawn correctly and appears stretched on some platforms. I'm guessing this is because of my image, is there a way to sort this out?

Could i get an example of it working in the Autorunner template if possible please?

I've just realised my mistake with the capx i provided, as it's just the Autorunner template with no changes :oops:

I've provided a capx of what i've done with the 9patch.
You do not have the required permissions to view the files attached to this post.
B
5
S
2
Posts: 126
Reputation: 876

Post » Wed Jun 25, 2014 5:48 pm

I don't have time to explain what i've done, it's simple tho, check the differences between the capx, mostly chance initial nextBlock value to something lower, and use 9patch.width to calculate nextBlock value later on, instead of "block.width". Play with the 9patch offsets to get a better result
You do not have the required permissions to view the files attached to this post.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Sun Jun 29, 2014 11:47 am

Thanks, I noticed what I left out in my capx. I have an issue with some of the platforms look stretched/distorted, any way to fix this?

What would be the best way to go about using an image to represent a platform for an auto runner bearing in mind that platforms can appear in different types of sizes?
B
5
S
2
Posts: 126
Reputation: 876


Return to How do I....?

Who is online

Users browsing this forum: 25games, brunopalermo and 11 guests