Question: I've got a Windows API Window. I've managed to make it windowed, and "fullscreen windowed". But I can't seem to make the window just full-screen- for example, even if I specify `WS_POPUP`, I can still freely move the cursor to my second screen. However, if I launch full-screen games, they don't permit it, and exist only exclusively or minimized. How can I make a window that behaves this way?

Edit: Excuse me. Limiting the mouse movement was just one example of how a full-screen window behaves differently to a non-fullscreen window, I'm not looking for how to limit the mouse movement.

Or is this *set* in the D3DPRESENT\_PARAMETERS, rather than just communicated?

Answer: 
Depends on the type of game. For a platformer, your movement is basically a large series of hacks, comprised of a lot of ray tests and highly specialized logic. For a top-down action game, you should have a basic physics/collision system that's independent of any particular type of game object, and player controls just set velocities/forces that move the avatar in the indicated direction. Other types of games have other types of controls and use less or more physics engine as appropriate.

In general, though, you have some kind of concept of a physics object. Players, enemies, items, etc. all have a physics component. This component in tandem with the physics engine (which knows about the level layout, among other things) will "correct" motion in response to collision. The player component then responds to movement requests by setting forces, which push the player around, and the physics component deals with things like "the object is moving into a wall, push it back out again and adjust accordingly."

If you provide more information on what exactly you're trying to do, someone may be able to provide a more detailed answer.
There is really no right way to do this, because you are talking collisions and character control it really boils down to exactly the problem you are trying to solve, as no matter your approach you are going to have to look at your game mechanics and see if it fits ( order of resolution etc.. ).

My approach to this problem and as it seems you want to keep a certain level of abstraction would be to different layers that process the player data, so if your player controlled object has a velocity and a direction then these would be updated based on the input, these inputs are not checked against anything, the input knows about the player object and simply updates its values, this would be your first layer.

After this first stage is done, your map system then needs to scan through the data and validate it, at this point all controller input has been resolved, the map can then decide to accept or change the forces ( velocity and direction ) associated with player entity based on collisions, wind, whatever can affect the player movement, this is your second layer that affects the data.

The last and final stage would be to simply update any entities position based on their direction and velocity ( as is ), this movement is assumed correct, this could mean the velocity is 0 because he collided with a wall, or he is now being taken on the opposite direction by a river he stepped in.

The key in this type of solution is to have different layers that affect your data, after each successive stage your data is assumed correct and valid for all previous stages, which means each processing stage could be designed to be plugged in and out at run time and even re-ordered.