Dot to Dot game - is it possible
Hi guys,
I've spent the last couple of weeks working on a number of childrens educational games, and have managed to develop a number of little games.
I'm now trying to work out how to make a very simple dot to dot game - for example (you have to draw lines to say 6 points to make a picture).
I've started to develop the idea but am getting stuck quite near the start with this one - does anyone have any suggestions on how I could program this? nothing to advanced, just simple.
I've been trying to work out how the programin should go, but for the life of me I cant quite get it. I'm more than happy to send anyone what I've done so far (I've only spent a hour or so on it, so there really isnt much to see) - but I would love to get this going, and am more than happy to send any files required to try and get this done.
Many thanks as always (the help from this forum is always great, so thanks to you all).
Chris
I've spent the last couple of weeks working on a number of childrens educational games, and have managed to develop a number of little games.
I'm now trying to work out how to make a very simple dot to dot game - for example (you have to draw lines to say 6 points to make a picture).
I've started to develop the idea but am getting stuck quite near the start with this one - does anyone have any suggestions on how I could program this? nothing to advanced, just simple.
I've been trying to work out how the programin should go, but for the life of me I cant quite get it. I'm more than happy to send anyone what I've done so far (I've only spent a hour or so on it, so there really isnt much to see) - but I would love to get this going, and am more than happy to send any files required to try and get this done.
Many thanks as always (the help from this forum is always great, so thanks to you all).
Chris
Comments
This will easily let you draw from dot to dot. The hard part is going to be detecting if the dots have truly been connected.
Here's an idea:
The line drawing demo works by creating line segments and adjusting their width and their rotation so that all the line segments come to gather to form a smooth (kind of) line that follows the path of your finger. So what you could do is create a game attribute called game.TotalLineDistance (integer). Each time a new segment is spawned you would add its width to this attribute (change attribute game.TotalLineDistance to game.TotalLineDistance + self.width). Then you could also use magnitude to determine the distance between the dots. Then you could compare the total line distance to the distance between dots. If the two numbers are close (game.TotalLineDistance would have to be ≥ distance between dots) and the segments overlap with the first and second dot you know that the player has successfully connected the dots. It would seem that this method could work but might get really tricky with lots of dots.
Anyways, hopefully this sets you on a path that gets you to a workable solution.
Best of luck!
Thank you so much for the advice above. All the information is really useful, so thank you for that. I'm going to give it a go and will let you know how I get on.
Thanks again for your help.
Chris