The first place to look for help is the page for each block. After the explanation of each option in the config file, you’ll often find FAQs. Below, are questions that don’t apply to any specific block. We’ve also answered some of the most frequently asked questions about blocks below.

How do I test just one block?

I’ve been testing my game from the start. How do I test just one block?

To look at a specific block, you can open the folder and see the files, they’ll be an html file in that folder. Every block has just one html file in the folder except the splash block which has zero and the endgame block which has 2. In most IDEs you can just right-click on that HTML file and make a selection to run or debug it.

In Visual Studio Code, I right clicked on it and picked open with live server.

In WebStorms, I pick run or debug from the choices that popped up when I right-clicked it. You can also use the RUN menu and select the file.

I can’t find the splash screen

There is an index.html but no index block

There is no HTML file in the splash directory and I want to change the splash page. Check out the documentation for the splash page here.

This is because the first page is called index.html . Players coming to your game named Bonzo Rules will expect to go to

mysite/bonzo_rules/

and not

mysite/bonzo_rule/blocks/splash/

I get a CORS restriction in my browser

When I click on an HTML file, I get a message about CORS policy in the JavasScript console and the game does not run.

Access to script at ‘file:///Users/annmariademars/7gen-blocks-examples/_base/js/runner.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.

Okay, first of all, props to you for knowing that you can there is a console you can check, because many people are not aware of that. Secondly, you cannot run a game on your local machine just by clicking on it. You want to do one of two things to test your game:

  1. Recommended: Download some type of integrated development environment (IDE). I use WebStorms almost exclusively. Once in a while, I’ll use Dreamweaver. Other people use Visual Studio Code and I know there are other IDEs out there. While you’re at it, I highly recommended using some form of version control, like Sourcetree or Github.
  2. Upload your game to the web and run it on the web. Personally, I find this to be inefficient but if you are just making say, a quick memory game and don’t want to download and learn new stuff, you could do it this way. You’ll still need some software like Fetch or FileZilla to transfer your files.

I set up Visual Studio Code and I can’t see the files.

Any html file i try to open on Visual Studio Code, I get the message it cannot find the file.

Here is the solution that worked for me:

  • Go to the page where you install extensions. In the search box enter “Live Server” (without the quotes).
  • The top entry should be Live Server which is what you want to install. Click on the Install button next to it.
  • Now go to your project with the HTML files. When you right-click on one of the file names you should be able to see the command “Open with Live Server”. Choose that command and the file will be opened in your default browser.

This runs a local web server on your computer, which is the only way to run these files. You can’t open the files directly with your browser because nowadays there are some JavaScript features the browser will not let you use when opened as a file.