Me beating Jordan's Jet Slalom 2 Record. CSC 471 Final Project - Jet Slalom Recreation Matthew Coats Project Description. My project is a recreation of the old flash game 'Jet Slalom.' Jet Slalom was an endless high score game in which the player drives a hovercraft across an infinite plane. The infinite plane is a large grass field that contains cone obstacles that the driver must avoid.
Matthew Coats
Project Description
My project is a recreation of the old flash game 'Jet Slalom.' Jet Slalom was an endless high score game in which the player drives a hovercraft across an infinite plane. The infinite plane is a large grass field that contains cone obstacles that the driver must avoid. The number of obstacles increases over time. The hovercraft is always moving forward, but the player can use the 'A' and 'D' keys to move left and right to dodge the obstacles.
When I played this game as a child, the obstacles were simple, 2D triangles that had varying solid colors. I recreated the game with improved graphics, including 3D cones and shading/lighting throughout the world. I used parametric equations with converging radiuses to generate the vertex data for the 3D cones. I used an obj file from the internet for the hovercraft. The hovercraft rotates about the z-axis when turning left and right. I'm using rectangular collision boxes to detect if the player hits an obstacle. When a collision occurs, the hovercraft is stopped, explosion particles emit from it, and the number of seconds the player survived is printed to the terminal.
In its current state, the game is 'pseudo-endless,' meaning that the map is actually finite. At the end of the map, there is an unavoidable line of cone obstacles that will stop the player. However, it is extremely unlikely that the player reaches this point, since the frequency of cone obstacles increases immensely as the the end of the map gets closer. To generate the positions of the cone obstacles, I step through all of the {x, z} coordinates—using an approximate cone width as the increment—and use a random number generator to determine whether or not a cone should be placed at the current position. The percentage chance that a cone is placed is determined by the z-coordinate. As the z-coordinate gets closer to the end of the map, the chance that a cone is placed at each position increases.
I also combined this final project with my Parallel Programming final project (CSC 419). The cone obstacle generation can be done in parallel if THREADED_GEN is defined. The collision detection loop is done in parallel regardless of any constants. As a result, both the OpenMP library and the pthreads library are required for compilation. I used the pthreads-win32 library to compile the project on my Windows machine.
Below there are several images depicting the different game states mentioned above.
Results Images
Movement to the left
More obstacles
Survival time printed to terminal
Jet Slalom Free Game
Graphics Technologies Practiced/Learned
- Procedural generation of obstacles
- Collision detection
- Shading/lighting
- Using & transforming obj files
- Keyboard callbacks (want to continuously move while holding down the keys)
- Particle Systems
External Libraries
Jet Slalom Game
- pthreads (pthreads-win32 for Windows)
- OpenMP