0 Favourites

Complex maze w/ PC only moving on path, not walls

  • Hi all,

    I'm trying to make a maze type game. I have been using RPG maker's great generate dungeon feature to generate a fairly decent maze. After I finish it up in RPG maker, I put it into photoshop, and save as a PNG.

    <img src="http://dl.dropbox.com/u/93047429/3.png" border="0" />

    What I want is to give part of the map SOLID behaviour, such as the bushes that make the "walls" of the maze. I want to allow the player to be able to walk on the grass and the grass only (making up the path).

    I tried, in photoshop, to isolate the walls, and leave the path transparent. My thought was that by importing the walls png with transparent paths, applying the solid behaviour would only affect what was NOT transparent (ie the walls). It makes everything solid, however, and the PC cannot move through even the transparent bits. Even if the PC was above the layer that was solid.

    <img src="http://dl.dropbox.com/u/93047429/1.png" border="0" />

    I then tried the reverse, which was to make an image wherein only the PATHS were selected, but not solid, and the walls transparent, with the aim of making the bg maze (see picture 1) the solid, and that the PC, because the paths layer is NOT solid, would be able to walk upon it. No dice.

    <img src="http://dl.dropbox.com/u/93047429/2.png" border="0" />

    So, any thoughts before I start adding invisible black barriers with the solid property at the edges of the path? It's a ton of work and I was hoping to have several maps in game!

    Thanks!

  • Construct 2 uses polygon collisions, the approach you're trying would require per pixel collision which Construct 2 doesn't have.

    You can either:

    A. Break the image up into tiles.

    or B. Add invisible boxes over the image for the collisions.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • By tiles you mean like, a sprite for the wall texture, a sprite for the grass etc, right? Yeah.

    I think B is less work than A but it's still work :)

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