PY-1.4-BP6-MQ90

Our Goal: Put Your Game Live on the Internet!

In this lesson, you will put your game live on the internet for everyone to play! You will go to your GitHub project's settings and tell GitHub Pages to show your game from the main branch. Then, you will wait a little bit and check a special web address to make sure your game is working online.

Get Ready to Go Live

Before you tell GitHub to put your game online, let's make sure your project is ready.

Go to your GitHub project page. Make sure the main branch has all your web-ready files. This includes your index.html file and any other files that help your game work on the web (like .js and .wasm files).

This is important because GitHub Pages will use these files to show your game.

Set Up GitHub Pages

Now, you will tell GitHub Pages to show your game. Follow these steps:

  1. Go to the 'Settings' page of your GitHub project.
  2. On the left side, find and click on 'Pages'.
  3. Look for 'Build and deployment'. Make sure 'Deploy from a branch' is chosen.
  4. Under 'Branch', choose the 'main' branch. This is where your game's web files are.
  5. Choose the folder where your index.html file is. It might be the main folder (/) or a folder named web (/web).
  6. Click the 'Save' button.

Now, GitHub will start building your game website! This might take a few minutes.

Check Your Work Again

You've set up GitHub Pages! Now, let's check to make sure your game is live on the internet.

  1. Go back to the 'Settings' -> 'Pages' section of your GitHub project. You should see a web address (URL) where your game is live.
  2. Click on that web address. Your game should open in your web browser and work!

If you see your game playing, you did a great job! Your game is now live on the internet!

Documentation

Documentation not available for PY-1.4-BP6.