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:
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!
Hi, it’s me again!
I (finally) started to create the door that use the acual puzzle:
What a delightful little mini game! Great job on that. Looks fun. There should be a fail condition as well, perhaps a piece of dynamite that if you hit it you blow the lock up. And if opening the doorways is actually essential, you could always make it so the player just gets to try it again until they don’t hit the dynamite.
Thanks, I’ve already added one but forgot to show it There’s an “evil” you which reset the puzzle when you touch it, I’ve also took inspiration from Skylander for it. But indeed another fail condition could be interesting!
I miss Skylanders. While the mini-games were never my favorite part, at all, I still do like the concept of these rotation puzzles.
Question, how fun are these to design and what’s your current methodology?
I imagine designing a puzzle is an even bigger puzzle.
To try if the puzzle mechanic worked correctly I’ve created a script in Ocaml to generate random puzzles with the number of walls/keys fixed by myself. I also made sure that the script generates valid puzzles
Even if I haven’t started to create the puzzles that I’ll use in the finaI game, I think I’ll maybe generate random puzzles and modify them to make them interesting
That’s pretty cool. I didn’t think they were randomly generated.
Maybe you could make an endless mode or something similar with that.
That’s a good idea! I would only need to translate my script to gd-script and find a way to handle the generating time as it can takes several seconds to generate a single puzzle
Several seconds of loading is negligible compared to the infinite replay value of of a puzzle generator.
Maybe you can preload the next puzzle? There’s actually a lot you can do to mitigate potential loading issues.
That’s smart the player would have to wait only for the first one
Hi, it’s me again. I created the door sprite. I made so it’s very easy to change the door size with export variables:
And then I just need to change the different nodes parameters to match with the choosen size:
doorBackground.scale = Vector2(doorWidth, doorHeight)
doorForground.scale = Vector2(doorWidth-2, doorHeight-2)
doorBackground.position = Vector2(-doorWidth/2, -doorHeight/2)
doorForground.position = Vector2(-(doorWidth-2)/2, -(doorHeight-2)/2)
topLeft.position = Vector2(-doorWidth/2, -doorHeight/2)
topRight.position = Vector2(doorWidth/2, -doorHeight/2)
bottomLeft.position = Vector2(-doorWidth/2, doorHeight/2)
bottomRight.position = Vector2(doorWidth/2, doorHeight/2)
hitbox.scale = Vector2(doorWidth, doorHeight)
Here’s the result: