Random Texture Placement?

This forum is currently in read-only mode.
From the Asset Store
Ambient Atmospheric Nature Music Inspired By Planet Earth
  • I'm trying to do something similar to some basic random terrain, and I'm having a difficult time. I have a dirt texture covering the whole layout, and am trying to randomly place a tiling rock texture, then randomly SHAPE it, I can rotate and resize it, but I can't give it a unique shape for the life of me. I was thinking maybe through creative use of a variety of mask objects chosen at runtime?

    EDIT: On this note - do we have an IRC room somewhere yet, so I can ask dumb questions there?

  • Thats not a dumb question <img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" />

    I'm not sure if we can mask objects with other objects in Construct, I know you can't in MMF2. So if you can in construct, i'll be very happy.

    I'm afraid I can't help, I look forward to someone who knows to answer this <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /> I'd be interested in the solution.

  • That's an interesting idea actually...

    I can't really think of any simple way of doing it the way you want using Construct.

    I'm not sure how well masking would work the way you want... There is also the collisions issue to deal with... (actually, is overhead or side scrolling?)

    As far as an IRC channel... All it would take is for someone to make a room for construct somewhere on freenode or rizon or wherever... Of course, it would be nice if Ashley approves and such...

  • I'm not sure what you're trying to do exactly... but masking may help. If you create a separate layer and place a tiled background, some Sprites with a Mask effect, and set the layer opacity to 99% (a hack for another feature I need to implement) - then the Sprites will cut shapes out of the tiled background. Does this help what you want to do?

  • Ashley i cant get that to work. That sounds awesome though, thats exactly what i need for a project.

    Can you make it so that masks only affect certain layers? You should attach masks to layers or something. So that way we could mask things on the upper layers without it affecting the below ones.

  • Here's an example:

    http://www.scirra.com/files/masking.cap ( made in 0.88 )

    Sorry, turns out you have to use the 'Erase' effect <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz"> but that file demonstrates how it works. Note the 'Masking' layer has an opacity of 99%, this is a workaround to a missing "Use own texture" option for layers that I'm going to add for 0.89.

    The sprite with the erase effect cuts a hole in the layer and shows whatever is underneath. That is what I was describing, is it helpful at all?

  • Yes that is kind of the idea I was going for. The shapes of the individual masks I guess can be rotated/chosen/scaled randomly based on position in the world I guess.

  • Is this the best way to make a circular minimap? Because im gonna need one <img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, you could use an Erase effect on a layer, or just put another sprite on top of it <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />

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