Darthfett / A-Priori-Physics-System

A side-scroller game based upon Mega Man X, with a priori collision detection, and objects being represented as a sequence of connected points.
3 stars 0 forks source link

Support scrolling screen according to rectangle #4

Closed Darthfett closed 12 years ago

Darthfett commented 12 years ago

Instead of always centering the world exactly on the player's position, the screen should center on a rectangle that is pushed left/right/up/down by the player's bounding box.

This will allow a player to move back and forth without the screen scrolling constantly, and avoid a traditional problem of the player appear to "walk-in-place".

Depending on the size of the rectangle, the player's vision when moving forward can be affected in an interesting way. If the camera has its own form of velocity/acceleration determined by how far the camera is from him, moving fast might add a difficulty factor of reduced forward line-of-sight, which could make super-speed levels interesting. See Mega Man X's Armoured Armadillo level just before the boss as an example of the camera effect.

Darthfett commented 12 years ago

This algorithm will have the camera immediately stop moving when the player lands. Investigate how this looks and see if things don't look better with the camera more 'bouncy'.