![Excitebike](https://kumkoniak.com/71.jpg)
![Excitebike Excitebike](https://nepascene.com/wp-content/uploads/2016/06/excitebike-nes-1024x768.jpg)
We want to snap the bike to the four lanes of the track, but we also need to allow the player to move the bike from lane to lane, which we do by capturing the up and down keys in the on_key_down() function. We can keep the track looping round by detecting when we’ve reached the end of the data, and then set the trackPos variable back to 0 and reset our lap time counter. In the update() function, we need to capture the left and right keys to slow down and speed up the bike, and then calculate the track position based on the bike’s current speed. The draw() function is straightforward and just draws a background, then calls the drawTrack() function, draws the bike Actor, and then writes text to show us the lap timer and the last lap completion time. Our motocross racing homage to Excitebike We also have another list to show where the bits of debris need to be the numbers represent the track lanes 1 to 4, with 0 being no debris. To keep it simple, we’ll have 0 representing a plain track block, 1 for a jump block, and 2 for the start/finish line.
![Excitebike Excitebike](https://thekingofgrabs.files.wordpress.com/2018/07/excitebike-nes-11.png)
We can set up our track data with a list of integers that will represent track blocks. The bike’s Y coordinate will change as the bike moves from lane to lane or jumps over ramps. Using Pygame Zero and the time module for keeping track of our lap times, we need to set up our bike Actor that will stay in the same X coordinate position. We’ll add ramps to jump and bits of debris to avoid. In this example, we’ll replicate the scrolling track, which moves faster as the player speeds up. The player must try to keep the momentum of their bike going to get the best time. The smooth, side-scrolling motorcycle racer laid the technical foundations for the way Super Mario later moved around his world.Įxcitebike allows a player to race against three computer-controlled opponents along a track that has ramps to jump and debris to avoid. Later that year, Nintendo ported Excitebike to arcades as it became one of its best-selling console games. Most early games started out as coin-ops, but in 1984, Nintendo first released Excitebike on the NES. Nintendo’s original hit is still wheely, wheely fun today (sorry)
![Excitebike](https://kumkoniak.com/71.jpg)