35
« on: April 02, 2014, 11:21:23 am »
A maze... I wouldn't use collision shapes at all, although it's an unusual solution. I picture a maze as an array (2D list) of squares. There are two types of squares in a maze, walls and floors. I picture the movement style of the mouse (I don't know what's going through the mazes, but I'll pretend it's a mouse) as being grid based, where it will be on one of the floor squares, and it can move in 4 directions if the direction also has a floor square. It's like the movement in most Pokémon games.
If you decided to use collision shapes, there is a chance that the walls may not function properly. If you were to use an array there is little gray area. You would be able to find the value of the the space in the array when a key is pressed, and if it says it's floor, you can move there. It would be easy to use binary, with 1=wall and 0=floor, so when you make the array the first item may look like: "1111111111011111111". You would get the nth character of the item to see what the nth tile of the row is (remember that arrays and lists start at #0). You can also use the array to generate the graphics, so it wouldn't be more work.
I know that you can do this in 2.2, because I've done similar things before in 2.2. And I'll also say that the chance of you receiving legal action for IP is probably zero. Since mazes existed way before computers did, they, as well as connect the dots, color by number, etc. are safe to use as long as you make your own puzzles. It's good that you're combating legal disputes before they start, but most of the time, IP isn't worth suing small businesses or whatever.