There are oil flow problems to the VCT piston and phaser. The camshaft phaser is damaged and gets stuck in the retarded position. The Variable Camshaft Timing (VCT) oil control valve (OCV) gets stuck in the open position. This over-retarded timing condition could be during the advancing or retarding phase of the camshaft timing.
P0022 is the OBD-II generic code which indicates that the Engine Control Module (ECM) has determined the intake camshaft timing for bank 2 is more retarded than what the ECM has commanded it be. Then, in the Scenes folder, create a new file called GameScene.js and add the following code to it:Įxport default class GameScene extends Phaser.Camshaft Position A - Timing Over-Retarded (Bank 2) What the P0022 code means In the Config folder, create a new file called config.js and add the following code to it: In your project folder, go into the src folder and create two new folders: Config and Scenes. We are going to take the game logic and the Phaser config, and put those components in their own files. The first thing we are going to do is take all of the logic from the index.js file and split it into multiple files. With the basic project setup, we can start creating our template. Now, if you open your browser and visit: you should see that your Phaser game is running. To make sure everything installed correctly, run the command: npm run start , and you should see a message that states webpack was compiled successfully. This will take a few seconds to run, and once it is done, you should see a message that a number of packages was added to your project. In your terminal, navigate to the template folder, and run the following command: npm install .
(Note: For the rest of this tutorial, I will just be using the word terminal.)Īfter you get a copy of the template files, you will need to install the required Node dependencies to get the template to run. To clone the repository, copy the URL that is shown, and in your terminal or command prompt, run the following command:
Then, click on the ‘Download ZIP’ button and extract the contents of the folder.
To download the repository, visit the GitHub link and click on the green ‘Clone or download’ button, and you should see the following: You can obtain a copy of this template in one of two ways:ġ) You can use Git to clone the repository locallyĢ) Or you can download a zipped version of the repository from GitHub Project Setupįor this tutorial, we are going to use the Phaser 3 Webpack Project Template as a starting point for our template, and it can be found here on GitHub. If you are not familiar with these concepts, you will still be able to follow along.
If you are not familiar with these concepts, you will be able to follow along with the tutorial, but we will not be covering these topics in depth. If you would like to learn more about these concepts or would like a refresher, you can check out the How to Create a Game with Phaser 3 tutorial here on GameDev Academy.Īlso, for this tutorial, it is recommended that you are familiar with Git and NodeJS, but it is a not a requirement for this tutorial. Basic to intermediate JavaScript skillsįor this tutorial, it is recommended that you are familiar with basic Phaser concepts such as scenes, setting up the config for your game, running your game locally, etc.