Basically i'm writing a small RPG (and I mean small) made for two players (if I somehow become a master of programming during the course of this i'll increase the player count but I seriously can't see that happening, but I think I can handle two players well enough) and currently I use keypad control which is bad, I really don't like it.
I want to use the mouse to move "the player" (well the sprites I use to make up a tile based BG truthfully) so I wrote the controls to be simple if MouseX > etc etc and it works "ok". The problem really is the threshholds between directions, I don't like it. (four rectangles at the edges basically)
My idea is to simpley divide the game area (640x480 not including GUIS) into 4 triangles (simply drawing an X from corner to corner). The problem is my math doesn't appear to have the answer to corrcetly Identifying the area the mouse is within.
So basically i'm asking if anyone could either give me a (or 4 seperate ifs) formula to work with
or give me some advice on where to start with it.
I would be greatful for any help at all really.
Thanks in advance for any help.
To be no more, sad cure.