Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chris Orona CS 491B June 2, 2005. High Score 30000 Score 200 Game Components Introduction Storyline Objective System Game threads Scheduling Characters.

Similar presentations


Presentation on theme: "Chris Orona CS 491B June 2, 2005. High Score 30000 Score 200 Game Components Introduction Storyline Objective System Game threads Scheduling Characters."— Presentation transcript:

1 Chris Orona CS 491B June 2, 2005

2 High Score 30000 Score 200 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 Score 300 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 Score 400 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 Score 500 Game Threads Update ThreadInput Thread Scheduler Thread Redraw Screen Run next event Wait for next event Any more events? Yes No Keyboard Mouse Cheats

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

7 High Score 30000 Score 700 Level Scheduler Design ScheduledItem stime50 sitem spoint(400, 0) spathStraightPath 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 Score 800 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 Score 900 Collision Detection bounding box Bounding Box check x, y, height, width of shots are compared to the enemies’ coordinates. hit detected

10 High Score 30000 Score 1000 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 Score 1100 Enemy paths (x 1, y 1 ) (x 2, y 2 ) (x 3, y 3 ) (x 4, y 4 ) 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 Score 1200 (x 0, y 0 ) (x 1, y 1 ) (x 1 ’, y 1 ’) Δy = y 1 - y 0 Δx = x 1 - x 0 Is |Δy| * aspect > |Δx|? (y 1 ’ - y 0 ) = (Δy / Δx)(x 1 ’ - x 0 ) Shot Paths

13 High Score 30000 Score 1300 Zigzag Paths θ 0 = atan2(y 1 - y 0, x 1 - x 0 ) θ0θ0 d’ d (x 2 ’, y 2 ’) (x 0, y 0 ) (x 1, y 1 ) (x 2, y 2 ) (x 3, y 3 ) c θ0’θ0’ θ 0 ′ = atan2(c, d) x 1 ′ = d’′ cos(θ 0 +θ 0 ′ ) y 1 ′ = d’′sin(θ 0 +θ 0 ′ ) (x 1 ’, y 1 ’)

14 High Score 30000 Score 1400 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 Score 1500 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 Score 1600 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 Score 1700 Java Web Start Configuration File <jnlp spec="1.5+" codebase="http://cs.calstatela.edu/~corona/cs491/" href=“DeepSpace2.jnlp"> Deep Space 2 C. O. Deep Space 2 - the game

18 High Score 30000 Score 1800 References Programs J2SE Development Kithttp://java.sun.com/ Eclipse IDEhttp://www.eclipse.org/ Audacity Sound Editorhttp://audacity.sourceforge.net/ References Java2Dhttp://java.sun.com/products/java-media/2D/ Java Soundhttp://java.sun.com/products/java- media/sound/index.jsp Java Web Starthttp://java.sun.com/j2se/1.5.0/docs/guide/javaws/ Video Game Musichttp://www.vgmusic.com/


Download ppt "Chris Orona CS 491B June 2, 2005. High Score 30000 Score 200 Game Components Introduction Storyline Objective System Game threads Scheduling Characters."

Similar presentations


Ads by Google