Which repository to clone from GitHub in order to get functional Phaser 2

Hello, I am new with Phaser. Initially I downloaded Phaser 3.15.1, as this was the latest version, but without realising I followed a tutorial for Phaser 2. So rather than rewriting my code to fit with Phaser 3, I decided to download Phaser 2, however, when I cloned the Phaser CE repository form GitHub and tried to run the code unfortunately the JS and HTML still access Phaser 3’s JS file rather than Phaser CE’s, even if I have placed the Phaser CE JS file in my JS file to be accessed. Therefore, my question is: do I have to delete Phaser 3’s JS file in order to run Phaser CE or have I cloned the incorrect repository (here is the link to the repository I cloned: https://github.com/photonstorm/phaser-ce )

It sounds like you aren’t using webpack correct?

Did you overwrite the phaser 3 file or place them side by side?

Welcome to Phaser CE :slight_smile:
Phaser CE and Phaser 3 uses the same JS file name called phaser.js or phaser.min.js for the minified version
You can find the build in the folder /build of https://github.com/photonstorm/phaser-ce
Try to look at this one https://github.com/albator2018

How would I use Webpack correctly, and no I don’t think I overwrote the phaser 3 file

Ok, I have the correct repository, I think there might be an issue with how I write my html and access the JS file. Below is my HTML and images of the relevant folders:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NightlyNeighboursUsingPhaser</title>
<script type="text/javascript" src="js/Phaser.js"</script>
<script type="text/javascript" src="js/Boot.js"</script>
<script type="text/javascript" src="js/Preload.js"</script>
<script type="text/javascript" src ="js/NightlyNeighbours1WithPhaser.js"</script>
<script type="text/javascript">
(function(){



 game=newPhaser.Game(window.innerWidth*window.devicePixelRatio,window.innerHeight*w indow.devicePixelRatio,Phaser.AUTO);
game.state.add("Boot",Boot);
game.state.add("Preload",Preload); 
game.state.add("NightlyNeighbours1WithPhaser",Main); 
game.state.start("Boot");
})();
</script>
</head>
<body>
</body>
</html>

The image above shows the js folder where all of the scripts are

1 Like

Make sure when you test it, you have the browser set to automatically skip the cache. Chrome does this by default if you have Dev Tools open (which I would strongly recommend, I coded literally all of Phaser with Chrome Dev Tools open, all the time!) - then you can also see errors and which version of Phaser is running and being used.