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

0 favourites
  • 5 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • 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.

  • I think 9-patches are what you are looking for.

  • 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?

  • 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.

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

    A 9-patch will allow you to create boxes like the ones from the screenshot using a single 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.

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)