| 02-10-2009, 10:16 PM | #1 |
This little testmap is a preview of a fighting sidescroller game I am developing. It features a control scheme of arrow keys and mouse buttons; the engine can distinguish between left and right mouse button clicks, however it can not get the coordinates of a rightclick; also, if the player clicks on the cancel button that counts as a rightclick too. Some credit goes to Toadcop here, I have reverse-engineered this method of distinguishing left and right mouse button clicks after I've seen it used in his TCX map. Also of note is a hp and mana display system that uses the item inventory; it will look quite cool once the map starts using a custom user interface. |
| 02-11-2009, 12:28 AM | #2 |
I didn't get any false right clicks when I tested this. I realize this is a test map, but it is possible to enter the boundary of the map. Edit: I changed the Footman's acceleration to 1600 and I got false-right detection clicks. When I would jump it would make two effects and when I landed it made one. I'm assuming this is what you mean? I changed the CANCEL_MARGIN to 0.2 and I was still able to get false detection. Changing it to 0.4 eliminated them in this case (I didn't test 0.3). |
| 02-11-2009, 12:31 AM | #3 |
Didn't have any trouble with false cancel detection. The movement is a bit too sensitive to terrain slope, though; the footman will turn or slowly walk down even slight inclines. |
| 02-11-2009, 01:42 AM | #4 | |
Quote:
|
| 02-11-2009, 04:16 AM | #5 |
It's cool. I had no problems. You should probably import BoundSentinel. I managed to crash the game by running off the screen. :p |
| 02-11-2009, 04:30 AM | #6 |
I ran off the screen but it didn't crash or nuttin'. |
| 02-11-2009, 04:47 AM | #7 |
I went down the bottom of the screen. Maybe that has something to do with it. |
| 02-11-2009, 05:58 AM | #8 |
Cool, nice. It's better than what I made. (Mine did everything but detected right clicks) |
| 02-11-2009, 08:52 PM | #9 |
I'll try this when I get a chance, but this is only really novel for detecting clicks. EDIT: Owh, wow. I see why this is cool. Are you releasing it as an engine or for a project? |
| 02-17-2009, 01:49 PM | #10 | |
Quote:
Also, I updated the map with collision detection. |
| 02-17-2009, 05:23 PM | #11 |
It would be badass to do an AoS styled like Super Smash Bros (Attack on one click, spell cast on another) with a control system like this. |
| 02-17-2009, 06:06 PM | #12 | |
Quote:
Funny, I thought exactly the same. Except the thing with Super Smash Bros. |
| 02-17-2009, 06:56 PM | #13 |
One hero could do a jump attack with right click, another might have a blink. Etc. It would be really fun! |
| 02-17-2009, 07:04 PM | #14 |
Note that rightclick cannot detect the coordinates with this method, so you'd either need to follow it up with a leftclick or make it dependant on current speed/which arrow keys are currently pressed. |
| 02-17-2009, 07:22 PM | #15 |
Oh right, only that it was clicked, not where the click was. Hrm... I almost like the idea of speed/arrow key dependency. |
