Remade lock puzzle from Skylander

Hi!
As Skylander Spyro’s Adventure was one of the first video game I’ve played to, I wanted to pay tribute to it in my game so I chose to implement the lock puzzle mechanic.
Here is the result so far:

7 Likes

That looks really neat. Did you rotate the camera and then procedurally move the player, or is the player done with gravity and you changed the gravity direction? What happens if you rotate the grid while the player is falling is what I was wondering? The answer to that depends on how you have done this. The first, I presume you cannot, the latter, might have some interesting results for puzzle play.

Thanks!
Instead of rotating the camera I rotate a node which contain the player and the puzzle itself, so I just have to apply gravity to the player:


Plus, I make sure to freeze the player velocity during the rotation. Finally, I also made so you cannot rotate while the player is falling because it would be too easy to get all the key if not.

if puzzle.isRotating || inPortal:
		velocity.y = 0
	else:
		velocity.y = move_toward(velocity.y, 1500, 150)
	
	move_and_slide()

I’m really proud of how it turn out because I codded the puzzle so it generate itself from an array, which make the puzzles creation super easy!

3 Likes