Jump to content

A Logic Maze - with a map


gryff
 Share

Recommended Posts

There are lots of types of mazes in video games. This seemingly simple maze - is tricky. ;)

 

A logic maze

 

It is driven by the BJS action manager - and the code involved is my hack of code and a process that I found in Temechon's "Plane" game. TY Temechon for that tutorial - now if I can just get my head around prototypes  :o

 

This maze is a BJS version of a little game I created in Unity a while back. The gates are just simply either red or blue boxes - I could have made them all the same colour, but that would make the puzzle more difficult.

 

Move with the arrow keys/mouse, the "m" key to toggle the map. The map will show you where you start and where you end - and where all the gates are.

 

It can be done by just using 8 or 10 gates.

 

And just a thought about the puzzle itself - it always reminds me of trying to drive in a large city with lots of no right/left turns and one way streets. In addition in my own city in the summertime all the detours and roads closed as the city does road/sewer repairs etc :wacko:

 

If you want to try the Unity version :

 

Unity logic maze

 

Not sure what browsers still support the Unity Web Player plugin - it does still work in the latest version of FF.

 

cheers, gryff :)

Link to comment
Share on other sites

@ Temechon: Glad you like  what I did with your code. I do like the way you laid out the action  manager code  not one continuous lump of code but defining the the trigger and then the action - so much more readable to my mind ;)

 I tried using intersect mesh but I kept getting stuck in the gates - so much better with the OnIntersectionEnterTrigger and OnIntersectionExitTrigger of the action manager.

 

@ RaananW: 6 - want to tell us how? Best I have done is 8.  Robert Abbot who designed this maze problem gives a solution with 10 gates.

 

cheers, gryff :)

Link to comment
Share on other sites

yeah.. that's what i did was well... but still don't know how 8 or even 6 is possible... without cheating ... we are playing without cheating...right? :P

 

Ohw.. and I used the map... without it's reeeeally hard I think. Anyways. very well done! It's fun to play and has a nice look... sometimes my mouse got stuck because I think I moved out of the window and then it didn't stop walking. And if you try to walk trough closed gates it sometimes counts them as 'used'.

 

Maybe it could be a bit darker and some flickering lights... maybe add the slenderman who appears if you take too long to find the exit ;D

Link to comment
Share on other sites

Maybe it could be a bit darker and some flickering lights... maybe add the slenderman who appears if you take too long to find the exit ;D

 

 iice, I have thought about that, and the "slenderman" aspect. Robert Abbott designed a maze back in the 1990s called Theseus and the Minotaur which had a evil villain character which has been made into a java applet and is available for the various Apple devices.

 

This to me was an exercise in code hacking - but I do have a darker maze piece which one day I will finish.

 

cheers, gryff :)

Link to comment
Share on other sites

I actually thought I broke it :-)

 

LOL Raanan. I t could be my code is bad :unsure:

 

If you look at the createWorld.js file you will see a couple of blocks of code REMed out - my cheat system so I could get from the start point to the end point in 3 moves ;) After so many maze trips - my testing might be suspect :unsure:

 

So there are several options:

1. My bad code - and you found a bug :blink:

2.  Or you are smarter than Paul Abbott and the rest of us :o

3. Or maybe I did not get the gates quite right :unsure:

 

Whatever, love to see your solution

 

cheers, gryff :)

Link to comment
Share on other sites

1. My bad code - and you found a bug :blink:

2.  Or you are smarter than Paul Abbott and the rest of us :o

3. Or maybe I did not get the gates quite right :unsure:

 

Ehhhhhh, I think either 1 or 3! 

 

I tried doing again what I did yesterday, and alas - It didn't work! :-) So, as I said, I think I broke it. I didn't mess with the code or anything, it just happened...

 

But!! I have a screenshot to prove I am smarter than Paul Abbott!

Link to comment
Share on other sites

So, just to explain how  I "did it" , on one of my computers it works flawlessly with no bugs. On the other, (same browser, surprisingly) it "skips" gates - so even if I pass a blue one, it stays blue. This way, I could also do it in 4 steps :-)

http://imgur.com/F5AnXZC,cXUfVAV

So it is impossible for me, using this computer, to do it without the map. Now I need to find the right solution....

Link to comment
Share on other sites

I didn't found the solution yet... I feel so bad

 

Now I need to find the right solution....

 

Well Temechon and RaananW - see image below for the 10 gate solution. As there is an 8 gate solution that means two gates less - one red and one blue. The 8 gate solution should be easy to see. The whole puzzle revolves around switching direction in the top right corner.

 

it "skips" gates - so even if I pass a blue one, it stays blue

 

RaananW, I take it you mean it is still semi transparent and you can walk through it - so in theory first red ->turn right ->1st blue ->walk down to the exit corridor ->turn right again-> 2nd blue. So three gates in all.

 

Any thoughts as to why ? What are your two computers?

 

cheers, gryff :)

 

 

post-7026-0-87364300-1437012400.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...