Set Up the Files Place all the files in a single folder on your computer to ensure proper linking between assets.
Install a Local Server (Optional) To test the game effectively and ensure JavaScript functionality:
Using Python:
Open a terminal or command prompt.
Navigate to the folder containing the game files.
Run python -m http.server (Python 3) or python -m SimpleHTTPServer (Python 2).
Open a browser and go to http://localhost:8000.
Using Visual Studio Code:
Install the “Live Server” extension.
Open the game folder in Visual Studio Code.
Right-click index.html and select “Open with Live Server.”
Browser Compatibility Use modern browsers like Google Chrome, Firefox, or Microsoft Edge for the best experience. Ensure JavaScript is enabled.
How to Use
Start the Game
Open the index.html file in a browser (double-click if running locally without a server).
If using a local server, navigate to the provided URL (e.g., http://localhost:8000).
Play the Game
Player Controls:
Arrow Left: Move left.
Arrow Right: Move right.
Spacebar: Jump between platforms.
Objective:
Explore the city and collect trash items.
Sort items into recyclable and non-recyclable categories.
Mechanics:
Static and moving platforms require precise timing and navigation.
Game Feedback
Correctly sorted trash items provide points and positive audio feedback.
Mistakes result in visual alerts and reduced scores.
Winning the Game Successfully sort enough trash within the time limit to achieve the highest score and complete the game’s mission of environmental awareness.