Hello Siva. Would it be possible for you to post the code you used for this project? I'm attempting to make something similar in Java, and I'm interested in seeing what methods you used here.
I did try using GameMaker first, but I have essentially no grasp of GML except where it resembles Java or Python.