Testing Your Game
There are two ways you can test your game as you develop it:
npm run watch:live- Starts a local development server and opens your game in a browser with hot-reloading enabled
- https://xelly.games/utility
- Requires manual upload of
dist/bundle.jswhenever you change it, but may be useful when you are testing your game with browser devtools
- Requires manual upload of
Using npm run watch:live
If you created your package.json per these instructions,
then you can run:
$ npm run watch:live
This will open a browser window with your game running in it. The game will automatically reload whenever you make changes to your game's source code.
Using xelly.games/utility
- While actively coding, build your game in "watch mode":
$ npm run watch
-
As you make code changes, the game will automatically rebuild
dist/bundle.js. You can upload this file to xelly.games/utility to test your changes out as you develop. (You will have to re-upload thebundle.jseach time you want test new changes. Note that the utility tool is a local-only tool; your game is not uploaded by this tool to xelly.games or anywhere else.) -
When your game is live and running on a social feed,
console.logis disabled, but the utility tool will allow logs to the console which may be helpful for debugging your game as you develop it. -
Once you're happy with your game, you can submit it from your profile.