Book Image

HTML5 Game Development Hotshot

By : Seng Hin Mak, Makzan Makzan (Mak Seng Hin)
Book Image

HTML5 Game Development Hotshot

By: Seng Hin Mak, Makzan Makzan (Mak Seng Hin)

Overview of this book

Table of Contents (15 chapters)
HTML5 Game Development HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Hotshot challenges


There are different ways we can further improve the game.

  • Adding special items:

    There can be special items that can affect the battle result. For example, there can be an item that heals the health points before the battle. Or, there can be an item that adds 10 power values to the card for three rounds.

    These cards can be purchased at the in-game store. And this usually involves virtual coins. The coins can be earned by winning the game.

  • Multiple players:

    By setting up a socket server and using the HTML5 web socket API, we can make the opponent a real player. On each selection, one side sends the selected power value to the server and a push to the other player. On the other side, the value from the server appears on the opponent's card. In this way, the power value on the opponent's card is not a random number, but a value from the real opponent player. The server then stores the health point calculation and determines the end of the game.