1 / 18

Chris Orona CS 491B June 2, 2005

Chris Orona CS 491B June 2, 2005. Game Components. Introduction Storyline Objective System Game threads Scheduling Characters Player ships and weapons Enemies and paths Software Issues Technical Background Technical Issues Deployment. Storyline Introduction.

albina
Télécharger la présentation

Chris Orona CS 491B June 2, 2005

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chris Orona CS 491B June 2, 2005

  2. High Score 30000 Game Components • Introduction • Storyline • Objective • System • Game threads • Scheduling • Characters • Player ships and weapons • Enemies and paths • Software Issues • Technical Background • Technical Issues • Deployment

  3. High Score 30000 Storyline Introduction • Aliens are attacking Earth! Last time, a lone space ship attempted to save mankind from aliens. Now the aliens are back with reinforcements. Now it’s up to you to eradicate this threat to humanity once and for all!

  4. High Score 30000 Gameplay • Player earns points by defeating enemies. • Player starts with 4 lives, when hit by an enemy, the player loses a life. • Lose all your lives, and the game is over. • Pickup powerup weapons to improve your destructive powers.

  5. High Score 30000 Redraw Screen Game Threads Wait for next event Keyboard Mouse Run next event Cheats Any more events? Yes No Scheduler Thread Update Thread Input Thread

  6. High Score 30000 Game Threads (cont.) • Level Threads Score Panel Action Panel Background Panel • Character Threads

  7. High Score 30000 Level Scheduler Design • How the scheduler works • Implemented using a PriorityQueue • Inserts objects in a tree sorted by run time • Schedules the introduction of enemies, powerups, or the end of timed levels • Some enemies schedule events when they die

  8. High Score 30000 Powerups • Weapon Cycling • Each ship has certain weapons it may use • Additional Lives • Shielding • Protects from enemy attacks for a short while

  9. High Score 30000 Collision Detection bounding box hit detected • Bounding Box check • x, y, height, width of shots are compared to the enemies’ coordinates.

  10. High Score 30000 Enemies • Equipped weapon • Some enemies will fire at the player, these shots are considered enemies. • Enemy Health • Amount of hits required to destroy the enemy • Corporeality • Some “enemies” should not be allowed to be hit! This includes enemy shots, explosions, and powerups. • Defeat • Award points, and special death events • Path • Movement pattern assigned to an enemy.

  11. High Score 30000 (x1, y1) (x2, y2) (x3, y3) (x4, y4) Enemy paths • Paths • Collection of points for movement • Different paths can be plugged into any object (except the ship) • Basic Types • Straight Line • Oscillating • Random

  12. High Score 30000 Shot Paths (x0, y0) (x1, y1) Δy = y1- y0 Δx = x1- x0 Is |Δy| * aspect > |Δx|? (y1’ - y0) = (Δy/ Δx)(x1’ - x0) (x1’, y1’)

  13. High Score 30000 (x1’, y1’) θ0 = atan2(y1 - y0, x1 - x0) c d’ θ0 ′ = atan2(c, d) x1′ = d’′ cos(θ0 +θ0 ′ )y1′ = d’′sin(θ0 +θ0 ′ ) (x2’, y2’) θ0’ d θ0 Zigzag Paths (x3, y3) (x2, y2) (x1, y1) (x0, y0)

  14. High Score 30000 Technical Background • Language • Uses Java for cross-platform compatibility • Minimum version is Java 5 • Java 2D API and Java Sound API • Based on an earlier project • Java 1.2 with limited capability

  15. High Score 30000 Technical Issues • Using Java2D shapes is much faster than bitmap images. • Objects are reused whenever possible. • Sprite and Sound caches • Lowering the refresh rate of threads improves performance.

  16. High Score 30000 Java Web Start • Deploy Java programs online using Java applications rather than applets • Enables automatic updates by checking the web server for a more recent version • Can be accessed as a shortcut on the desktop • Configured through the use of a JNLP file (which is XML format) • MIME type: application/x-java-jnlp-file

  17. High Score 30000 Java Web Start Configuration File <?xml version="1.0" encoding="utf-8" ?> <jnlpspec="1.5+" codebase="http://cs.calstatela.edu/~corona/cs491/" href=“DeepSpace2.jnlp"> <information> <title>Deep Space 2</title> <vendor>C. O.</vendor> <homepagehref="http://cs.calstatela.edu/~corona/cs491/" /> <descriptionkind="short">Deep Space 2 - the game</description> <iconhref=“DeepSpace2.gif" width="50" height="50" /> <offline-allowed /> </information> <resources> <j2seversion="1.5+" initial-heap-size="8m" /> <jarhref="DeepSpace2.jar" /> </resources> <security> <all-permissions /> </security> <application-descmain-class="DeepSpace2.GameManager" /> </jnlp>

  18. High Score 30000 References

More Related