JumpLab: an experiment software for the analysis of 'jump' for platformer game

Introduction

JumpLab is a software that allows you to experiment with variable parameters for jumping and camera movement in platform games (jump action games) such as Super Mario Bros. It is designed as an educational tool for learning how parameter settings affect the sense of playing in video games.

Install & Run

JumpLab runs on Processing 3 or later. Plus, it requires an additional GUI library ControlP5. From the menubar, choose Sketch→Import Library...→Add Library... then type "controlP5" in the search window to install it.

When the Processing and ControlP5 are ready, download the ZIP file containing the source code from the following link, extract it, and run it from Processing.

Usage

When JumpLab is launched, the following screen will appear:

You can use the left and right arrow kyes to move the purple character left and right, and the space key to make it jump.

You can change the following parameters:

SHOW TRAIL
Displays the motion trail of the player character. (last 64 frames)
CENTER MARKER
Displays a red crosshair marker in the center of the camera view. It is useful to check if the player character is in the center of the view.
PARALLAX SCROLLING
Choose whether or not to parallax scroll the background; stopping the parallax scrolling makes the camera motion more intensely.
CAMERA EASING
Easing the camera motion. You can see the effect of easing by displaying the center marker.
ALLOW AERIAL JUMP
During the jump prep motion, if the player character overhangs the foothold, it can still jump. Turning this off will increase the rate of cliffhanger jump failures.
ALLOW AERIAL WALK
During a fall due to factors other than jumping, the acceleration of the horizontal movement will be the same as during a normal run. Turning it off will make it harder to control when descending from footholds.
MAX VX / MAX VY
Maximum horizontal and vertical speed. When the character is rising by a jump, the vertical speed of the rising is not limited by MAX VY.
JUMP VELOCITY
Initial vertical velocity of the jump.
JUMP ANTICIPATION FRAMES
The number of frames to perform a preliminary jumping motion. The larger it is, the longer it will take to jump up after you press the space key.
GRAVITY (RISING)
The force during the rising phase of a jump.
GRAVITY (FALLING)
The force during the falling phase of a jump.
X ACCELL (NORMAL)
Horizontal acceleration that is applied during normal running on the foothold.
X ACCELL (BRAKING)
Horizontal acceleration that is applied when you try to run in the opposite direction of your current movement. In short, it's how hard you brake.
X ACCELL (JUMPING)
Horizontal acceleration that is applied when you use the left/right keys during a jump. If 'ALLOW AERIAL WALK' is turned off, this acceleration is applied when descending from footholds.
CAMERA EASING COEF (NORMAL)
Adjusts how smoothly the camera moves when easing is enabled for the camera. A lower value means smoother motion.
CAMERA EASING COEF (GROUNDING)
Adjusts how smoothly the camera moves when the player character lands on the ground. A lower value means smoother motion.

Experiments

The standard settings are suitable for slightly challenging platform games that require frequent climbs and descents using footholds and fine tuning of the jump distance. Let's experiment with different parameters to see how the player character's behavior changes.

Thanks to Aerial Control

If 'X ACCELL (JUMPING)' is set to 0, no aerial control is possible and strict control is required during jumps. This tells us the great advantage of aerial control.

Symmetrical/asymmetrical Gravity

If you set 'GRAVITY (FALLING)' to the same value as 'GRAVITY' (0.5 by default), the trail of a jump wll draw a physically familiar, symmetrical parabola. With this setting, try descending a stair-stepped section, or stepping down from a high foothold and compare the sensation you get from it. Then try to set both of them to about 1.2 and 'Jump VELOCITY' to 22, and see what happens.

Effects of Camera Easing

JumpLab allows you to apply easing only to the vertical movement of the camera. This allows you to compare and verify the different impressions of the different camera behavior during jumps. Let's try switching 'CAMERA EASING' on and off with various jump parameters.

When you turn off camera easing, you can also disable 'PARALLAX SCROLLING' too to get a clearer impression.

For further reading of the camera motion, Itay Keren "Scroll Back: The Theory and Practice of Cameras in Side-Scrollers" is recommended.

Repository

The git repository of JumpLab is hosted by GitHub.

Memorandum

The collision detection between the player character and obstacles is implemented in a much older way in JumpLab. This is a remnant from the early development stage, when one of our goals was to reproduce old games' bugs (actually not implemented yet). If you want to make a new platform game, we do not recommend you to use our code as reference.

TODOs

License

JumpLab is released under the terms of the GNU GPL 3.0.

JumpLab: an experiment software for the analysis of 'jump' for platformer game

Copyright (C) 2020 Kentaro Fukuchi

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.