An augmented reality battle game integrated with Watson SDK for AI capabilities
- Sign up for an IBM Cloud account
- Sign up for a Vuforia account
- Sign up for a PubNub account
- Install Unity 2018.3.3
- Download the Assets and Project Settings Folder from here
- Print the image from the folder.
- Create a new project in Unity
- Login to the Vuforia account
- Navigate to License Manager and create a new development key. You will use this key later on to develop the application
- To activate Vuforia in your unity project, access the player settings from Edit > Project Settings, then select the Player category, and select the tab for the mobile device you are building to. Under the XR Settings panel, enable the Vuforia Augmented Reality Support property.
- Navigate to Target Manager on Vuforia and create a new database for unity editor.
- Click on the database created.
- Click on Add Target. Set the type to single image, select the image from the folder you downloaded from box, set the width, name and click add.
- Select the Click on Download Database and you will import the downloaded package later on.
- Login to the IBM cloud account
- Navigate to the catalog, search for speech to text and create the service in the Dallas region.
- Create new credentials for the service from the service credential tab.
- Take note of the iam_apikey, you will use this key later on to develop the application.
- Login to the pubnub application
- Click on the Demo Project
- Click on create new keyset
- Take note of the publish and subscribe keys.
- Copy and replace the Asset and Project Settings Folder that you downloaded earlier in the Project Folder where the game is saved.
- Wait for unity to update the Assets.
- To download additional and required vuforia packages, navigate to Game Object> Vuforia> AR camera. This will install the required packages and then delete the AR camera that you just imported.
- Double click on the image package that you downloaded from vuforia to import it in the project.
- Open the Inspector Window by navigating to Window > General > Inspector (Shortcut - CTRL+3).
- Open the Project Heirarchy by navigating to Window > General > Heirarchy (Shortcut - CTRL+4).
- Select AR Camera, click on open vuforia engine configuration and paste the vuforia license key. Make sure the database that you created in vuforia is added under databases.
- Select Image Target from the Hierarchy. Make sure the scale is set to 7.91 for x,y and z
- Under Image Target Behaviour, select your database and image target.
- In the inspector window, scroll down to the Main 2 script and paste the pubnub publish key and pubnub subscribe key in the text box for pubnub_pub and pubnub_sub respectively.
- Paste the speect to text api key in the Example Streaming Script.
Open the main2 script from the Assets/Resources folder, change playerNumber to 1 and build the project for player 1 and set playerNumber to 2 and build the project for player 2
- Player 1 has to start the game before Player 2
- Once both the players start the game, each of them gets 5 monsters assigned which are placed on the bench.
- Every monster has hit points(green) and attack points(black)
- The number of stars in the game represents the number of energies you have (for an attack you need an energy).
- Its a turn based game and the green bench represents that player's turn.
- In the beginning both players have to choose an active monster who will face off against the enemy's monster. - "number x active"
- Once chosen you cannot replace the active monster until it's destroyed.
- In your turn you have the following options
- You can perform a summoning ritual which summons either. "draw"
- Monster - who will do your bidding and decide to either
- Release the new monster "discard"
- Recruit him for your monster army. "move to number x"
- Energy - that will power up your monster
- Monster - who will do your bidding and decide to either
- You can power up any monster if you have an energy (the attack points will be highligted in red) "add energy to active/number x"
- You can attack the enemy's monster only if your active monster is powered up. "strike"
- Integrate IBM Watson Assistant for help with the game.
- Allow player 1 and 2 to input an unique number to add it to the pubnub channels so that multiple players can play using the same pubunb account.