Video Poker documentation

By Andrey Krepyshev

  1. Introduction
  2. File structure
  3. Quickstart
  4. Embedding the game into a custom HTML element on your page
  5. Reskinning the game
  6. Building a native mobile app
 

Introduction

Thank you for purchasing this game.

If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form.

File structure

The file structure is very simple.

The assets folder holds game resources (graphics, sounds etc).
The dist folder holds game code.
The index.html file is the starting point of the game.

Quickstart

Create a folder inside your site public directory. Paste all the files there. For example if you create a folder named "game" inside your public folder, you can play the game by going to http://yoursite.com/game.

Custom HTML element

If you wish to embed the game into a custom element on the existing page, do the following steps:

  1. Copy "dist" and "assets" folders into the same folder as your .html file/li>
  2. Add <script src="dist/bundle.js"></script> line right before the closing head tag.
  3. Create an element and give it an id of "game-video-poker". Like that: <div id="game-video-poker"></div>
  4. Enjoy the game

Reskinning the game

The reskinning process is very simple, don't be discouraged by the fact that you'll need to use a third-party program.
Follow these steps.

  1. Download and install Texture Packer
  2. It's a free program that will allow you to update the game's graphics.
  3. Run Texture packer
  4. Click on Advanced Settings button in the lower right part of the screen
  5. In the upper right part of the screen notice the Data Format option
  6. Choose Phaser(JSONHash)
  7. Check Trim sprite names option a bit lower
  8. Set 1 in the Shape padding field in the lower right part of the screen
  9. Drop the reskin assets folder right into the program window
  10. It should look like this
Now you can change any image in the folder and Texture Packer will automatically pack everything into a nice texture atlas. Don't change file names and try to get as close to the initial image sizes as possible.

When you're finished, click on the Publish sprite sheet button. Name the export game and you will get 2 files: game.png and game.json. Put both of them into the assets/images folder of the game.

In order to change the preloading images, just replace two files in the "assets/images" folder: logo.png and progress.png

Building a native mobile app

In order to build a mobile app please follow these steps

  1. Open the index.html file and uncomment this line
  2. <!-- <script src="cordova.js"></script> -->
  3. Pack the game folder into a .zip file
  4. Go to Cocoon.io and upload this .zip file to your project
  5. Follow Cocoon.io docs to configure and build your project