Getting started with AirConsol...

Testing your game

8min

The Simulator

The AirConsole simulator makes it easy for you to test your game. It provides a way to load your game into the AirConsole environment and shows you the screen and (on start) two controllers. With that you can easily play your game in one browser window without having to use another device, such as a smartphone.

Document image


How to access the simulator

The website on which your game runs has to be accessible - either by an IP or an URL. To load your game simply replace YOUR_IP_OR_URL with your games-location: If you use a local ip, use:

http://http.airconsole.com/simulator/#debug:YOUR_IP_OR_URL

If you use a https reachable game, use:

https://www.airconsole.com/simulator/#debug:YOUR_URL

For example the pong game's testing url is:

https://www.airconsole.com/simulator/#debug:https://game.airconsole.com/com.airconsole.testpong.cdn.airconsole.com/2024-02-14-14-52-40/

Or if hosted on localhost:

http://http.airconsole.com/simulator/#debug:http://192.168.0.1/
NOTE: AirConsole will try to access the /screen.html and a /controller.html, so make sure its accessible in the root url.

Join with your smartphone

Of course you can additionally join with your smartphone. Just connect your phone like you would normally connect to a game: go to airconsole.com and enter the code which appears in the developer consoles top right.

NOTE: If you are testing with real smartphones, make sure you do not use http://localhost/ or http://127.0.0.1/, because localhost is not your computer on the phone but the phone itself! Also make sure your devices are visible within the network to each other.

Test https with ngrok

Once your game is uploaded to the AirConsole store, it will be accessed via https. This means all your external resources you load in your game have to be loaded through https too.

Document image


To simulate https locally we recommend to use ngrok or cloudflare tunnels.



  1. Go to ngrok-website download and install ngrok. :)
  2. (Optional for unix-based systems: Add to path: sudo mv ngrok /usr/local/bin)
  3. Execute ngrok in the terminal: ngrok http 8000 (Assuming 8000 is the port your local webserver is running at).
  4. Ngrok will display some urls now -> copy the https url and try if it works in the simulator.

Example

Your game url on localhost is running at192.10.20.42:8080and the URL from ngrok (ngrok http 8080) ishttps://cb501143.ngrok.io. To test your game in the simulator with https open:

https://www.airconsole.com/simulator/#https://cb501143.ngrok.io/

Troubleshooting: Using Airconsole on a standard University/Corporate network

This issue can also be solved by using ngrok (see above). This way you can make your localhost public even if there is client isolation.

Note to Unity Developers: You need the latest airconsole unity plugin from github.com released on 2016-02-01 and you should select "Normal" as the browser start mode.