Home
Final Report and Manuel
Contents
1. If the player ship attaches the turret to itself then it stops Paths firing The use case ends with post condition The Game is Started Robert Lockyer and Andrew Carter EF CATACLYSMIC COSMOS DESIGN Design Outline Our design is split into two main components the model and view The model holds onto all of the games state information The view is dependent upon the model This allows us to easily switch out the view 1f we ever decided to port the game to a new graphics API like Jmonkey Another key aspect of our high level design is that we make use of the state pattern for controlling what the active scene is This is useful because screens like the intro screen don t carry the extra baggage that a more complex scene like the playing scene has to deal with We can develop these components in isolation and add new scenes with relative ease Our implementation of the state pattern can be seen below Figure 2 JFrame lt lt instantiate gt gt Us e gt gt gamestate lt lt abstract gt gt GameState uUpdatetineOthew Update drawi getDeltaTime finitializeGameState Figure 2 Model Package lt lt Interface gt gt GameView Paint createNextView A A A A lt lt Interface gt gt PlayView requestDrawablet requestDrawableRing requestHudDrawablel lt lt Interface gt gt ScoreView isinputComplete getHame drawlnputScreent drawTopScores lt lt Interface gt gt
2. 12 Turret Levels There are four orbital rings within which the player s turrets can be placed These rings incur bonuses to the turrets upgrade speed The closer to the planet the faster the turret will be upgraded Therefore it is often beneficial to place turrets close to the planet when first building them and then move them out as they reach level 3 The outside ring has the lowest experience bonus however turrets in this ring get the most shots off since they are not blocked by the planet Enemies There are currently three different enemy types They are shown below Figure 13 Their behaviours are generally related to their names The slow tank is a slow moving unit which can take a lot of damage from turrets before being destroyed It will approach the planet directly and begin firing on it when it gets within range Slow Tank Cluster Kamikaze Figure 13 Enemy Types The Cluster enemy is designed to attack in swarms and is relatively weak This makes Shockwave turrets ideal against them since they can destroy multiple in a single blast Kamikaze enemies are somewhere in the middle ground in terms of health and speed Unlike the other enemies these approach the planet and dive bomb it dealing damage and destroying themselves in the process Robert Lockyer and Andrew Carter User Manual 18 CATACLYSMIC COSMOS DESIGN Nae eis 200 Conclusion The model view split of our system is a useful and flexible design Ho
3. HelpView lt lt Interface gt gt IntroView A The way that the java Graphics2D object works required us to design our interactions between the model and view in a very specific manner The Graphics2D object is only valid for the duration of Robert Lockyer and Andrew Carter Design Outline CATACLYSMIC COSMOS DESIGN Nae is 20 the paintComponent method this means that the view must call the model from this method in some way in order to fetch fresh information Since the view knows the model it can do this with relative ease The view is known by the model through a series of interfaces shown below The GameManager only knows various views as GameViews But the specific states know them as their more specific derived interfaces such as He lpView Int roView etc These are the interfaces in the middle of Figure 3 lt lt instantiate gt gt Intra view AAA lt T lt lt rnterface gt gt GameView El lt lt Interface gt gt Help view a e lt lt nterface gt gt Playview requestDrawable requestDrawableRing Er requestHudDrawable lt cintertace gt gt kel a Score view isIinputComplete getName drawlnputScreen drawTopScores Figure 3 View Package Robert Lockyer and Andrew Carter Design Outline CS CATACEYSMIC COSMOS DESIGN Package Level Design As stated in the design outline the project is split into two main packages These are the model an
4. gt gt LEVELS adxPO E lt Constant gt LEWEL amp tenemyStilllnRan a tisinAttackRadiust tisInAttachRadiust gt lt lt Interface gt lt lt enumeratian gt gt setFocusedEnerm Drawable Ring Physical Type tsetSelected F t drawhlefinnerR quterR active lt lt Constant gt KANMIKSZESHIP t setActivel lt lt Constant gt PLANET getls ttaciingacd lt lt Constant gt gt PLAYERSHIP getPrice lt lt Constant gt gt STRAIGHTFIRETURRET lt lt Constant gt STRAIGHTFIRETURRETPROJ Figure 4 PlayStates Sub Components Robert Lockyer and Andrew Carter Package Level Design CATACLYSMIC COSMOS DESIGN April 392009 3 2009 The most complicated of these states is PlayState The layout of classes used by this state actually dictates the organization of the remaining packages that have not been mentioned yet Therefore to understand the layout of these packages it is important that one has some idea of how the PlayState is set up Figure 4 shows the relationships of classes and interfaces related to the operation of PlayState PhysicalObject lt lt abstract gt gt Projectile checkCollisions setFuseDistancel isFuseDistReached Figure 5 Projectiles Package There are three important hierarchies of classes which we have logically grouped into packages These are projectiles Turrets and Enemies Each of these is derived from abstract classes of the same name and therefore the
5. player ship 1s currently in Alternative During Step 2 If the player tries to place a turret outside of an orbital zone Paths the attempt fails and the use case terminates with post condition The Game is Started During Step 3 If the player does not have enough money to create the desired turret then the game informs the player of this fact and the use case terminates with post condition The Game is Started Robert Lockyer and Andrew Carter Use Cases LE CATACLYSMIC COSMOS DESIGN Nae ie 200 Move Turret The Game is Started and At least one Turret is in play Steps The Player moves the player ship into the action range defined radius of a turret The game provides visual confirmation that the player ship is within action range of a turret The user presses the SPACEBAR to attach the turret to the player ship The Turret stops its normal movement pattern and moves along with the player ship It also stops its attack pattern The player manoeuvres the ship to a location where he would like to place the turret this location must be within an orbital zone The player presses the SPACEBAR to detach the turret The turret begins moving along the orbital path associated with the zone the player ship is currently in Post Condition The game is started and At least one Turret is in play Alternative 1 During Step 6 If the player ship is not currently located in an orbital zone Paths then
6. the key press does nothing The use case continues at Step 6 Robert Lockyer and Andrew Carter Use Cases EFI CATACLYSMIC COSMOS DESIGN Nae eis 20 Enemy Dive Bomber Ship attack The Game is Started Steps 1 The game spawns a Dive Bomber ship on the perimeter of the game world 2 The Dive Bomber heads for the planet under defence along a straight line path The Dive Bomber collides with the planet under defence and is destroyed doing damage to the planet Post Condition The Game is Started Alternative 1 During Step 2 If turrets placed by the player do enough damage to the Paths Dive Bomber during its trip to the planet under defence then the Dive Bomber is destroyed prematurely doing no damage to the planet Robert Lockyer and Andrew Carter dl CATACLYSMIC COSMOS DESIGN PO Plasma Turret Attack The Game is Started An enemy ship enters the attack range of the turret The turret fires a straight shot directly at the ship with enough velocity to make a direct hit damaging the enemy vessel The turret continues to take shots with a regular frequency until the enemy vessel leaves its attack range or is destroyed The turret then chooses it s next target by evaluating which enemy ship is closest to it and in its attack range If it finds a new target it continues from step 2 else it stops firing Post Condition The Game is Started Alternative 1 After Step 1
7. OS DESIGN A User Manual Starting the game is as simple as double clicking the jar file The player will be brought into an intro screen From here they can either press the spacebar to start playing or press the H key in order to see a help screen Figure 9 These options are displayed to the player so they wont need to read a manual in order to play KA Cataclysmic Cosmos Time to Next Wave 3 300 Current yave 3 killing enemies gets you This turret is illuminated money pressing SPACEBAR will attach it to your ship you can then drop it back into another ring There are 4 orbital e by pressing spacebar zones indicated by again dim gray rings y They light up green when your ship is inside them The lower the level the faster turrets will level up Turret level is indicated by the number of barrels This is your ship These Keys control your movement There are 3 turret types Green Direct Damage A W Foward Blue Slows Enemys S Backward Red Splash Damage A Rotate CCW Press the given key to build D Rotate CW one A You can t build it if you Pe ain t got the cash If this reaches zero you loose Movement Controls Planet Health 875 Figure 9 Help Screen Movement Controls W Forward S Reverse A Rotate Counter Clockwise D Rotate Clockwise The player is represented by a yellow construction ship its movement is not restricted by frict
8. Software Design Game Design Documentation Cataclysmic Cosmos Robert Lockyer and Andrew Carter 4 3 2009 Table of Contents PP a e PU EOS oO 0 E a A naa aaa a aa Bg rer ret a a ree 1 NS SEN njenang atat e Pi 5 2 IR E on IA 2 AAA oi o O A A 3 ri is A UA 4 PP a ren Serre o OO SIE NENGA E rt DA SN ere 5 Enemy Dive Bomber Ship lack caceres aaa awa gana ga dapak a dana a ran ain aaa aaa E adan ap aa EE aaa 6 Ii o AAA A 7 D S02 ONS aaa o a TEN a A a aaa a a b aaa ia E E a a Sa 8 Parckars Leve DESTA a A tia 10 Class Level DESTA arenisca dougoeasaedeqaentosneeasaece 13 E a UA Ne a anaa anana ga adandan daa awahana end anana aan d aa aaa 13 ta dr I OT a aaa E ESE O o no II a a aa a EE kaa a an aa a an nah 13 OI ra lan a A Daring kana sani Tan an Ta Un AS 13 Game SKA aaa kaa a eee aan aa aaa aa aa aa a EE ING EA A KEN E EI A ag aa GAN 13 TALANG M aaa aa ga e aga PP e PO OE ERE Ro D EA ga SEN E aaa 13 A on AN 13 A A A PE O e O O aan aia a 14 A APP e e o Un 15 A I II SD A aa Aa E NE a E 15 TPE Pce TA iento inici ci 16 sn e gen aa a aa balai nada 17 diia Bonao aaa asa gana aa aaa a E a Bag Ega EE EN aa A EN OS E E TAN iga E aa 17 6 nan is AN KANG TM AN KA nn A 18 DN NS ace ns nd aana gana o E OE In A 18 TAC AIRS Lo a MAA 19 CATACLYSMIC COSMOS DESIGN Nae is 20 Introduction Cataclysmic Cosmos is an original game inspired by games of the tower defence genre as well as classic arcade games like asteroids The game revolve
9. an be moved in order to take advantage of the bonuses from different rings In order to do this the player must move close by a turret Once they are in range the turret will light up to indicate that 1t 1s the active target Pressing the spacebar at this point will grab the turret and lock it to the player s ship Dropping the turret works much like placing one You must be within a ring and pressing spacebar at this point will drop the turret there No money will be spent to perform this action Cataclysmic Cosmos LE Time to Next Wave 5 S Kills 0 Current Wave 1 Score 0 Movement Controls 300 450 Planet Health 1000 Figure 11 The player ship is in range of a turret In the above figure Figure 11 the player is within range of a turret Pressing spacebar will attach it to the player s ship There is a subtle glow effect on active turrets that shows up better during animation Other Controls Controls ESC Exit the game Robert Lockyer and Andrew Carter User Manual CATACLYSMIC COSMOS DESIGN Nae ei 20 Game Mechanics There are a couple of game mechanics that are not immediately obvious and so will be explained here in order to help new players understand the game Each turret has three different levels These levels are indicated by differing graphical representations These are shown below Figure 12 for the stasis turret The higher the level of the turret the more effective it will be Figure
10. d view respectfully The view is considerably simpler than the model and therefore is not further divided into smaller packages However the model is much larger and complex and therefore requires the greater organisation and compartmentalization that packages provide The model is highly dependent upon GameStates and therefore we have decided to group these into a package under the names of SEGA Physical Factory createEnemy PhysicalType Position Level Type createTuretiPhysicalType Position PlayState createProjectile PhysicalType Position tsetisamewi ewi PlayState t getCurentEnemiest lt abstract lt lt Inerface gt gt seiWave Queuef Physical Object Drawable getvient getPosition drawhle Point Rot setOrientation SelectionHalo Wawe Queue Builder e Planet abstract gt gt Projectile echeckC o sion getMhlaxHealthg oheckCollisions getCurrentHealth setf use Distance Player Ship applyDamageQ lt lt abstract gt gt tisFuseDistReached isDestroyedO Wawe abstract gt gt Enemyship attack A isDestroyed applyBamage setHealth getilaxHealth lt lt Interface gt gt getcurrentHe alth Hud Drawable ae drawhle string position scale applyStasis Lewel Type dhelap lt lt Constant gt LEWEL 1 Turret gpi umi a ALE IB activationRadius zs Constant gt LEWEL3 fire0 Orbital Zone lt lt Constant gt gt LEVEL4 e efi tl Rad t ceCanstant
11. ion This means the player will maintain their velocity unless they use their engines to change it If the player Robert Lockyer and Andrew Carter User Manual Af CATACLYSMIC COSMOS DESIGN hits the edge of the screen they will be instantly transported to the other side This can be a useful shortcut in some situations Turret Placement Controls T Lay Plasma Turret Y Lay Shockwave Turret U Lay Stasis Turret The idea of the game is to build and arrange turrets to defend the planet from incoming enemy ships To build turrets the player must be within one of the four orbital zones These zones are indicated by gray rings which surround the planet If the player is inside a ring it will light up green to indicate this Time to Next Wave 4 1000 Kills 0 NE Score O Movement Controls Planet Health 1000 Figure 10 Orbital Rings light up green when the player ship enters them Once the players inside of a ring he can place a turret by pressing the corresponding keys as shown in the controls guide However this will only work if the player has the money required to build the turret If not those keys will result in no reaction In the above figure if the player presses either T Y or U a turret will be created on the first level Robert Lockyer and Andrew Carter User Manual CATACLYSMIC COSMOS DESIGN Turret Movement Controls SPACEBAR Grab a turret Drop a turret Once turrets are placed they c
12. r presses the Esc Key or clicks the close button Paths inherent to the application window the game terminates with post condition Game Terminated After Step 3 If the player presses H in the intro screen they are taken to a help screen from there the player can return to step 3 the intro screen by pressing BACKSPACE Robert Lockyer and Andrew Carter Use Cases SAT CATACLYSMIC COSMOS DESIGN Nae ie 200 Player Ship Movement The player presses a keyboard key s associated with a movement direction W for Forwards S for Backwards D for Yaw clockwise A for Yaw counter clockwise The player begins and continues to move in the direction s specified until the key s is released The player ship continues moving along the current velocity vector Post Condition The Game is Started Alternative 1 The ship reaches the edge of the screen It is instantly transported to the Paths opposite edge Robert Lockyer and Andrew Carter Use Cases E CATACLYSMIC COSMOS DESIGN Nae eis 20 Placing a Turret Steps 1 The Player moves the player ship into an orbital zone 2 The Player presses a key corresponding to the type of turret he wishes to create 1 e T for plasma turret type The game checks to ensure that the player has enough money to create the desired turret The turret is created and placed on the orbital path corresponding to the orbital zone the
13. s around a single spaceship that is controlled by the player It is the player s task to defend a planet from incoming waves of enemy ships The player cannot attack directly his ship is unarmed However he can build and relocate various types of turrets around the planet These turrets will automatically orbit around the planet This orbiting system is one of the main differences between Cataclysmic Cosmos and other tower defence games Figure 1 shows same initial concept art created in order to help illustrate game play mechanics Player Scoreboard Enemy Ships can only spawn in the danger zone mn aa orbitlevel 3 ai e 4 Danger Zone Enemy Ships L a I ag gi T A A y S SafeZone S si _ Orbit level 4 AA WI a i lt Players Turret YE A AAA orbit level 2 f orbit level 1 Jj Pl yer Ship E lt sh SN N AE a _ Figure 1 Initial Concept Art Robert Lockyer and Andrew Carter Introduction CATACLYSMIC COSMOS DESIGN PO Use Cases Start up The Player 1s interacting with an OS which has JRE 1 5 0 or greater installed Steps The player requests that the OS start the Game The OS starts the JVM which launches the Game Game shows the player an intro screen The player presses the spacebar The Game draws its playing field and the game starts running Post Condition The Game is Started Alternative After Step 3 If the playe
14. s please refer to the included javadoc Robert Lockyer and Andrew Carter Class Level Design a CATACLYSMIC COSMOS DESIGN PA Key Interfaces Making the view depend upon the model required the creation of several interfaces that the view classes could inherit Each game state was given a corresponding interface which was derived from the abstract class GameView seen below This allowed the GameManager to know the view states in a general way while the specific GameStates could know more specific details about the1r functionality lt lt Interface gt gt PlayView requestDrawable 1 requestDrawableRing requestHudDrawable af k e ng aman aman saman Nil lt lt Iimerface gt gt GameView e A A gamestate lt lt abstract gt gt GameState uUpdate tineOQthew Update FintializeGameStatet lt lt Interface gt gt Drawable drawble Point Rot lt lt Interface gt gt DrawableRing drawMvetinnerR outer K active lt lt Interface gt gt HudDrawable drawMelstring postion scale Figure 8 PlayState PlayView Interaction Drawables were a useful interface for the PlayStates sub components Basically they were a way of letting the model tell the graphics object how to draw those objects For more information on interfaces please refer to the included javadoc Robert Lockyer and Andrew Carter Key Interfaces 14 CATACLYSMIC COSM
15. should extend Used to collect the common functionality between view managers which seems reasonable to generalize Also useful as a means from which to implement polymorphic code Vector2 A two dimensional geometric Vector Allows for useful operations such as finding the distance between two points getting an angle from a vector performing dot products and more Used extensively by PlayState components GameState Acts as a state in the state pattern The GameManager s state is controlled by what concrete GameState it holds at any given time Swapping the old PlayState with a new one effectively resets Other GameStates are included for an intro scoreboard and help screen PlayViewMgr Main View Component used to Visualize the Play State This JComponenet extends JPanel and implements PlayView It is responsible for managing all the various view subcomponents for the Play State In addition by implementing GameVi ew it is able to act as an ambassador to the model on behalf of the rest of the view PlayState State Class which Orchestrates the cooperation of key gameplay objects Of the three main game states the play state is by far the most significant This is because it handles the core game logic It creates different kinds of physical objects such as the playerShip OrbitalZones and Planet and then specifies in its main loop when they should move along with some facets of how they should interact For more information on classe
16. wever something about how we implemented it results in a disparity between model and view updates We believe this is a result of the Jframe running in a different thread then the model At first we were receiving a lot of exceptions related to multithreading Placing synchronization blocks around some of our vectors of drawables resulted in eliminating these exceptions However it did not fix the root of the problem There are still occasionally hiccups where one thread waits on the other If we were given more time one of our first tasks would be investigating how this multithreading 1s operating and try and redesign our game to avoid or at least better control this issue Robert Lockyer and Andrew Carter Conclusion 19
17. y share much in common Figure 5 Figure 6 and Figure 7 show how these packages are arranged Robert Lockyer and Andrew Carter Package Level Design oo CATACLYSMIC COSMOS DESIGN April 392009 3 2009 lt lt abstract gt gt lt lt abstract gt gt PhysicalObject lt lt abstract gt gt Turret activationRadius enemyStillnRange isinAttackRadiust tisinAttachRadius lt lt abstract gt gt Projectile checkCollisions setPuseDistance isPuseDistReached Figure 6 Turrets Package PhysicalObject getPosition setOrientation setWelocity update drawMeQ lt lt abstract gt gt EnemyShip get attackDamage applyStasis Y Y dl lt lt abstract gt gt Wave executeWWave Figure 7 Enemies Package Robert Lockyer and Andrew Carter Package Level Design E CATACLYSMIC COSMOS DESIGN Nae ei 200 Class Level Design Game Manager Top Level Game Model Object Controls Update call Percolation among other things The GameManager class is concerned with keeping track of time and holding onto the current state of the game To keep track of this information we ve implemented the state pattern The three states that are designed so far are the IntroState PlayState and ScoreBoardstate These states require pointers back to the GameManager so they can change the state when required ViewMgr An abstract class which all view managers
Download Pdf Manuals
Related Search
Related Contents
owner`s manual / manual del propietario Tout en un - All in one a complete Portable System Guide & Data Sheet ..........more.. Raidsonic IB-553SSK elektrische kettensäge bedienungsanleitung - BM Bedienungsanleitung zu Jung RCD3094M FD-design Manual IM-3 SE Astro Imola Copyright © All rights reserved.
Failed to retrieve file