• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Create a Maze in GameMaker 1.4

A

Artur

Guest
Hey everybody! I want to create a maze in GameMaker 1.4 which can be solved with a mouse/finger. The boundaries are not necessary horizontal and vertical lines, could be smooth and curvy as well. When I start solving the maze, I do not want the trace left by the mouse to be able to leave the designated paths. Do you think this is possible and how hard it would be?
Cheers!
 
E

EternalStudio

Guest
You're doing it on mobile I'm assuming? I would recommend starting with a tile based system, something that does not incorporate curved lines, as that will be easier to begin. You could use the built in collision functions to determine if the user has collided with one of the tiles (these are slow functions, but this game doesn't seem very intensive so it shouldn't be a problem).

This is a very easy project, and I think you should go for it! Make the level start by the user touching down on the "start" tile, and if they lift their finger they lose automatically. You could eventually add some moving tiles to add some challenge.

Good luck and happy game making!
 
A

Artur

Guest
Thank you Eternal Studio. I also think a maze with rectangular tiles would be easy to make but would like to create an application/game, which can use any image with curved lines as a template. Possibly I can approximate the curves with small enough grid, but not sure how good this will end up.
Cheers!
 
A

Artur

Guest
I was thinking the lines to be walls, but the other way around also could work. Also, I am not sure what to do if I have a maze in which one path goes over another.
 
M

Matt Hawkins

Guest
Pretty much anything is possible with game maker.
With this software you are basically a cross between Gandelf, Hulk Hogan and Danny Devito.
 
E

evenprimes

Guest
One compromise could be generating a maze on a standard grid, but using tiles that depict curves. For instance, if your maze contains a straight section, you could show a squiggly tile that still fits in the grid. An L shaped corner could be depicted as a curve. A limitation here is that your collision masks would be more complicated than if you stick to right-angle tiles.

You might be able to use an image as a maze directly if you can read the color value of an individual pixel. (I don't know if this is a good idea, but it's a possibility.) Check out buffer_get_surface() and buffer_peek() in the API docs. Each time the player moves, you would have to test some pixel color values to see if the player is out of bounds.
 
A

Artur

Guest
Thanks for the suggestions guys... It seems it may be hard to achieve the exact effect I am looking for. The pixel color may work, will give it a try!
 
Top