Post
by Bugala » Tue May 01, 2018 6:54 pm
Having difficulty in understanding what you are trying to ask specifically, I am giving more general answer.
When thinking of what to do, will depend upon what kind of point n click to do. As example, making eye view Point n click (Think "Rise of the Dragon" for example), it is much easier than ones with actual characters walking around. In eyepoint you basically just put objects or hotspots on screen and then stuff happens when you interact with them and you dont need to worry much about things that might happen if player does something.
When there is a walking character, things become much more difficult. There comes things like should there be some sort of semi 3D in it, like if there is table in middle of a room, then should character be able to walk both in front of the table, as well as back of the table, making it in some sense 3D. There are still easy ways to achieve this, as long as you take it into consideration in your design. As example, you could simply look your characters bottom Y-Coordinate and Tables Y-Coordinate, and decide that which ever is higher, will be the one on top of the other.
But one of the hardest things is the actual walking paths. In this you can once again have some short cuts to make it easier. You could for example make several rectangle spaces to your room, and when one of these rectangle areas are being clicked, your character would move to that rectangles predecided coordinates. Good thing is, that this would make it possible for your character to move around with very little hassle, but problem is that you would be able to move your character just two pixels more towards right, as you would in practice have for example only 8 different locations where your character can come.
One way to make more freedom to movement would be to make hidden 2 color background (hidden in sense that you have a screen that is not shown ever), you compare the characters x,y to that screens x,y. If that area is black, you let the character walk, if it is white, you stop the character (making it in practice, not a path). This would let player freely move in your screen, but problem is that suppose you are at bottom left corner of screen, and then you want to go to top left corner of the screen. Good otherwise, except in this example case, your pathway is horseshoe in sideways. This means that your character tries to move directly up, but is then stuck in middle, because there is no direct path to top left corner, but you would need to go to right first.
Therefore, either you leave it as it is, or then you have to figure out a way to do path finding. Path finding can once again be done several ways, one way is to use those beofre mentioned rectangle areas as helpers, that where ever inside that rectangle your character is, it would move to that rectangles center coordinates first, and then continue along to other rectangles coordinates, until it reaches the finald coordinates rectangle and then moves freely to the actual chosen x,y location.
Anyway, depending upon your solution, actual movement could be the biggest problem you encounter. Of course, once again, you could just use that black and white background to set the pathways, and leave it for player himself to navigate it through. It might not be the most stylish solution, but it is somewhat easy to do.