This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.
Level are typically alot bigger than the actual screen, so we need to scroll the currently visible part around. This page collects some rules to do this in a nice way.
Analysis of some Cameras in Super Mario
Basically these are the same rules as for Yoshis Island. Maybe we will tweak it later or add special exceptions for new abilities.
- Keep the middle point of tux at 1/3rd of the screen width. If tux moves looks into the other direction, then slowly move the camera so that tux stands in the 1/3rd of the other side of the screen. This movement has to get faster if tux moves into that direction. When tux gets pushed into the other direction (but still looks forward) we don't change camera mode but just scroll when he gets pushed nearer than 1/3rd of the other side.
- We might experiment about changing the camera when tux is running to 1/4th or so. We should test if this is desirable because then you see more stuff that before you. On the other side a too dynamic camera movement can confuse and making it harder to control tux exactly.
- Basically Keep tux in the middle of the screen.
- When tux does a normal jump we don't scroll vertically until he stands on ground again or falls deeper than the high where he started the jump. An exception to this rule are trampolines.
The camera might scroll automatically so that tux can't wait but has to hurry to not get squiched by the moving camera somewhere. Ideally you can specify a path of vectors (together with speed) that the camera follows.
Right only scroll
This was used in the 0.1.1 release. It might be still used to not forget our history ;-)