Sprites in a maze game

0 favourites
  • 7 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • Making a maze game, and wondering about setting up the walls. I've created the layout of my maze using GIMP, saved as a PNG. When importing as a sprite is there any way i can make the walls of my imported PNG solid with out adding in extra sprites? Im cooking up some pretty intricate mazes, and i fear if i have to add extra sprites to make the walls solid, it will impact performance. Also, if this is in the wrong spot, i apologize. If you could point me in the right way i would appreciate it, Thank You!

  • There is no way to make the walls solid from the png.

    I would reccomend recreating the maze in tilemap object, that shouldn't be that hard.

    Another option would be using one invisible tiledbackground of 2x2 pixels with solid behaviour to overlay the non-walkable areas.

  • I haven't tried this yet, but maybe you can detect the different colors of the maze. For example, if your player sprite moves on a black area (wall), then move the player back. The user would perceive this as a solid wall.

    Please let us know if you find a way that works.

  • Can do, thanks for the suggestions guys!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a tiny 2X2 px transparent tiled background and overlay all your maze walls with it, set collision detector to the new bg and Bingo!. Tiny overhead the way C2 handles tiled bg's and very simple to implement.

  • [Sorry keep losing my posts or pieces of them, my last post should have read: "As Littlestain says above, Create......"]

  • Servontius - I was about to ask the very same question. Thanks for gathering the questions for me :)

    I was wondering if there isn't a way to get the Alpha value on a given point on the sprite. (Something like Sprite.Alpha_At(X,Y))

    Another approach may relay on the difference between the RGB values when the sprite is visible/invisible. This may be used to store the alpha data into an array and recreate the "walls" with a 1*1 sprite.(Something like RGB_At(X,Y))

    Is it possible to access any of this data?

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