Widdershins. How to make game recognize if the player performs correct moves

Started by strangeDetective, Fri 09/12/2016 22:15:31

Previous topic - Next topic

strangeDetective

Well I'm trying to figure out a way to implement a puzzle and I actually can't even guess what term's to search on to see if anyone else has tried to do this, so hoping somebody might be able to help or nudge me in the right direction.

Basically, I want to figure out a way that if the player walks around in a circle three times, going counter-clockwise, then a variable in the game gets set which will then enable another possible interaction.

I'm wondering how you would make the game recognize that you completed walking around in a circle completing the entire cycle 3x without deviating?

You've probably heard the idea in fairy tales about the boy who chases his little sister around a Church counter-clockwise, and they're both magically transported to Elfland. Well that's similar to what I'm trying to do but not quite sure how to even start. If anyone had any ideas or suggestions to get me going much appreciated!

Cassiebsg

Might not be the best way, but depending on your BG, I would probably suggest to draw regions on the circle's path, and then use them to check if the player has stepped on it and if the previous region was the correct one (you want to use a variable to keep track of the last region, as am not sure you can detect the previous region)...
like going from point A->B->C->D->A (or more points if 4 isn't enough)... so if he stepps on B and the previous was A, then you could add to a counter +1... otherwise reset the counter. Once the counter reachs 3x check points (in this case 12), then release the event...

Edit: You can eventually draw an outter region to reset the counter, if the player strays from the path... depending on how hard you want to make it.
There are those who believe that life here began out there...

Danvzare

While I think Cassie has the best idea, I want to add another idea just in case.
Personally if I was you, I would've created four backgrounds, each showing a different side of a building or something, and just have the player go around that building by having them go from background to background in a very specific order. Obviously resetting the variable as soon as they divert from the path by going to a different background than what is expected.

It would be a bit like how you ran around that building on Monkey Island 2, while you were being chased by that chef.

Slasher

Also whether the walking around the circle is a blocking function or not..

If it is then its easy peasy using a walkable area, destinations x y, 2 regions, player's loop is 1 for correct way, a variable and Labels (nod)

It would of course be easier if we saw the background.

Here is a crude mock version:

[embed=700,450]http://youtu.be/cLtBrkhgHgk[/embed]

Hope this helps...







strangeDetective

Thanks everyone for the tips, I'm still trying to work it out the scene I'm trying to implement it in is just a single room where you walk around a central object placed in the center, it's not a building or anything so using multiple screens wouldn't work in this case--but that actually gave me a great idea and I may use that in another part of the game. I'll see what I can do.

strangeDetective

Quote from: slasher on Sat 10/12/2016 11:33:47
Also whether the walking around the circle is a blocking function or not..

If it is then its easy peasy using a walkable area, destinations x y, 2 regions, player's loop is 1 for correct way, a variable and Labels (nod)

It would of course be easier if we saw the background.

Here is a crude mock version:

Hope this helps...

Hey thanks, I would like to see the video demo but it says its set to private and cannot be viewed? If you could check that when you get a chance I'd like to take a look.

Slasher


Snarky

Cassie's region approach is probably the best solution, but it depends a little on exactly how you want it to work, i.e. what the rules are for "breaking" the cycle. Like, if you stop for a while, is that OK? If you do another interaction halfway through that doesn't move you out of the circle (like look at an object)? Or if you stop, walk the other way a little bit, and then turn around again and continue circling? The stricter you are, the more you'll ensure that the actions will really correspond to "run around the circle three times" as you imagine it, but the harder it will be for players to carry it out without a slip-up.

I like the idea, BTW. It's the sort of non-standard puzzle that adventure games should have more of.

strangeDetective

Quote from: slasher on Mon 12/12/2016 15:02:33
You Tube states it's Public..

or go

https://www.youtube.com/watch?v=cLtBrkhgHgk

Hey thanks I got it to play, not sure why it said the video was private before. That's pretty much what I want it to do, any chance I could see the code you used to do that - would probably save me hours of trying to implement it with trial and error? :)

strangeDetective

Quote from: Snarky on Mon 12/12/2016 15:18:15
Cassie's region approach is probably the best solution, but it depends a little on exactly how you want it to work, i.e. what the rules are for "breaking" the cycle. Like, if you stop for a while, is that OK? If you do another interaction halfway through that doesn't move you out of the circle (like look at an object)? Or if you stop, walk the other way a little bit, and then turn around again and continue circling? The stricter you are, the more you'll ensure that the actions will really correspond to "run around the circle three times" as you imagine it, but the harder it will be for players to carry it out without a slip-up.

I like the idea, BTW. It's the sort of non-standard puzzle that adventure games should have more of.

Yeah, according to the kind of medieval folklore I'm basing the puzzle on, the idea was lets say you have a grassy mound (or fairy hill encircled by a ring of toadstools) if you walked around it counter-clockwise 3x's without stopping, a magical doorway to Elfland would open up in the side of the hill and you would be able to enter.

Like Cassie's approach (thanks Cassie), I was experimenting a little bit by setting up regions around the hill, kind of like a baseball field diamond with four regions, and once the game has counted that you have gone around the hill 3 x in the right direction, hitting all the regions in the correct sequence, a doorway opens up on the hillside like Slashers example. That would just be a hotspot enabled/disabled, wen  variable is triggered.

If you break the cycle before completing the circuit 3x (as in do anything else) then technically the magical door should not open.

I would probably like to add a clue to the player that let's them know they're on the right track, when they complete a full circle the player could say something like "okay, that's one time around the circle..." and if they break the cycle, the game could prompt them and let them know they have to start all over again.

I haven't had a lot of time yet to fully experiment with the idea but am going to try to do a little today and see where I can get.





SMF spam blocked by CleanTalk