[Bo Pang] Assignment 1

Assignment 1: Augmented Reality Tower Defense

Description:

In this assignment, I tried to create an AR tower defense game with argon. The basic idea is using an image target as the game map where 3D graphics, such as enemies and virtual map, are displayed on it. A 3D CSS object is added to the image target to display game information.  In my implementation, frame markers are used in two ways.   One frame marker is used to represent a defense tower in the game. Players can place the marker on the image to put a defense tower in the game. The tower is not fixed which can be moved by moving the marker.  Players need to choose the best location and direction to kill more enemies. Another frame marker is used as a bomb trigger. When the player put this marker under the camera, a bomb will be triggered which will kill all the enemies in the map. There is only one bomb available in one game so players need to choose the right time to use it.

The “real” experience I imagine would be a very interesting AR tower defense game, which has many different levels, different kinds of defense towers as well as multiple items and power-ups.

URL:

http://pangbo.org/mobile/towerdefense.html  (URL for Argon2)

http://pangbo.org/mobile/towerdefense.html (URL for PC if you want to see the source code)

You can download the image target and markers here:   http://pangbo.org/argon/Images&Data.zip

Instruction:

  1. Print the image target and the marker.
  2. Put the image target on a desk and load the URL in Argon2.
  3. Move the phone above the image and you will see the game map and the enemies begin to move.
  4. If the phone is not tracking the image, a message will show up to give hint and the game state will stop to update.
  5. Put the tower marker under the phone and you will see a defense tower showing up. Adjust the position and orientation of the tower to shoot the enemies.
  6. Put the bomb marker under the phone will trigger the bomb which will kill all enemies in the map. You just have one chance.
  7. Move the phone close to the image target, then you will see the enemies start to spin. Move the phone away you will see the enemies back to normal.

Known Bugs:

The key bug in this program is the collision detection of the bullets and enemies is not very accuracy. This is because the bullet and the enemy are in two different coordinate systems.  Bullets and enemies are translated into the camera coordinate system to conduct collision detection. However, the translation matrix of a tracked object is not very accuracy, which leads the error of the collision detection.

Video:

Comments are closed.