Controls: Mouse over boxes starting from green to the orange in order of the path. No clicking required. Clicking will cancel the match and you'll have to retry again. 

This is originally for mobile, so some things might be weird.  There are a total of 4 total patterns(  shaped like  : e, phi, snake, x very similar to some patterns in harry potter). If you finish a pattern, the image will pop back up and grow bigger and fade out. If you mess up, it just reboots the pattern.

I've been playing a lot of Harry Potter mobile lately that I've decided to make a swipe gesture matching thingy in Unity. I am not sure if it is the best way to do it, but I basically just use the image UI and check if the player has moused over it.  It can only be activated if the box (waypoint) previous to it has been touched. So I guess kind of visually like a singly linked list. This might be the easiest way to go about it without some pattern matching algorithm. It just checks if you get the end and some events in scriptable objects trigger and magic happens. 

There are two boxes when trying to match. The big boxes (waypoints) are the important ones you have to mouse over and follow through the path. It starts from the green box first and ends at the orange box. If you mouse over it, it will turn red if you follow the path correctly. The small boxes (fill points) are the accuracy boxes. They will turn green. The order in which they are moused over doesn't matter.

After I clean the code a bit and organize some things, I hope to distribute this and maybe make a youtube series about how this is done.  But if I never get to that point, the gist of it is done applying the observer pattern using  scriptable objects event game architecture from this talk: Unity Austin 2017 Scriptable Objects by Ryan Hipple

Let me know if you have any questions about it!  I'll upload my reference images of me testing out the pattern matching and trying to figure out how I think  the pattern matching works in the Harry Potter mobile game.Here are the reference images: hp reference images

StatusPrototype
PlatformsAndroid, HTML5
Authordrw
Made withUnity

Download

Download NowName your own price

Click download now to get access to the following files:

swipeMatching.apk 26 MB

Leave a comment

Log in with itch.io to leave a comment.