-
Notifications
You must be signed in to change notification settings - Fork 0
Debug mode
Debug mode A specific build allows the developer to test a game on local before it is actually uploaded to our services.
Since some of the features implemented into GamifiveSDK depend on Gamifive's environment (API, configuration, etc.), the debug mode provides mocks for these features in order to simulate Gamifive's environment.
- Include the debug SDK version in your index.html do not forget to change debug with dist in the script tag before send the package
<script src="http://static.newton.pm/js/v2.2.3/newton.min.js"></script>
<script src="http://s.motime.com/js/wl/webstore_html5game/gfsdk/2.x.x/debug/gfsdk.js"></script> <script id="gfsdk" src="http://s.motime.com/js/wl/webstore_html5game/gfsdk/dist/gfsdk.min.js"></script>- Serve statically the game folder with appsworld.gamifive-app.com as origin
For the second point you need:
- Mac Users can follow this guide: http://blog.teamtreehouse.com/install-node-js-npm-mac
- Windows Users can follow this one: http://blog.teamtreehouse.com/install-node-js-npm-windows (Some other of billions guides on the web anyway will be ok)
npm install http-server -gAdd this line
127.0.0.1 local.appsworld.gamifive-app.cominto your hosts file
/private/etc/hosts file (Mac)
C:\Windows\System32\drivers\etc\hosts (Windows)On Mac you can simply append this line at the end of the file in this way:
sudo -i # Enter the password
sudo echo '127.0.0.1 local.appsworld.gamifive-app.com' >> /private/etc/hosts;
exit(Guide to edit hosts file on any platform http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/)
Serve the gamepath in this way from the cmd line
http-server <myAwesomeGameFolder> -p 5050 -a local.appsworld.gamifive-app.comThen open the browser to
http://local.appsworld.gamifive-app.com:5050/index.htmlThat's it! Now you can test your implementation of the SDK. Open a issue on github if you encounter any issues