The Crypt Puzzle with Babylon JS

I’ve always been a lover of “adventure games”, and the second one I bought was “7th Guest” (the first was “Myst”). It was an expensive time as I had to buy a CDROM drive too - and they were not cheap at the time.

Anyway, one of the puzzles that always fascinated me was called “The Crypt” which involved trying to close all of the nine coffins in a large crypt. It was a puzzle that many people solved only by a completely random trial and error process. So here is my Babylon JS version:

The Crypt

Built in Blender - nothing particularly complex, and lots of use of instances (coffin bases, skeletons, door, and columns). So really it was just a test of my poor coding ability. In the 7th Guest game, the initial open coffins are done randomly - but so I can provide an explanation later about how to solve it, this is a fixed start.

There is no sound (largely snarky comments in the original game) and I would like to be able to change the pointer to a skeleton hand (like the game). I have no clue as to how, so any suggestions welcome :slight_smile:

Ohh and the opening and closing of the coffins is done with the “onPointerDown” functionality. All meshes rendered non pickable then the lid meshes set to pickable. I know that @i73 has been asking lots of questions about this functionality - so here is an example for you.

Now, just one last comment - it can be done in 16 clicks. In fact the coffins can be set for a solve in 15 to 18 clicks depending on which three coffins are initially open.

Try it out - and if enough people are interested I will explain the solution.

Tested in FireFox and Chrome on Windows 7 on a desktop. (I don’t have any tablets or phones!)

Well here is my first attempt at changing the cursor to a skeletal hand when the mouse is over a lid

The Crypt2

cheers, gryff :slight_smile:


It’s a little dark I think. Could just be me though.

If you want a custom cursor you could look in to CSS (Changing the Cursor with CSS for Better User Experience (or Fun) | CSS-Tricks)

This is pretty cool, seems to work appropriately on mobile (chrome, galaxy s8+) although I’m not very good :stuck_out_tongue:

1 Like

I like the marble material, the coffin lids, and how you did the skeleton is very cool! : )

Thanks for all the comments guys and gals.

@Devin_Wright : I have brightened it up a little bit. Thanks for the suggestion about the cursor. See the added link for my initial efforts :

The Crypt2

@Ateria : Thanks for trying it on a mobile - actually looks pretty good - though you are supposed to be closing the coffins, not opening them :grin:

@aFalcon : Thanks for the nice comments. I have a model of a skeleton but it is over 25K verts and 9 of them would have been excessive! So I did a render with no background in Blender then just applied the resulting image to a squashed half cylinder (10 or 12 verts). Then created instances of it.

Anyway, has any one solved it yet? :smile: As I said earlier many people hammered out a random trial and error process.

cheers, gryff :slight_smile:


Oof, I wasn’t sure lol

I like puzzles. I managed to open them all and close them all. :smiley:
Once you understand the mechanism, it’s easy enough. Less than 1 minute to open everything and the same thing to close everything.


You can win instantly if you run openLids.forEach((i, idx) => {if (i === 1) {changeLids([idx])}}); in the console. :wink:


Great game! Inspite of its simplicity it has some enigma inside :slight_smile:

I feel that a lot of old games could be tranferred to Babylon; they have proven game logic already and now we have much more graphic possiblities.

As for Crypt: it definitely needs more mystery - more dimmed lights, candles, subtle glowing…
Sometimes some doors could suddenly open with the terrible sounds…
And, actually, after solving the puzzle the player should go to the full 3D dungeon full of puzzles and adventures…


@Dad72 : C’est excellent Dad :slightly_smiling_face:

Always liked puzzles too - not into shooting everything in sight.

Et merci pour les images. :smile:

They are just like what I see, I wonder about this “dark” description

cheers, gryff :slight_smile:

1 Like

That is what I like about puzzle adventure games: why, how and for what purpose - a sense of mystery. You slowly answer these questions , or perhaps, sometimes, await the sequel for a final conclusion, or more intrigue. A narrative develops, and understanding the narrative becomes important.

This little project was not meant to go into the narrative - the only conclusion is you close all the coffins. No follow on or reward. It is just meant to test my limited programming skills with an old puzzle from a game from earlier days. One simple puzzle does not a game make :smile:

Back in archives I have a house that could be used as a starting point, and a maze game. I could use those to build up something with a more enigmatic parts. In the original 7th Guest game, a maze comes just before finding the crypt

But as I said above, this was just meant to test my limited programming skills.

cheers, gryff :slight_smile:

1 Like

Ohh, I have fixed the camera bug in Crypt2 that has the skeleton hand. Works now - just an issue with age and scripting :grin: The little icon that I used is from

To solve the puzzle as it appears (coffins 2,4, 9 open) with coffin 1 at top left and coffin 9 at bottom right :

Note the position of the open coffins then click coffins 2,4,6,7,9. - coffin 2 is now closed.
Then click on coffins 2,3,4,8,9 - coffin 4 is now closed.
And finally, click on coffins 3,5,6,7,8,9 - that closes coffin 9.

cheers, gryff :slight_smile:

After I spent four… eight… twelve… much more hours building, just for fun, my first BJS dungeon - I have to say that we definitely need a kind of Dungeon Builder for Babylon :slight_smile:

(photo - Blender Level Builder plugin)

1 Like

Did I win?52%20PM

1 Like

Your tile pieces looks like something that would be nice with Wave Function Collapse.

Old man Stauf built a house and filled it with his toys. Six guests were invited one night, their screams the only noise. Blood in the library, blood right up the hall, dripping down the attic stairs, “Hey Guests! Try not to fall”.

The only thing this mini-game is missing is The Fat Man’s music. Nice job. And solved. :grinning:


Yes you did @Givo. I see from your profile that you are still in high school - I first struggled with trying to solve this problem 26 years ago - before you were born :grin:

@Jattier : Welcome to the forum, and I’m glad you enjoyed my little effort that comes from a puzzle that drove me mad a long time ago :slight_smile:

cheers, gryff :slight_smile: