Narbacular Drop Technical Design Document

Embed Size (px)

Citation preview

  • 7/26/2019 Narbacular Drop Technical Design Document

    1/38

    Narbacular Drop

    Technical Design Document

    Nuclear Monkey Software

    Document Version: 1.1All contents copyright 2004, DigiPen (USA) Corporation. All rights reserved.

    DigiPen nstitute of Technology!"M#$$%& '$#

    No(ember #) *$$#nstructor: Michael Moore

  • 7/26/2019 Narbacular Drop Technical Design Document

    2/38

    Tale o! ContentsPro+ect ,(er(iew.............................................................................................................................................. #

    !ame -oncept..............................................................................................................................................#Technical !oals........................................................................................................................................... #System e/uirements...................................................................................................................................#Technical isks............................................................................................................................................0

    Thir Party Tools......................................................................................................................................... 0'M,D..................................................................................................................................................... 02orlcraft 3 Val(e 4ammer 5itor.........................................................................................................0nno Setup............................................................................................................................................... 0

    !ame Play.........................................................................................................................................................6!ame structures 3 !ame ob+ects...................................................................................................................6Physics......................................................................................................................................................... 6

    Newtonian............................................................................................................................................... 6Physics Manager..................................................................................................................................... 7Portal physics..........................................................................................................................................7

    Pro+ectiles.....................................................................................................................................................7-ollision.......................................................................................................................................................7

    -ollision Manager...................................................................................................................................7-ollision Map Manager...........................................................................................................................7

    5limination 8ayer....................................................................................................................................7Player actions............................................................................................................................................... 9Victory conitions........................................................................................................................................98e(el specific coe......................................................................................................................................

    "rtificial ntelligence...................................................................................................................................... 1$Multiplayer......................................................................................................................................................1*-oe ,(er(iew............................................................................................................................................... 1;

    Main game loop......................................................................................................................................... 1;'ile formats................................................................................................................................................ 1;-omments.................................................................................................................................................. 1;

    Naming con(entions...................................................................................................................................1;-oing guielines...................................................................................................................................... 1#Source control............................................................................................................................................1#

    Memory map.............................................................................................................................................. 1#System Memory.................................................................................................................................... 1#Vieo Memory...................................................................................................................................... 10

  • 7/26/2019 Narbacular Drop Technical Design Document

    3/38

    View Moes............................................................................................................................................... 1Portal 5ffect............................................................................................................................................... 1&ump Mapping.......................................................................................................................................... 1

    "uio.............................................................................................................................................................. *$'eatures...................................................................................................................................................... *$'ormats...................................................................................................................................................... *$

    Task 8ist......................................................................................................................................................... *1Timeline 3 Milestones..................................................................................................................................... *9

    Milestone Scheule.................................................................................................................................... *9Timeline..................................................................................................................................................... *9

    nstaller........................................................................................................................................................... *"ppenices..................................................................................................................................................... ;$

    -onsole > ?ey &ining............................................................................................................................. ;$"uio 5ngine............................................................................................................................................. ;1Sketcher 5ngine......................................................................................................................................... ;*

    ,(er(iew:.............................................................................................................................................. ;*Public Data ,utline:..............................................................................................................................;;

  • 7/26/2019 Narbacular Drop Technical Design Document

    4/38

    Pro"ect #vervie$

    Game ConceptThe player is a princess stuck in a ungeon%like atmosphere where she must sol(e pu@@les with the

    use of her ability to summon a single set of linke portals on earthen walls an floors3ceilings.

    Technical Goals"%8e(el:

    8ightning fast ;D graphics. A"lreay B9$C complete

    Seamless portal technology on a=is%aligne planes.

    mmersi(e ;D ambient soun. A5ngine portion alreay 1$$C one

  • 7/26/2019 Narbacular Drop Technical Design Document

    5/38

    Technical Risks Portal technology coul break or be horribly slow on some harware.

    -omplications with portal technology coul bring about large amounts of hacks) counter%hacks)an cross%hacks.

    'M,D coul suenly change their licensing an weF ha(e to make time to create a robust sounsystem.

    8a(a might not cooperate.

    The entity system coul ha(e some crippling fault that we ha(enFt thought of yet.

    Third Party Tools

    FMOD

    'M,D is an auio library e(elope by 'irelight Technologies for *D an ;D soun as well asmusic. t comes with a free usage license for non%commercial pro+ects.

    http:33www.fmo.org3

    Worldcraft !al"e #ammer $ditor

    2orlcraft is a ;D le(el esign tool owne an maintaine by Val(e Software. ts name hasrecently change to GVal(e 4ammer 5itorG) but is still the same tool.

    http:33collecti(e.(al(e%erc.com3ine=.phpHgoIhammer

    %nno Setup

    nno Setup is an installer package e(elope by +rsoftware. Please refer to the JnstallerK sectionfor specific etails on this program.

    http:33www.+rsoftware.org3isinfo.php

    Narbacular Drop Page 0 of

  • 7/26/2019 Narbacular Drop Technical Design Document

    6/38

    %a&e Play

    Game structures Game o&'ectsThe following is a list of logical ob+ects currently planne for the game:

    2all L " wall.

    &utton L " button that you usually nee to press to open a oor.

    Static camera position trigger L ;rperson fi=e camera positions an the trigger areas for them.

    Door L The oors at the en of each le(el.

    8a(a % ..8a(a.

    8a(a heater L The pits that heat la(a.

    -rate L !eneric crates that are nothing more than weights.

    'ireball L DemonFs weapon of choice.

    &ouler L The primary obstacle for a few le(els.

    Torch L 8ighting coolness.

    Characters'

    No%?nees: The main character that the player controls Demon: The en boss) big scary ue.fireballspain

    mpy: The ungeonFs F+anitorF. ntene to be a nuisance on some le(els.

    8a(a turtle: " rie%able turtle that swims aroun in la(a.

    2ally: The entity of the ungeon) personifie by a mouth that opens on the walls.

    Physics,ur physics will be base on a simplistic Newtonian moel.

    (e)tonian" simple (elocity an acceleration base physics moel that hanles gra(ity an simple collisions. This isuse by ob+ects to moify their position base on the internally manage (elocity.

    t contains:% The mass Akg of the ob+ect. This is use for collisions.% The ratio of energy it loses on impact. So $.1 is (ery rubbery an $. is (ery sticky. Negati(e (alues willgain energy on impact.% -urrent (elocity Am3s. This is not normali@e as it also has a magnitue.% Spee that is automatically calculate as the magnitue of (elocity.% !ra(ity acceleration that is applie e(ery frame. &y efault itFs .9 Am3sO*.% "ccumulate acceleration is use for efficient processing of outsie forces. "ny calls to accelerate a

    Newtonian are summe in this (ariable an are use uring normal upates once per frame.

    % Number of collisions is the total number of collisions that ha(e been reporte an represents it as only onecollision that frame.% " groun &oolean that keeps track of if the Newtonian is resting on a surface. This acti(ates a slightlyifferent moel that ignores gra(ity an uses friction.

    "n J"ccelerateK function allows outsie forces to act on the Newtonian. Newtonians can also beaccelerate by using helper functions that hanle physical collisions between each other an with a static

    plane.

    2hen all accelerations are processe the (elocity is cappe at the ma=imum (alue 9$m3s.

    Narbacular Drop Page 6 of

  • 7/26/2019 Narbacular Drop Technical Design Document

    7/38

    Physics Mana*er

    This is a simple interface that manages a list of Newtonians. e/uestNewtonianA Newtonian willa a new one to its list an return a pointer to it. Passing that pointer back into eleaseNewtonianANewtonian will remo(e that Newtonian from its list. Newtonians in the Physics ManagerFs list all ha(etheir ThinkAs processe.

    Portal physics

    ,ur portals effecti(ely break ;D space an re/uire special processing. This special processingtakes effect by simply checking which sie of a portal the ob+ectFs center is on. Then applying physics baseon that sie being the GcorrectG sie. ,nce an ob+ectFs center passes the portal) then physics is applie asthough the estination sie were the GcorrectG sie.

    Pro'ectilesThe only pro+ectile in the game is DemonFs fireballs. These will not be affecte by physics an will

    simply tra(el along a straight line until they hit something.

    Collision

    Collision Mana*er

    4anles collisions between 5limination 8ayers in a list. 5ach ob+ect is checke once against all otherob+ects. This is hanle so that there isnFt an o(erlap such as ob+ect " checking against ob+ect & an thenob+ect & checking against ob+ect ". -ollision 8ayers check against each other with a generic TestA 5limination8ayer function that returns 1 for collision) $ for no collision) an %1 for unknown. ,b+ects

    that collie ha(e a pointer to the opposing ob+ect ae to their list of ob+ects for that frame.

    Collision Map Mana*er

    Similar to -ollision Manager) but checks the 5limination 8ayers in its list against a list of map geometry.This is an optimi@ation that allows maps geometry 5limination 8ayers not to check against each other.

    $limination +ayer

    "n abstract base class that contains a pointer the parent using the layer) a string table pointer that efinesthe type of layer) an a list of ob+ects that ha(e collie with the layer in the past frame. " pure (irtual TestA

    5limination8ayer function is to be fille out by each eri(ing layer type. The test function shoul firstetermine the type of layer it is testing against. Then pro(ie a test that checks between itself an that type)returning 1 for collision an $ for non%collision. f the type is incompatible or unknown Test shoul return%1.

    Narbacular Drop Page 7 of

  • 7/26/2019 Narbacular Drop Technical Design Document

    8/38

    Player actionsThe player will take on the boy of princess No%?nees. "n princess No%?nees is capable of the

    following actions:

    -reating * interlinke portals with the help of 2ally.

    2alking aroun) incluing ;D strafing actionQ

    8ooking aroun her en(ironment.

    'alling

    2alking into a portal

    t shoul be note that the princess is N,T capable of +umping or pushing ob+ects aroun theworl.

    !ictory conditionsThe player wins the game when Demon is ea. 5ach le(el is beaten base on its specific win

    conitions Aelaborate in G8e(el Specific -oeG.

    Narbacular Drop Page 9 of

  • 7/26/2019 Narbacular Drop Technical Design Document

    9/38

    +e"el specific code

    8e(el 1: Polishing UpSpecific coe re/uire: Detection for when all ; buttons ha(e been presse at

    the same time an the oor nees to be opene. Speciali@e ".. for mpy to control bo= polishing an

    retrie(al.

    2ally hint conitions an se/uences.

    8e(el *: Boulder DashSpecific coe re/uire: &ouler automation.

    Detection for when both buttons ha(e been presse atthe same time an the oor nees to be opene.

    2ally hint conitions an se/uences.

    8e(el ;: Hallway to HellSpecific coe re/uire: Detection for when the player is on the e=it platform

    an the oor nees to be opene.

    2ally hint conitions an se/uences.

    8e(el #: Ledge LadderSpecific coe re/uire: &ouler generation3estruction an automation

    2ally hint conitions an se/uences

    8e(el 0: Fire with FireSpecific coe re/uire: Demon "..

    8a(a pit raising conitions.

    2ally cheering se/uences.

    Narbacular Drop Page of

  • 7/26/2019 Narbacular Drop Technical Design Document

    10/38

    Arti!icial ntelligence

    "rtificial ntelligence for the game will be broken up into (arious state machines that can beattache to any game ob+ect. !ame ob+ects that will re/uire " are mpy) Demon) 2ally) an 8a(a Turtle

    Athese will later be escribe more in epth. 4ere is some (arious information that one woul nee to knowabout ".

    A Strctre:5(ery ob+ect that is sai to ha(e ") will ha(e a set of - files A.h an .cpp associate with it that will

    be the characterRs " manager. 'or instance) mpy will ha(e files calle "mpy. These files shoulcontain a class that has general information about the character) such as run spee) access to the characterRsmoel) an access to physics an collision ob+ects. This class shoul also contain instances of the statemachine class) an a way to manage which one shoul be in use) so that way you can ha(e multiple statemachines for one character.

    State Machines at the base level:o De!initions:

    GoalsL !oals are actions that will be ae to a state machineRs goal stack.These are ob+ects that will be e=ecute as a continuous action) an is a

    characterRs ri(ing force at that time. ulesL ules can be either conitional) or an action. These are sub%states uner

    e(ery goal.

    !onditionalL This is basically a check to see if a particular actionshoul be e=ecute.

    "ctionL This is a sub%state) which upon recei(ing the go%ahea from aconitional rule will be e=ecute. These are really in fact references toalreay registere goals.

    !o##andsL These are statements which will ecie how a goal is e=ecute if aconitional statement is met.

    Go$o % This comman will remo(e the current goal off of the goalstack) an replace it with the new goal.

    GoSub % This comman will keep the ol goal on the stack an push

    the new goal on top of it. eturn % This comman will pop the current goal off of the stack an

    re(ert to using a pre(ious goal Athis is the compliment to the !oSubcomman.

    o *iles:

    "&'StateMachineL This is base class that hanles which rules an goals aregoing to be e=ecute for a gi(en state machine. "SM2rapper is eri(e fromthis class. t contains a

    "&'SM'(rapper%% This is a base class that wraps the "StateMachine an anycharacterRs state machine will be eri(e from this class. t contains a macro thatshoul be fille out in the eri(e character state machine this will create a new"StateMachine) an a goals an rules as necessary.

    "&'GoalL This is a class that will represent a goal that a character will ha(e) an

    that manages the aition of rules. "&'uleL This is a class that encapsulates a rule) an efines the (arious

    commans Aliste abo(e. "&')*ecuteL This is a (irtual base class that any characterRs states that will be

    e=ecute shoul be eri(e from. t has functions to fill out for the initial actiona state shoul ha(e) a function that shoul be upate e(ery time the " is calle)an a function for a stateRs final action.

    Narbacular Drop Page 1$

  • 7/26/2019 Narbacular Drop Technical Design Document

    11/38

    A Strctre Diagra& (+a&ple A-&py)'

    %a&e #"ect A:

    pyo Strctre

    !oal: 2aner !oal: le !oal: -hase

    !oal: 'lee !oal: -lean &o= !oal: Mo(e &o= !oal: &lock Portal !oal: Tantrum

    De#ono Strctre

    !oal: 2aner !oal: Summon &ouler !oal: Summon 'ireball !oal: Uump to Ne=t 8e(el !oal: !loat

    (ally

    o Strctre

    Lava $urtleo Strctre

    !oal: 2aner !oal: 'lail !oal: le

    Narbacular Drop Page 11

  • 7/26/2019 Narbacular Drop Technical Design Document

    12/38

    ltiplayer

    Narbacular Drop will be a single player game only. There is no planne support for any type ofnetworking or hot seat style swapping.

    / 1

    Narbacular Drop Page 1*

  • 7/26/2019 Narbacular Drop Technical Design Document

    13/38

    Code #vervie$

    Main *ame loopThe main game loop e=ists within !DotFs GThinkG function. 5(ery system besies the Sketcher

    5ngine is a sub%entity of !Dot. These systems will ha(e their Think functions calle in the same orer thatthey were ae to !Dot. 5ach sub%entity of those systems will in%turn ha(e their Think functions calle.

    The entity%think system is ama@ingly fle=ible in this way) allowing for whole systems to beisable with a single line of coe without crippling or crashing the game.

    File formats"ll coe shoul be containe in stanar - source files A.cpp an stanar -3- heaers A.h

    with DigiPen copyright information containe in comments at the top of the file.

    The pro+ect workspace will be containe within a Microsoft Visual Stuio .N5T solution A.sln.

    8e(els will be containe within Gcompile map formatG files A.cmf) which are e=porte from2orlcraftFs map files A.map. More etails can be foun in the 2orlcraft appeni=.

    Please refer to the graphics an auio sections for their specific file format re/uirements.

    CommentsSingle line comments shoul be use as often as humanly possible to elaborate coe flow.

    'unction prototypes shoul inclue a single line comment summari@ing their purpose. 'unctionboies shoul pro(ie a o=ygen compatible comment heaer.

    Specific marker tags:

    GT,D,:G shoul be left in places where the coer is skipping small functionality for the time beingto get a ma+or feature one first. T,D,Fs shoul elaborate what features nee to be implementelater.

    G5-,D5:G shoul be left in places where the coer knows theyFre being sloppy. ecoes shoulcontain suggestions for better coe if ieas are a(ailable) but at the (ery minimum shoul point outspecifically what is sloppy.

    G4"-?4"-?:G shoul be use whene(er an establishe system of oing things is beingbypasse.

    (amin* con"entionsMulti%2or names shoul either ha(e each wor separate by an unerscore or each worFs first

    letter be capitali@e.

    Variables shoul use stanar 4ungarian notation whene(er possible. 'or custom types) a new4ungarian%like notation shoul be thought%up an use. This notation shoul always come before the(ariableFs actual name an shoul be entirely lowercase. -lasses an structs shoul a(oi using FmF in theirnames) because when you really look at it) itFs completely unnecessary.

    'unctions names nee only ahere to the Multi%2or naming con(entions) parameters shoul be in4ungarian notation with their purpose somehow inclue in the name.

    Narbacular Drop Page 1;

  • 7/26/2019 Narbacular Drop Technical Design Document

    14/38

    Codin* *uidelines Precompute whene(er e(en remotely possible.

    Measures must be taken to pre(ent copy paste errors.

    Measures must be taken to pre(ent copy paste errors.

    The ST8 is e(il Amost of the time.

  • 7/26/2019 Narbacular Drop Technical Design Document

    15/38

    !ideo Memory

    &ack &uffer Aassuming 6#$=#9$ ;*bit game resolution 1)**9)9$$&A1$*#=769 ;*bit

    ;)1#0)7*9&Portals Aassuming 6#$=#9$ ;*bit game resolution *)#07)6$$&

    A1$*#=769 ;*bit6)*1)#06&

    8etter te=tures for the te=t o(erlay 1)$#9)076&

    8e(el Te=tures:

    Dirt 2alls: 6 % 01*=01* ;*bit A; color) ; bump 6)*1)#06&

    Dirt 'loor: # L 01*=01* ;*bit A* color) * bump #)1#);$#&

    Dirt -eiling: * L 01*=01* ;*bit A1 color) 1 bump *)$7)10*&

    -oncrete: * L 01*=01* ;*bit A1 color) 1 bump *)$7)10*&

    -hain 8ink 'ence: * L *06=*06 ;*bit A1 color) 1 bump 0*#)*99&

    Metal Plating: # L *06=*06 ;*bit A* color) * bump 1)$#9)706&

    8a(a: * L *06=*06 ;*bit A1 color) 1 bump 0*#)*99&

    Total: 16)777);6&

    Particle Te=tures:

    Steam: 1 L *06=*06 ;*bit *6*)1##&

    Dust: 1 L *06=*06 ;*bit *6*)1##&

    Demon 'ireball: 1 L *06=*06 ;*bit *6*)1##&

    Torch 'ire: 1 L *06=*06 ;*bit *6*)1##&Total 1)$#9)706&

    -haracter Te=tures:

    No%?nees: 1 L 01*=01* ;*bit 1)$#9)706&

    2ally: 1 L *06=*06 ;*bit *6*)1##&

    Demon: 1 L 01*=01* ;*bit 1)$#9)706&

    8a(a Turtle: 1 L *06=*06 ;*bit *6*)1##& mpy: 1 L 01*=01* ;*bit 1)$#9)706&

    Total: ;)67$)006&

    Miscellaneous ,b+ect Te=tures:

    Metal -rate: * L *06=*06 ;*bit A1 color) 1 bump 0*#)*99&

    &utton: * L *06=*06 ;*bit A1 color) 1 bump 0*#)*99&

    &ouler: * L *06=*06 ;*bit A1 color) 1 bump 0*#)*99&

    Torch: * L 1*9=1*9 ;*bit A1 color) 1 bump 1;1)$7*&Total: 1)7$;);6&

    Total:

    "ssuming 6#$=#9$ ;*bit resolution: *7);0)6*$ &ytes "ssuming 1$*#=769 ;*bit resolution: ;;)696)#$# &ytes

    Narbacular Drop Page 10

  • 7/26/2019 Narbacular Drop Technical Design Document

    16/38

    User nter!ace

    Game Menus

    Startup Menu,

    The startup menu will consist of a *D menu with the following choices:

    GPlay !ameG L This opens the !ame Moe Menu.

    G,ptionsG L This opens the ,ptions Menu.

    GShowcaseG L This loas a room esigne to show off as much as artist work as possible.

    GuitG L uits the game an returns to the 2inows esktop.

    Game Mode Menu,

    The game menu will also be *D with the following choices:

    5asy L Play the game with game play as escribe in the !DD.

    mpy L Similar to 5asy moe) but mpyFs in e(ery le(el an tries to hiner you.

    ,nce either choice is mae) the game loas the le(el selection room.

    +e"el Selection Room,

    This is a room that acts as a ;D menu. The room has se(eral close metal oors on the wall. ThereFs a oorfor each room that the player has been to. 5ach is labele with the name of the pu@@le that it leas to) anhas a button in front of it. The buttons open their respecti(e oor when pushe. ,nly one oor can be openat a time) so opening a oor will shut any pre(iously opene oors. These oors connect irectly with theentrance of that room) so itFs a seamless transition into the game.

    The pu@@les in the game come in a progressi(e orer) so once a player has beaten a pu@@le) they will bee=iting one room an going irectly to the ne=t pu@@le. There is no nee to come back to this menu to go

    from le(el to le(el unless the player wants to go backwars or skip to later le(el which they ha(e alreayearne.

    Options Menu,

    The options menu is your a(erage options menu with ; sub%menus) one for (ieo) another for auio) an athir for game controls. FVieoF will control full%screen toggles) resolutions) (sync) etc. F"uioF willcontrol (olume le(els. F!ame controlsF will allow for easy key bining an mouse sensiti(ity3in(ersion.

    Narbacular Drop Page 16

  • 7/26/2019 Narbacular Drop Technical Design Document

    17/38

    %n-Game Controls

    Console,

    "t all times uring in%game play) the player will ha(e access to a rop%own console similar to that in 4alf%

    8ife an the uake series. This system will allow the player to e=ecute any comman that is a(ailable tousers. Such commans are for bining keys) taking screenshots) /uitting the game. "ny console comman isalso bin%able to keyboar keys for /uick access uring gameplay. See appeni= G-onsole > ?ey &iningGfor etaile information on the inner workings of the console an key bining systems.

    Mo"ement,

    Mo(ement will take place with a stanar #%comman strafing setup. ,ne comman will walk forwar)another backwar) one for strafing left) an the last will strafe right. These commans can be boun towhate(er keys the user esires but will be boun to all stanar sets by efault. These stanar sets are:

    23S3"3D

    N

  • 7/26/2019 Narbacular Drop Technical Design Document

    18/38

    %raphics

    2e will be using a Direct;D base graphics engine built in%house that has been ubbe as theGSketcher 5ngineG. The engine abstracts the process of renering to a manage but still e=tremely fle=iblele(el. "ll Direct;D configuration settings) management) an initiali@ations are one through simplifie

    engine calls.

    Features "utomatically fins the fastest possible configuration for any gi(en isplay moe.

    "utomatically enumerates all (ieo aapters an their capabilities.

    Stores current capabilities in easy%to%reference places.

    &uilt%in fog manager.

    &uilt%in light manager with automatic configuration of acti(e lights to keep the acti(e lightnumbers within the (ieo carFs supporte limit.

    &uilt%in te=ture allocation manager with normal base bump map generation support.

    &uilt%in *D te=t o(erlay for /uick ebugging output.

    &uilt%in worl matri= stack.

    &uilt%in camera controls with multiple methos of specifying position an irection. &uilt%in support for wireframe toggling.

    5asy control o(er isplay properties with automatic Gclosest%matchG fining.

    "utomatic surface loss hanling.

    &uilt%in culling frustum for ramatically impro(e performance.

    &uilt%in allocation an management for static an bone%base animating meshes from GEG files.

    -omplete fle=ibility of renerable ob+ects. ASee appeni= GSketcher 5ngineG

    'or etails on the inner workings of the Sketcher 5ngine) please consult appeni= GSketcher 5ngineG

    FormatsTe/tures

    Te=ture loaing is one through the D;DE library so all common formats are supporte Aformatsthat work in nternet 5=plorer.

    "lpha%blene te=tures shoul be in D;DEFs nati(e DDS format. Non%blene) but alpha%maskete=tures shoul be in any (ali &MP format. Palette run%length%encoe bitmaps woul be the most spacesa(ing but will not be re/uire. Non%blene) non%maske te=tures shoul use full /uality +pegcompression.

    &ump maps shoul be full /uality gray scale +pegs.

    Static and .nimatin* Meshes

    "ll meshes must be in Direct;DFs GEG format. "ll animation must be one through the use of bonesan mesh skinning.

    n the e(ent that a mesh cannot be animate with bones) each keyframe of animation must be aseparate GEG file the game will interpolate each (erte= from one keyframe to another.

    Narbacular Drop Page 19

  • 7/26/2019 Narbacular Drop Technical Design Document

    19/38

    !erte/ and Pi/el Shaders

    Verte= an pi=el shaers shoul be create as stanar G.f=G files. Specific shaing functions canbe e=tracte from compile G.f=G files after compilation by Direct;D.

    !ie) ModesThree (iewing moes will be supporte:

    1. 'irst person.*. Thir person follow%cam.;. Thir person static camera positions specifie by le(el.

    Portal $ffectThe creation of our portals takes place with some e=tremely simple trickery along with a lot of

    teious things to make it work well.

    5ssentially) a portal is +ust a te=ture /ua. &ut the contents of the te=ture are ynamic an thete=ture coorinates change base on how youFre looking at the /ua.

    To create the contents of the te=ture:1. -on(ert the current camera position an look (ector into coorinates relati(e to the portal.*. 'in this position an rotation in relation to the portalFs e=it.;. Mo(e the camera to the point an rotation foun in step *.#. ener the scene while culling all ob+ects between the camera an the portal e=it.0. The rener surface is now the source te=ture for the portal an the camera shoul be mo(e back

    to where it was before step 1.

    To rener the /ua with the proper te=ture coorinates:1. -on(ert each coorinate into screen space.*. -opy the normali@e screen space = an y components into the u an ( coorinates of each (erte=.;. ener the /ua.

    0ump Mappin*&ump mapping is being implemente through the use of (erte= shaer (1.1 an pi=el shaer (1.1

    capabilities. The (erte= shaer is responsible for capturing the specifie light position) calculating the(ector from the light to the current (erte=) an then to smuggle that (ector to the pi=el shaer. The pi=elshaer is responsible for reaing the bump map (ector from the bump map itself) applying a ot prouctagainst the interpolate light (ector) an applying highlights to the regular te=ture base on that ot prouct.

    Narbacular Drop Page 1

  • 7/26/2019 Narbacular Drop Technical Design Document

    20/38

    Adio

    The auio engine is a wrapper that simplifies an enhances the most useful elements of the FM+Dengine. 'M,D is an e=tremely powerful an stable soun engine library that is built on top of DirectSoun.t is free for non%commercial use.

    ,-es that.s right/ i0 your product is not intended to #a1e any #oney/ and is not charged 0or in any way/then you #ay use FM+D in it 0or F))23

    LThe 'M,D 2ebsite.

    FeaturesThe following features are a(ailable through the auio engine wrapper:

    *D3;D soun effects.

    *D music with support for compresse file formats.

    'ine control o(er (olume) playback spee) an playback point.

    Music GstackingG) which enhances transitions.

    5asy ranomi@ation of repetiti(e soun effects.

    'or etails on the inner workings of the auio engine) see appeni= G"uio 5ngineG.

    Formats'M,D supports (irtually any type of auio format most people ha(e e(er hear of. 4ereFs a /uick

    runown of itFs most popular supporte formats: M,D3S;M3EM) MD) 2"V using any "-M coec)"DP-M) ,gg%Vorbis) MP*3MP;) 2M"3"S') "'') -DD") as well as a plethora of internet stream types.

    "ny of these formats can be use for either music or soun effects. &ut for efficiency) usage of

    hea(ily compresse formats will not be use for /uick soun effects. 'or space sa(ings) music shoul makeuse of a GlossyG compression such as MP;) ,gg%Vorbis) or 2M".

    The current recommenation is 2"V format for soun effects an ,gg%Vorbis for music. &ut asstate abo(e) this stanar is fle=ible.

    Narbacular Drop Page *$

  • 7/26/2019 Narbacular Drop Technical Design Document

    21/38

    Tas3 ist

    The following is an unorere list of tasks an whom theyFre assigne to.

    Game Object Tasks:

    5o63nees

    o Player -ontrols A!arret

  • 7/26/2019 Narbacular Drop Technical Design Document

    22/38

    Path fining algorithms

    Na(igate aroun la(a

    Na(igate aroun eges) an know when to climb

    Player chase algorithm

    'leeing algorithm

    States in a state machine for mpy:

    2aner L 2alking unning L !oal

    o unning towar a bo=

    o unning towar the player

    o unning away from player

    -limbing L 2alls

    ?nocke Down

    Tantrum

    &locking portals

    -leano Mo(ing bo=es

    o le "nimation

    o Soun 5ffects AUeep

    -limbing Achain link) wall

    'ootsteps Arunning) walking

    8ifting Ahea(ing noise

    -ackling

    Tantrum noise

    -leaning Asweeping) polishing

    De&ono " A?im

    Path fining algorithms aroun each le(el of the boss battle.

    States in a state machine for:

    'ireball Shooting

    Summoning &ouler

    Uump 2anering

    !loating

    !etting 4urt

    Dyingo Soun 5ffects AUeep

    Summoning

    !etting hit by fireball

    oaring

    Uump

    Death

    ava Trtleo " A?im

    State Machine

    2anero 'ollows a path between points.

    leo Strane on lan

    o anom while in la(a.

    o Soun 5ffects AUeep

    le noise.

    2hen lane on.

    Narbacular Drop Page **

  • 7/26/2019 Narbacular Drop Technical Design Document

    23/38

    2hen turtle lans in la(a.o -ollision with the player) so they can be use as (ehicles.

    8older (9eep and %arret)o "ttach physics

    o Soun 5ffects

    olling

    &ouler hitting bouler &ouler hitting the groun

    esh *ence (9eep)

    o Soun 5ffects

    See Player an mpy

    &o= hitting mesh

    &ouler hitting mesh

    8oes (9eep)

    o "ttach physics

    o Soun 5ffects

    Sliing

    4itting groun

    *ireall (9eep)

    o They go straighto Particle System

    'lame trailo 2hen to initiali@e an e%initiali@e

    Disappear when they hit an ob+ect3wallo Soun 5ffects

    8ttons (%arret)o Detecting button epression) coing a collisions list Abo=es) boulers) player) etc

    o Soun 5ffects

    &utton up3own

    ava (9eep) (!ollo$s particle syste&)o igi &oy motion

    o -ollision with ob+ects) especially the player

    o 'alling through portalso 4arening

    o Soun 5ffects

    &ubbling noise

    8a(a flowing through a portal.

    8a(a soliifying.

    Ca&era (%arret)o "

    Mo(ement when the player is close to the wall) portal) an forcing to first person

    'i=e camera mo(ement to keep player in (iewo 1stPerson mplementation

    mouse input : mo(e camera left) right) up) own

    constrain perspecti(e

    mouse wheel scroll to thir persono ;rPerson mplementation

    mouse input

    keep camera a specific istance from Nokneeso 'i=e

    Determine camera locations per room.

    ?eeps the player in (iew

    Portals (Dave)

    Narbacular Drop Page *;

  • 7/26/2019 Narbacular Drop Technical Design Document

    24/38

    o "

    8ocke portal mo(ement aroun corners) etc. Alow priority

    mplement playing of 2ally animation opening3closingo !raphical o(erlay for positioning of portals Asorta like a crosshairs) an image of 2ally

    with a black mouth) either alpha blene re or blue) or gray if you canRt place a portal.o Soun 5ffects

    efer to 2allyo -ollision AUeep

    Nee to annul collision when an ob+ect is passing through a portal

    2hat surfaces a portal can stick to.o Visual

    -onitions to pre(ent infinitely seeing a portal.

    Torches (9eep)

    o Their lighting system

    o !etting them to flicker

    o Particle system for the flames

    o Soun 5ffects

    "mbient flickering noise.

    Doors (9eep)

    o Soun 5ffects Door opening chime

    Level Tasks:

    evel :' Polishing Upo -reate le(el in 2orl-raft A!arret

    o -reate an register " map. A?im

    o -reate " goals for mpy A?im

    o 2ally hint conte=ts A?im

    Still in cage after a long section of time

  • 7/26/2019 Narbacular Drop Technical Design Document

    25/38

    Suggest la(a turtle for first pit Suggest using pillars for secon pit Suggest using portals on the pillars for the thir pit Suggest using the last pillar to get to the oor.

    o 2in conitions for the le(el

    -ross first la(a pit -ross secon la(a pit -ross thir la(a pit 8an on e=it platform 5=it le(el

    evel 4' =8e$are o! *alling oc3s>o -reate le(el in 2orl-raft

    o -reate an register " map.

    o -reate " goals for mpy

    o 2ally hint conte=ts

    2hen on the same le(el as the buttono 2in conitions for the le(el

    Stop the boulers from spawning !et to the top lege) an e=it the le(el.

    *inal evel' =*ire 7ith *ire>o -reate le(el in 2orl-rafto -reate an register " map.

    o -reate " goals for Demon

    o 2ally hint conte=ts

    5(ery few minutes cheer on No?nees Tell No?nees to turn DemonRs weapons against him

    o 2in conitions for the le(el

    4it Demon on le(el 1 4it Demon on le(el * 4it Demon on le(el ; 4it Demon on le(el # 5n of the gameQQQ W"WQQ

    Artist oo& ADone this semester A!arret

    o -reate le(el in 2orl-raft Peestals:

    8a(a Turtle

    Demon

    No%?nees

    mpy Shelf

    &ouler

    &o= Doors

    Door in3out to the menu 2ally on a wall Pit of la(a in the mile co(ere by a grateHH

    Graphics/General Engine:

    &ump Mapping ADa(e

    Displaying "nimate Meshes ADa(e

    Volume Te=tures ADa(e secon semester) if particle systems onRt work

    8oaing le(els AUeepo Pretty much one

    Particle System ADa(e

    Narbacular Drop Page *0

  • 7/26/2019 Narbacular Drop Technical Design Document

    26/38

    o 8a(a Steam

    o 'ireballs

    o Dust

    8ighting 5ngine e(ision ADa(eo Torch flickering

    n%!ame Te=t Abesies console AUeep

    ,(erhaul nputskeeo f we fail to ac/uire keyboar an mouse input) keep trying to get it.

    -auses game to crash

    Tools:

    "rtistRs "pplication ADa(e when one w3 TDDo Pro+ect that allows artists to (iew their moels) an te=tures.

    Physics:

    Newtonian Physics Aone

    igi &oy for la(a AUeep

    otational nertia for ob+ects A?im

    AI:AThis is the realm of ?im Ae=cept the -amera ,b+ect

    -amera "o View -amera ,b+ect

    Player "o efer to No%?nees ob+ect

    mpy "o efer to mpy ,b+ect

    Demon "o efer to Demon ,b+ect

    8a(a Turtle "o efer to 8a(a Turtle ,b+ect

    User Interace/!ario"s #t" that no one $ants to %eal $ith: Menus A"ll Da(e Towars the en of this semester.

    o ;D Selection oom

    -reate rooms in 2orl-rafto Pause !ame Menu

    Te=t -onfiguration of Menus

    mplementation of the following menu tasks:

    eturn to !ame

    estart oom

    uit to Main Menu

    uit !ameo ,ptions Menu

    Te=t -onfiguration of Menus

    mplementation of the following menu tasks: esolution A1$*#=769) 9$$=6$$) 6#$=#9$

    "nti%"liasing Aon3off

    n(ert Mouse Aon3off

    Soun 5ffects Volume A3%

    Music Volume A3%

    4ints Aon3off

    Sa(ing the game Aauto sa(e) how many le(els unlocke sa(eo Nee to implement the system to collect information neee for a sa(e game.

    Narbacular Drop Page *6

  • 7/26/2019 Narbacular Drop Technical Design Document

    27/38

    !ame nstaller ADa(eAne=t semester

    ntro Screens A?im ne=t semestero DigiPen 8ogo

    o Nuclear Monkey Software 8ogo

    -reits Se/uence ASpiffy Mc!ee

    #o"n%s:ADomain of Ueep Soun 5ffects

    o View ob+ects

    o "mbient ungeon noisesHH

    Musico Music for menus

    o Music for ungeon

    o Music for boss fight

    o Music for the creits

    Pro%"ct &anagement &o= -o(er AUeep Manual

    Narbacular Drop Page *7

  • 7/26/2019 Narbacular Drop Technical Design Document

    28/38

    Ti&eline / ilestones

    Milestone Schedule

    11313$# L 5ngine Proof: 2orlcraft le(el loaer) -amera system) &asic physics) "nimatemeshes. Portals partially implemente.

    1*31$3$# L 'irst Playable: &o=) button an bouler game ob+ects implemente. Portals fullyimplemente.

    $*3$93$0 L Pre%alpha: "ll "%8e(el features functionally working.

    $;3103$0 L "lpha: "ll "%8e(el features complete an ebugge.

    $#3$63$0 L &eta: "ll &%8e(el features functionally working.

    $#3*$3$0 L !ol: "ll &%8e(el features complete. !ame crash%proofe.

    TimelinePlease refer to our pro+ect planning timeline.

    Narbacular Drop Page *9

  • 7/26/2019 Narbacular Drop Technical Design Document

    29/38

    nstaller

    'or the actual installation of files) we will be using Gnno SetupG e(elope by +rsoftwareAhttp:33www.+rsoftware.org3isinfo.php .

    2rappe aroun the installer will be our autorun application) which will be custom%mae for thisgame by the Nuclear Monkey Software team. This autorun will run in two possible moes. ,ne will beflashy for high%en systems) the other will run only simple graphics for low%en systems.

    The autorun application will ha(e the following options:

    GnstallG if the game has not been installe. GPlayG if it has been installe.

    Gnstall DirectEG) which will install the DirectE runtimes necessary to play the game.

    GView eameG) which will open the gameFs release notes in the ,SFs efault te=t eitor.

    GNuclear Monkey Software on the 2ebG) which will open the Nuclear Monkey Software websitein the ,SFs efault web browser.

    Narbacular Drop Page *

  • 7/26/2019 Narbacular Drop Technical Design Document

    30/38

    Appendices

    Console 1 2ey 0indin*Prpose'To gi(e players fine control o(er their input scheme.aintainer'Ueep &arnett.

    Console:The -onsole is esigne to be a fle=ible ebugging an scripting tool.

  • 7/26/2019 Narbacular Drop Technical Design Document

    31/38

    .udio $n*ine

    Prpose'To create a robust an simple%to%use auio system.aintainer'Ueep &arnett.

    The 'M,D library an inclue files nee to be ae to the inclue irectories of the pro+ect.'mo.ll also nees to be inclue in the root irectory of the pro+ect an buils. "ll necessary files can beownloae from http:33www.fmo.org.

    The main feature of the wrapper is that it efines *D backgroun music an *D3;D soun effectsas separate ob+ects) while in 'M,D they are the same ob+ect with ifferent parameters. &y choosing to playas soun effect or music it automatically configures these parameters for ma=imum simplicity anefficiency. t also manages separate global (olume controls for music an soun effects.

    Playing asound e00ectis fairly basic. -all the PlayS'E an pass the name of the file to play. t willplay it as a *D soun at ma=imum (olume. t returns a reference hanle so that itRs parameters A(olume)pan) pitch) etc. can be moifie ynamically with simple wrapper functions. This reference can also beuse irectly with 'M,DRs functions for complete fle=ibility. Wou may also choose to initiali@e an pass a

    S'Enit struct to PlayS'E to set its parameters at creation.

    PlayanomS'E can take an infinite number file name parameters an ranomly chooses one ofthem to be playe Afor less repetiti(e footsteps) etc..

    To play a 4D sound e00ect) the b;D bool in the S'Enit struct must be set to true. Then theS'E;Dnit member of the struct can be initiali@e with important ;D ata Aposition) (elocity) emissiontype) etc.. The returne reference can also be use to ynamically change ;D parameters. "global reverba#biancecan be set that affects all ;D S'E Aso long as the machine has a soun car that supports 5"E.

    5D #usicis playe with the PlayMusic function. This is esigne to assume that you usually onlywant one music track playing at a time. So calling PlayMusic when a track is alreay playing will stop the

    pre(ious track an start the new one.

    4owe(er) parameters can be set that allow se(eral tracks to be playe at once or for the tracks tobestac1ed. Stacking a track means that you choose the amount of secons that it will take for the currenttrack to fae to mute an the amount of secons that it will take for the new track to ramp to full (olume."n infinite number of tracks can be stacke Acappe by a (ariable ma=imum an all pre(ious tracks thatha(e fae continue to play Asilently. 2hen StopMusic is calle) the most recent track will fae an thetrack before it will ramp to full (olume. Stop"llMusic will stop all the stacke music tracks.

    'or looping positional #usic and a#biance) ;D soun effects shoul be use with b8ooping set totrue.

    SimpleM&D&support is also wrappe Aplay) stop) pause) but serious use of them shoul be oneusing the 'M,D interfaces.

    Narbacular Drop Page ;1

  • 7/26/2019 Narbacular Drop Technical Design Document

    32/38

    Sketcher $n*inePrpose' !raphics abstraction an management.aintainer' Da(e ?ircher

    O"er"ie),

    The Sketcher 5ngine is esigne to abstract all Direct;D re/uirements into automate systems thatcan be controlle through easy to unerstan functions. "lso) its seconary purpose is to pro(ie hea(ilyoptimi@e management for common graphics resources such as te=tures) lights) static3animating meshes)te=t to screen) an fog.

    The coe itself is esigne to take a(antage of namespace pop%ups within most - D5Rs tohelp coers fin the function3(ariable they nee. t oes this by separating the engine into * portions) bothe=isting as a single instance in global scope.

    The (iewable3public portion of the engine is a class comprise of subclasses for each logicali(ision of functionality Acamera) te=tures) fog) lighting. in a heaer. 5ach class an subclass contains,N8W static functions an static (ariables. So) if someone were to create an instance of the Sketcher

    5ngine) it woul contain nothing. "s escribe before) these neste classes allow coers to see all functionsan (ariables a(ailable in a section through the namespace pop%ups.

    The hien internal portion of the engine is a set of namespaces neste in a similar fashion as thepublic class. This namespace is kept within the engineRs cpp file) so itRs guarantee to be hien from theworl. This hien set of namespaces contains internal ata management information such as arrays ofallocate te=tures an lights.

    The last portion of the engine consists of (ariables that are mae rea%only in the public staticclasses. These are (ariables such as the current forwar (ector in relation to the camera) with of the screen)isplay format) things of that nature) which are goo to know) but shoul only be change by the engineitself. These (ariables are mae rea%only by first being create as a normal (ariable within the pri(atenamespaces. Then a constant reference to the pri(ate (ariable is mae in the public classes) which allows

    the (ariable to be change by the engine) an allows coers to rea the (ariable) but not change it withoutan e=plicit recast) which pre(ents acciental moification. Since the public (ariable is a reference) there is@ero e=tra memory usage an @ero e=tra processing time to access the contents of the (ariable.

    Narbacular Drop Page ;*

  • 7/26/2019 Narbacular Drop Technical Design Document

    33/38

    Pu&lic Data Outline,

    The primary class is JSketcher5ngineK efine in JSketcher5ngine.hK.

    Sclasses'

    D;D L -,M interfaces to Direct;D an the current Direct;D De(ice.

    nitiali@ation L 'unctions that are only neee uring initiali@ation an which cannot be use atany other time.

  • 7/26/2019 Narbacular Drop Technical Design Document

    34/38

    3sa*e (otes,

    Creating a renderale o"ect'The Sketcher 5ngine oes not efine any internal types of geometry or rawing methos e=cept for

    its own te=t o(erlay. enering of ob+ects is achie(e through a system of callbacks wrappe within a classfor ease of unerstaning.

    2hen a coer wants to create a renerable ob+ect. They must create a class that inherits fromJSketcher,b+ect&aseK which is efine in JSketcher,b+ect&ase.hK. This base class is an abstract baseclass with se(eral (ariables that are use to test the ob+ect) no matter how abstract) against the (iewingfrustum for /uick culling. These (ariables are:

    (-enter % D;DEV5-T,; use to efine the ob+ectRs center point.

    faius % which efines the istance from the ob+ectRs center to itRs furthest (erte=) this(alue can be a guesstimate if neee at the cost of culling accuracy.

    b,ptimi@eMe L &oolean that etermines whether the culling test shoul e(en be run onthe ob+ect. Setting this to false means that the ob+ect will automatically pass all (iewingfrustum tests.

    bn(isible L &oolean to allow for automatic non%renering of the ob+ect. f this is true)then the ob+ect will not be rawn.

    n aition to the abo(e (ariables) the base class contains a static constant reference toSketcher5ngineRs copy of the Direct;D De(ice pointer with the name pD;DDe(ice. This allows alleri(e ob+ect to refer to the commonly use Direct;D De(ice pointer more easily.

    8astly) the base class contains 1 pure (irtual function calle J!et-lassnformationK that must bere%implemente by all eri(ing classes. The function takes a reference to a JS,-lassnfoK structure) whichthe function is suppose to fill in with rele(ant ata. This function will only be calle when the ob+ect has

    been ae to the scene an the engine has ne(er encountere an ob+ect of its type yet. The engineetermines ifferences in ob+ect types by reaing an storing (ftable pointers from ob+ects) which areguarantee to be uni/ue for each class so long as itRs fille in the !et-lassnformation function) an e(enreliably uni/ue in cases where the function is not fille in by the eri(e class Aeri(e from eri(e classesthat fille it in.

    The S,-lassnfo struct has the following (ariables: pfnDraw L " class specific raw function must be cast to type JS,'uncPtrK an store here.

    The function store here must return (oi an take (oi. This function will be calle whene(er theengine is renering a scene an the ob+ect has passe all culling tests an nees to a itRs ata tothe screen. 2ithin the raw function) the ob+ect is allowe to assume for all intents an purposesthat it is the only ob+ect being rawn an can moify rener states an raw primiti(es as such.The ob+ect nee only be consierate to other ob+ects of its same type when changing rener statesin the raw function. ener states are reset between ob+ect types) but not between ob+ects of thesame type.

    pfn"llocateDrawingesources L "nother class specific callback that is of type JS,'uncPtrKAtakes (oi) returns (oi. This shoul be a callback to a function that will allocate Direct;Dresources such as (erte= buffers an te=tures that are re/uire to raw the current ob+ect. Theengine will call the function uner * circumstances: The first is when the ob+ect is first ae to the

    scene. The secon is when the Direct;D De(ice ha to be reset for some reason an the ob+ectshoul re%allocate its resources.

    pfn'reeDrawingesources L "nother class specific callback of type JS,'uncPtrK. This shoulbe a callback to a function that will free "88 Direct;D resources use by the current ob+ect. Theengine will call the function uner ; circumstances: 'irst) the ob+ect has been remo(e from thescene by coe in the ri(ing application. Secon) the Direct;D De(ice is about to be reset forsome reason Awhich re/uires all resources to be free first. Thir) the engineRs uninitiali@efunction has been calle an the ob+ect was still in a scene list.

    State&lock L This is of type Direct;DState&lock an shoul be fille with a state blockinterface. The contents of the state block shoul be rener state settings that are necessary to raw

    Narbacular Drop Page ;#

  • 7/26/2019 Narbacular Drop Technical Design Document

    35/38

    e(ery concei(able ob+ect of this class type. The contents of this state block will be applie after allrenerstates ha(e been reset to the engine efaults but before any ob+ect of this class type isrenere. This application is only performe once per class type. The class shoul account for anyrener state changes that take place within a rawing function of this class as well. Proper setup ofa goo state block is key for rawing efficiency. The intene metho for filling in this (ariable isto first call &eginState&lockA on pD;DDe(ice. Then to set the rener states as normal. 8astlycalling 5nState&lockA >sci.State&lock on pD;DDe(ice) which will fill in the (ariable withchanges you ha(e +ust mae an no others. t shoul be note that the engine itself is responsiblefor releasing state blocks) so the class oes not nee to keep track of its state block in any fashion.D5'"bar

    33if youRre paranoi

    Sketcher5ngine::

  • 7/26/2019 Narbacular Drop Technical Design Document

    36/38

    WorldCraft

    2orlcraft has been the stanar in eiting le(els for games using SoftwareFs engines ADoom)uake) 4alf%8ife for o(er a ecae. The outstaning feature is that classes of ob+ects an new atastructures can easily be create an place in 2orlcraft. This feature allows 2orlcraft to be use for

    nearly any game so long as the classes are customi@e.

    -lasses are customi@e in the '!D files. ThereFs ; types of entity classes: base) soli) an point.&ase classes are esigne to be eri(e from an cannot be instantiate. Soli classes are for entities thatare boun to geometry create within 2orlcraft. They are useful for mo(ing platforms) buttons) etc. Pointclasses use no geometry from 2orlcraft an e=ist at a single point. They are useful for light positions)respawn points) etc. 'or etaile escriptions of the synta= for creating an '!D file) please see2orl-raft.pf.

    2orlcraft uses 2"D files to store all of its te=tures. These can easily be create using a programcalle 2ally. Simply import the te=tures that you want into a single 2"D. ?eep in min that 2"D fileshol *06 color bitmaps) so itFs encourage that you keep a separate foler of the original high /ualityte=tures for actual use in the game. ea 2"D;'iles.pf for more etails.

    To create a le(el in 2orlcraft you use the simple set of tools pro(ie. ,ne creates geometry."nother creates point entities. To con(ert a piece of geometry to an entity right click on it an select JTieTo 5ntityK. To unbin it from an entity right click an select JMo(e To 2orlK. Press S4'T" to bringup the te=ture tool. To eit the 2orlspawn entity Aeach le(el has e=actly one 2orlspawn selectMapZMap Properties from the title bar menu. That co(ers the basics) so from here you shoul play arounor fin an online tutorial AthereFs hunres of goo ones out there.

    Sa(ing a 2orlcraft le(el creates an M'. This file is not useful to you. 5=port the le(el to a M"Pfile. This is a te=t%base format thatFs synta= is (ery basic. f you want to parse a M"P file on your own)rea M"P'iles.pf for more etails. &ut recommen that you use the parser that he has pro(ie. tcon(erts M"P files into -M' files. -M' is a file format that the creator of these ocuments mae an isesigne to work (ery well with custom games as well as optimi@ing the geometry that 2orlcraft creates.

    CMF +e"el Parser,

    The public function 8e(elnstance::8oa is use to loa a cmf file. This is generally calle fromthe 8e(elManager. 8oa first parses the heaer.

  • 7/26/2019 Narbacular Drop Technical Design Document

    37/38

    = Polygon Polygons

    The Property an Polygon ata structure is below.

    Property'= char Property name A@ero terminate= char Property (alue A@ero terminate

    Polygon'1 uint Te=ture D1 Plane Polygon plane1 uint Number of (ertices= Verte= Vertices

    Verte= an Plane are like this.

    ?erte'1 Vector; -oorinate* ouble u an ( te=ture coors

    Plane'1 Vector; Normal1 ouble D

    "n Vector;.

    ?ector;'

    ; ouble =) y) an @ component

  • 7/26/2019 Narbacular Drop Technical Design Document

    38/38

    Tea& Sign6#!!

    Prodct anager9eep 8arnett

    Technical DirectorDave @ircher

    Designer%arret ic3ey -------------------------------------------------------

    ProdcerArt Director

    @i& S$i!t -------------------------------------------------------