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

Get help using Construct 2

Post » Sun Aug 05, 2012 12:42 am

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.



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.



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.



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!Yswellin2012-08-05 00:43:08
B
16
S
3
G
3
Posts: 66
Reputation: 3,629

Post » Sun Aug 05, 2012 2:34 am

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.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Sun Aug 05, 2012 3:17 am

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 :)
B
16
S
3
G
3
Posts: 66
Reputation: 3,629


Return to How do I....?

Who is online

Users browsing this forum: Skebab and 3 guests