HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

ActionGameControls (test map)

02-10-2009, 10:16 PM#1
Anitarf
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.
Attached Files
File type: w3xActionMapTest_optimized.w3x (152.4 KB)
02-11-2009, 12:28 AM#2
Veev
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
Archmage Owenalacaster
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
Anitarf
Quote:
Originally Posted by Veev
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).
That sounds really odd and it's not what should be happening. First of all, the acceleration itself should have no effect on the actual lag. Second, the false rightclick detection typically occurs after a leftclick. Third, I just realised that since a leftclick initiates an attack action even if a falsly detected rightclick did occur you'd have no way of knowing that because the attack action doesn't respond to a rightclick. Are you sure there were two effects, did they appear at an offset from eachother?
02-11-2009, 04:16 AM#5
Rising_Dusk
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
SeruK
I ran off the screen but it didn't crash or nuttin'.
02-11-2009, 04:47 AM#7
Rising_Dusk
I went down the bottom of the screen. Maybe that has something to do with it.
02-11-2009, 05:58 AM#8
Vestras
Cool, nice. It's better than what I made. (Mine did everything but detected right clicks)
02-11-2009, 08:52 PM#9
PenguinEmperor
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
Anitarf
Quote:
Originally Posted by PenguinEmperor
Are you releasing it as an engine or for a project?
Both, maybe. I'll likely release the MouseButtons library (like I have already done with the ArrowKeys), not sure about the actual "physics" system though.

Also, I updated the map with collision detection.
02-17-2009, 05:23 PM#11
Rising_Dusk
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
Vestras
Quote:
Originally Posted by Rising_Dusk
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.

Funny, I thought exactly the same. Except the thing with Super Smash Bros.
02-17-2009, 06:56 PM#13
Rising_Dusk
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
Anitarf
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
Rising_Dusk
Oh right, only that it was clicked, not where the click was. Hrm... I almost like the idea of speed/arrow key dependency.