ID:116490
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Suggestion: Allowing control of the mouse location to create your own tether, or create a bounding box (ie: the map). This would allow fast paced games to keep the mouse within the map, and not click outside of it. An example would be a game I recently did:
http://www.byond.com/games/Megablaze/Freeze_Bomb

It could also be useful in other scenarios as dragging something across the map, it would allow the dragged object to stay within the bounds of the map, or bounds of the window.
This feature would improve Decadence as well as other upcoming action titles.

The way I'd suggest handling it is by giving maps a new true/false setting. While true, the focused map prevents the user's cursor from going outside of the map. Setting the flag to false simply releases the cursor, allowing the user to scroll outside of the map once more. If the flag is set to true while the player's cursor is already outside of the map, simply "snap" the cursor to the nearest edge of the focused map.
Pretty much any game that makes extensive usage of the mouse would benefit greatly from this. For me, it'd be my shootah-type games that I plan on playing with.

I agree with Antx's design. A simple map parameter would do nicely.
Wouldn't this cause a problem for people who want to move the mouse outside? They'd be 'trapped' in the map unable to leave the game, etc. I guess developers would need to be competent enough to prevent that.
Most games which use this sort of mechanic allow the player to press Escape in order to release their mouse.
Exactly it would be up to the developer to make an easy escape. Right now you can make a game go full screen and remove close/minimize/maximize making it impossible to close unless they changed windows and force close it with task manager. Developers who make use of certain features as this usually make a simple feature to escape.
There are plenty of Windows macros that allow you to escape such a situation; Alt+Tab, Windows, Windows+D, Alt+Ctrl+Del, et cetera.
Bump.
This would make a great addition to games that use the mouse to scroll the map (like RTS), since you would never have to worry about the mouse going past the edge.

Another idea you might derive from this is to make the map edges "resist" the mouse's movement, for a certain distance, so you would have to move the mouse further than normal, in order for it to leave the map area. I think this would make a good compromise; enforcing the restraints necessary for smooth gameplay, while still allowing the flexibility of moving the mouse freely in and out of the game.

All of this is just pure speculation though, since this feature sounds very much like a client-side hack, so I don't know how you could program in any kind of variable mouse "resistance". I have to wonder if such hacks would even work from within the flash client.
This feature is well overdue.
Bump. Along with precise mouse detection, mouse grabbing would be really helpful for a game like this one, or a shooter, or whatever.