Ninth IEEE International Symposium on Multimedia 2007 - Workshops

Constructing a Role Playing Interactive Learning Content Model DungChiuanWu 1,HuanYuLin 2,ShianShyongTseng*3,JuiFengWeng 4,JunMingSu 5 Department of Computer Science National Chiao Tung University, ROC Department of Information Science and Applications, Asia University, ROC 3 [email protected] 1, [email protected] 2, [email protected] 3, [email protected] 4, [email protected] 5 Abstract in the traditional web pages. Since role playing is an instructionalalternativesuitableforscenariosimulations, In the early years, the E-learning contents are it mainly has three advantages which are “Motivating always written by static HTML pages, which can not Students“, “Augmenting Traditional Curricula”, and provide a highly interactive learning activity to fulfil the “Learning RealWorld Skills” [1]. According to the need of some simulation based learning, e.g., Standard statistics [2] from Adobe, Flash Player is the most Operation Procedure Training. As we known, the pervasive software platform in the world, which can learning objective of simulation based learning can be represent rich 2D animations on WWW and handle achieved via Role-Playing Flash interactive learning various interactions by writing ActionScript code, so contents. Since this kind of contents is usually manually Flashisanappropriatemediatorepresentthiskindof created, the construction is time-consuming and costly. interactivelearningcontents.However,creatingaFlash Thus, we propose an Object Oriented Interactive contentforinteractivelearningistimeconsumingand Content Model (OOICM) representing the high level costlyespeciallyfornonprogrammer,andthesecontents game knowledge for authors with the interface of aredifficulttoreuseandshare,becauseauthorshaveto OOICM to assist authors in constructing a Role-Playing write ActionScript codes to handle various events. learning content easily without writing low level codes. Therefore,howtofacilitatethecreationofRolePlaying OOICM is composed of three components: Story Flash content and reuse the learning content are Control Flow (SCF), Activity, and Scene Object (SO). importantissues. System layer of OOICM, where we apply Petri Net RolePlayingcontentiscomposedofstory(narrative), based rule set to model SCF and use frame knowledge charactersandscenes.Allcharactersarearrangedinthe representation to model Activities and SOs, is also scene and the story describes the goals flow for defined as the middleware to separate OOICM from characterstoact.Accordingtothisstructure,wepropose low-level implementation. Based on OOICM, we ObjectOrientedInteractiveContentModel(OOICM)to implement a generator with frame engine to help represent the high level knowledge of RolePlaying authors to construct the learning content. Finally, we learning content and make authors construct a compare the generator with other authoring tools and RolePlayinglearningcontenteasilywithoutwritinglow the experiment result shows the generator has better levelcodes.OOICMiscomposedofStoryControlFlow reusability. (SCF),whichisasequenceofsubgoals,Activity,which istheactionforSOstoperform,andSceneObject(SO), 1. Introduction whichistheobjectinascene.Wealsodefinethesystem layer to separate the high level knowledge from low level implementation. In system layer, we apply Petri With the growth of Internet, the technologies of Net based rule set, which can support process flow elearning are globally accepted for making learners modeling, concurrency handling, and validation, to study anytime and anywhere. In early years, these modelSCFandapplyframeknowledgerepresentation, eLearning contents are static and lack interactive which can represent attributes, event procedure, featuresduetothepureHTMLformat,sosomelearning inheritancerelation,andprovidesasystematicinference objectives,involvingscenariosimulationsandrequiring mechanism,tomodelActivityandSO. theinteractionswithlearners,aredifficulttobefulfilled. Because we apply rule set and frame, the system For example, Standard Operation Procedure training, environment must contain a frame engine. We whichneedsa scenario simulation learning activity to implement it in ActionScript and develop a generator improvetheimpression,cannotbeproperlyrepresented

0-7695-3084-2/07 $25.00 © 2007 IEEE 15 DOI 10.1109/ISM.Workshops.2007.9

basedonOOICMtoassistauthorsinconstructingthe defined as Activities, with other SOs to achieve the RolePlayinglearningcontent. subgoalandfinishthestory,definedasSCF.

2. Related Work Subgoal

ˇˇˇ

ˇ ˇ ˇ

ˇˇˇ ˇ 2.1. Authoring Tools

Many tools can be used to create the interactive content. [3]istheoriginalandpopularauthoring tooltocreatetheflashformatcontent.SinceFlashisnot Hello Hello originally designed to construct the RolePlaying content,authorshavetoaddActionScriptcodemanually to simulate the behaviors of the role playing games. However, it is not easy for a programmer to write ActionScriptcodetohandlevariedeventsinagame,not Figure 1: OOICM overview tomentionanonprogrammer. RPG-Maker [4], a powerful tool for creating 3.1. Story Control Flow (SCF) roleplaying games, provides a userfriendly editor interface for creating a roleplaying game without The SCF denotes a flow of subgoals in a writinglowlevelcodes,whereeventsareattachedtothe RolePlayinglearningcontent.Inotherwords, SCF is grids in the game map and the story control flow is thestory,whichisacontrolflowtodescribeaflowof eventdriven but not represented explicitly. What events that the learner has to experience, in the authorsseeisthegamesceneandalotofrelatedevents. RolePlayinglearningcontent.In[5,6],theplanningis The scenario of the game can not be understood by applied to represent the story. In Interactive Drama authors. It results in that the complex role playing Architecture(IDA)[7,8],partialorderinggraphisused contentisdifficulttoconstruct,reuse,andmaintain. torepresentstory.In[9],PetriNetisusedtomodelan atomic action called transaction. There are three 3. Object Oriented Interactive Content relationships of ordering and two logics relationships Model (OOICM) between transactions. The language that Petri Net generatescanbeusedtocharacterizethetopologyofthe Asmentionedabove,itseemsnecessarytodesigna virtual space in a game [10]. In [11], in order to RolePlaying interactive learning content model for characterize narrative structures, they propose nonprofessionalgamedevelopers,suchasteachers,to “narrative nets” (Nnets), which are based on colored facilitate constructing and reusing interactive learning Petri nets. In [12], a representation framework called contents. Therefore, we propose Object Oriented NarrativeFlowGraphs(NFG),derivedfrom1safePetri InteractiveContentModel(OOICM) fromtheauthors’ Net,isproposed.NFGcanbeusedtoverifydesirable viewpoint to let authors construct complete properties,orasthebasisforanarrativedevelopment RolePlaying interactive learning content easily. In system. These researches mainly attempt to verify the OOICM, objectoriented methodology is used to propertiesofthestoryflowsuchasthebalancebetween encapsulate the internal control codes of interaction theusercontrolandthestorycoherence,buttheirstory handlinganddefinethecomponenttypestoensurethe representationcannotbeeasilyunderstoodbyauthors. correctnessincomponentreusingandcomposing. Besides, a complete interactive learning content must AsshowninFigure1,OOICMiscomposedofthree contain Actions and Scene Objects, which can not be components: Story Control Flow (SCF), Activity, and represented by above methodologies. Therefore, we SceneObject(SO).StoryControlFlowdenotesaflow definetheSCFtomodelthestoryasfollows. ofsubgoals,ActivitydenotesaspecificactionthatSOs canperform,andsomeactivitiesmayachievesubgoals Definition 1 in the SCF. Scene Object denotes the objects that TheStoryControlFlow isa3tupleSCF =(N,C,O), constitutethesceneoflearningcontent. where Inotherwords,withOOICM,learnersneedtoplaya character,definedasanSO,toperformsomeactions,

16

1. N = {n 1,n 2,…,n m},whichmeanstheplotsinastory, copiesofpapers”,use“Concurrence”,markedas“C”,to isafinitesetofSCFnodes.n iincludesfourtypeswhich represent that the two subgoals can be achieved are Start , End , Connective , Regular ,and Super . concurrently, and use “And”, marked as “A”, to  The Start node and End node aretheuniqueatomic representthatthetwosubgoalsshouldbeachievedboth. nodesthatspecifythestartandtheend of a game WhenthelearnerreachestheEndnode,theactivityis respectively. completed. This SCF can be encapsulated into single  The Connective node is an atomic node just for Supernode,whichcanbereusedasapartofstoryinthe connectingdifferentconnectors. larger scenario of standard graduation procedure  The Regular node isanatomicnodethatdenotesthe training. subgoal in a game. It has an attached activity declaration.  The Super node is a composite node that can be takenapartintonodesandconnectors.AnSCFcan be encapsulated into a Super node, which can be reused as a single node in another SCF. When an SCFistransformedintoaSupernode,theStartnode Figure 2: The SCF of the standard graduation and End node in the SCF will both become a procedure training Connectivenode. 2. C ={c 1,c 2,…,c n},whichmeanstheflowdirections 3.2. Activity ofplots,isafinitesetofSCFconnectors.Aconnectorc i =( TN , HN , t)isconsideredtobedirectedfrom TN to Activity is the action that the player can perform. HN . SomeactivitiesmayachievesomesubgoalsintheSCF.  TN ⊂ N. TN iscalledthe PreNodes ofc .Theside i The basic principle is that if the precondition of an thatconnectsto TN iscalled tail ofc . i activityissatisfied,thisactivitywillbeexecuted, and  HN ⊂ N. HN iscalledthe PostNodes ofc .Theside i causes some post action to be executed. As shown in thatconnectsto HN iscalled head ofc . i Table 1, authors must assign values to four basic  tdenotesthetypeoftheconnection.Therearefive attributesforeveryactivity. types which are “Linear”, “Concurrence”, Table 1: The attributes of an activity “Selection”,“And”,and“Or”.If| TN |=| HN |=1,the Attribute Description twouldbe“Linear”,andif| TN |=1,| HN |>1,the Specify the participants for the activity. The branchingsubgoalof HN canbe“Concurrence”or Participants format is ( p 1, p 2, …, p i, ….). Sceneobjectp imustconformwithtypet i. “Selection”whichmeanslearnerscanachievetheall Effect Specifytheeffectaftertheactivityisfinished. subgoalorcanselectonlyonesubgoal.If| TN |>1 SomeAPIswillbeprovidedforauthors. Specify when the activity can be performed. and| HN |=1,thesubgoalof TN maybe“And”or Therearesixoptions. “Or”meansthatalloroneoftheprevioussubgoals ○1 “Default”:Ifthisactivityisattachedtosome SCFnode,itcanbeperformedwhenthenodeis shouldbeachieved. enabled.Ifthisactivityisnotattachedtoany 3. O={o 1,o 2,…,o q},whichmeansthecast,isafinite SCFnode,itcanbeperformedanytime. ○2 “Always”: This activity can be performed setofSceneObjectdeclarations.o i=( type , variable ), LifeCycle anytime. where type isthetypeofo i, variable istheidentification ○3 “AE_ NodeName ”:AfterthegivenSCFnode isenabled,thisactivitycanbeperformed. foro i. ○4 “AF_ NodeName ”:AfterthegivenSCFnode Toourknowledge,SCFisenoughtorepresentmost isfinished,thisactivitycanbeperformed. ○5 “BE_ NodeName ”: Before the given SCF scenarios.ThefollowingisanexampletoillustrateSCF. nodeisenabled,thisactivitycanbeperformed. ○6 “BF_ NodeName ”: Before the given SCF Example 1. The standard graduation procedure nodeisfinished,thisactivitycanbeperformed. SpecifythenodeintheSCF.Theactivitywill training Subgoal beattachedtoagivennode(subgoal)inSCF. Figure2showsapartialgraduationprocedure,which Aftertheactivityisfinished,thesubgoalwill beachieved. isastandardoperationprocedureforagraduatetogeta In this paper, we predefine five kinds of activity graduationcertificate.Intheprocedure,theplayerhasto templateswhichare“Conversation”,“TakeItem”,“Use talktoMarytoreceivehints,andthentheplayerknows Item”, “Trade”, and “Time”. “Conversation” denotes thathe/shehastomakethreecopiesofpapersandgive that the player has a conversation with another Non themtothelaboratory.Atthesametime,theplayeralso PlayerCharacter. “Take Item” denotes that the player hastoreturnthekeyoftheresearchlaboratorytothelab takes some item to his inventory. “Use Item” denotes manager.InSCF,weuseregularnodestorepresentall thattheplayerusessomeiteminhisinventory(tosome the subgoals, such as “Talk to Mary”, “Make three

17

target).“Trade”denotesthattheplayerbuyssomeitem from a trader and then the item is put in the player’s Table 3: The descriptions of concepts in Scene Object inventory. “Time” denotes that some event will be Ontology triggeredafteragivenintervaloftime.Ifanewkindof Scene Object Type Description BaseSceneObject Thebaseobjectinascene. activity is required, a new template can be added to DynamicObject Theanimateobject.Forexample,adog. extendtheactivitytemplates.Thesefivetemplateshave Non Player TheAIobject. thedefaultpreconditionsandaredescribedinTable2. Character PlayerCharacter Theobjectthatcanbecontrolledbythe Table 2: Activity templates player,i.e.theprotagonist. The inanimate object. For example, a Activity Attribute StaticObject Template building. Participants (< PlayerCharacter > pc , Item Theobjectthatcanbetakenandusedby Type npc ) thePlayerCharacter.Forexample,apen. Conversation Default pc collideswith npc andthemouseclick When touching the Transfer Space, the Precondition pc . TransferSpace player will be transferred to another scene.Forexample,adoor. Dialog {(speaker 1,content 1),(speaker 2, content 2),…} Participants (< PlayerCharacter > pc ,< Item > item ) TakeItem Type 4. System Layer of OOICM Default pc collideswith item ,and item issel ected Precondition bythemouse. Participants (< PlayerCharacter > pc ,< Item > item , In order to separate the high level knowledge from Type target ) lowlevelimplementation,thesystemlayerofOOICM, Case1: target isnull TheplayerclickstheuseButtonfor item whereweapplyPetriNetbasedrulesettomodelSCF, UseItem Default in pc ’sventory. and the frame knowledge representation to model Precondition Case2: target isnotnull When pc collideswith target ,theplayer ActivityandSO,isdefined.ThesystemlayerofOOICM clickstheuseButtonfor item in pc ’s can make transformation from OOICM into ventory. ActionScript easier with the powerful knowledge Participants (< PlayerCharacter > pc , Type npc , representations, frames and Petri Net, as middleware, Trade goods ) and OOICM can be extended without modifying Default pc collideswith npc andtheplayerclicks Precondition thebuyButtonfor goods . ActionScript code structures, because the system Participants ( so ) actuallyhandlesrulesetandframeswithfixedexecution Time Type Default Agiventimeintervalelapses. mechanism. Precondition 4.4. Petri Net for SCF (SCFPN) 3.3. Scene Object (SO) ThePetriNetsareusedtomodeltheSCF,andcanbe SceneObjectdenotestheobjectsthatconstitutethe transformedintorules,whichareeasytobeexecuted, scene,e.g.,aperson,adog,atree,andsoon.Inorderto whensystemisrunning.ThedefinitionofPetriNetfor describethefeaturesandconceptsofvariousSOs,we theSCFisdescribedasfollows,andthetransformation proposeSceneObjectOntologytoclassifySOswiththe methodisshowninTable4,Table5. inheritedattributesandrelations.AsshowninFigure3, SOs are classified into Dynamic Object which is an Definition 2 animate object such as an animal and Static Object ThePetriNetforStoryControlFlowisa5tuple. which is an inanimate object such as a building. The SCFPN =(P,T,F,W,M ),where relationamongSOsinSceneObjectOntologyis“A kind 0 of ”,whichdenotestheinheritancefromtheparent.For 1. P={p 1,p 2,…,p m}isafinitesetofplaces.Pincludes example,“NonPlayerCharacter”isakindof“Dynamic fivetypesofplaces.  PP:Theprogressofastory. Object”, so the attributes of “Dynamic Object” are inheritedby“NonPlayerCharacter”.Thedetailsofall  PS:Thestartofastory. sceneobjectsareshowninTable3.  PE:Theendofastory.

Base  PL:Checkwhethertheactivityiscompleted. A Kind Of Scene Object 2.T={t 1,t 2,…,t n} isafinitesetoftransitionswhich disjointformP(P∩T=0) Dynamic Static Object Object 3.F ⊆ (P × T) ∪ (T × P) isasetofarcs(flowrelation). 4.W:F→{1,2,3,…}isaweightfunction. 5. M :P→{0,1,2,3,…}istheinitialmarkingandM (P ) Non Player Player Transfer 0 0 S Character Item Character Sapce =1. Figure 3: Scene Object Ontology

18

Theconditionthattriggersthis Table 4: The corresponding Petri Net for SCF nodes. PreCondition Rule SCF Node SCF Node activitytostart. Petri Net Notation Petri Net Notation Type Type Specify when the activity can LifeCycle String beperformed. Start Virtual The actions that will be InActivity Procedure executed when the activity is proceeding. End Normal The result of this activity. So Result String far, it is useful for only Conversaton activity. Table 5: The corresponding Petri Net for SCF The actions that will be PostAction Rule executed after the activity is connectors. finished. SCF Connector SCF Connector Petri Net Notation Petri Net Notation The subgoal that this activity Type Type GoalTest Rule willachieveinSCF.

Linear And Table 7: Five kinds of templates of activity Activity Default Slot Value Template IfActor.Collision(SceneObject target )==trueAND, Concurrence Or PreCondition Conversation target .onRelease==true,then triggerInActivity. InActivity CallConversation.run() IfActor.Collision(Itemtarget)== Selection TakeItem PreCondition trueANDtarget.MouseDown== true,thentriggerInActivity. InActivity CallTakeItem.run() IfActor.Collision(SceneObject Example4. Transform SCF in Example 1 into PreCondition target)==trueAND UseItem Actor.Inventory.Items[i].clickUse SCFPN. ==true,thentriggerInActivity. Figure 4 shows the steps to transform the SCF of InActivity CallUseItem.run() Example1intothecorrespondingPetriNet.InStep1,a IfActor.Collision(SceneObject PreCondition target)==trueAND newemptyPetriNetpniscreated.InStep2,everynode Trade target.goods[i].clickBuy==true, thentriggerInActivity. ni is transformed into the corresponding Petri Net. In InActivity CallTrade.run() Step 3, every connector c is transformed into the i PreCondition IfTime.Elapsed==timeInterval, correspondingPetriNetandarcsarecreatedtoconnect Time thentriggerInActivity. InActivity CallTime.run() PreNodeandPostNodeofc . i Example 5. A Conversation Frame Instance The Conversation frameinstanceisshowninFigure5. If John collides with Mary, a Conversation procedure will be called to show the dialogs of John and Mary. Whentheconversationends,aresultvaluewillbeadded tothe Result slot.Afterthat, PostAction and Goal willbe triggered. PostAction checksthe Result slotvalue,ifthe valueis“result1”,thentheappearanceofMarywillbe changed. Goal alsochecksthe Result slotvalue,ifthe valueis“result1”,thenitmeanssubgoal1isachieved. Figure 4: Transform SCF in example 1 into Petri Net Conversation Slot Name Value 4.5. Activity Frame Actor John PreCondition ifActor.Collision.Name ==Mary thentriggerInActivity

The frame of an activity is shown in Table 6. LifeCycle “Default” If added InActivity Conversationprocedure Trigger PostAction and PreCondition slotand InActivity slothavedefaultvalues, GoalTest andtheotherslotvaluesarespecifiedbytheauthor,as Result result1 PostAction ifResult==result1, showninTable7. setMary.appearence = “smile.gif ”

Table 6: The descriptions of the slots in an activity GoalTest ifResult==Result1,setsubgoal1=true frame. Activity Figure 5: An instance of Conversation frame Slot Name Type Description Sceneobjectsthatparticipantin Actor SceneObject thisactivity.

19

4.6. Scene Object Frame type and Non Player Character type respectively. To simplifyoutdescription,weonlyshowthepartialframes We apply the frame knowledge representation to inourexample.ThemancalledJohnandthegirlcalled describetheattributesofthesceneobject.Theattributes Mary will have a conversation activity. The frame ofthesceneobjectcanbeclassifiedintothreecategories representationoftheconversationactivitycalledCsAT which are resource , profile , and behavior . Resource isshowninthebottomsideofFigure7. denotes the external files of the scene object. Profile RPG-like Learning Content denotesthepersonaldataofthesceneobject.Behavior denotes the eventdriven behavior. The definition is describedasfollows. (SO) John is a Player Character (SO) Mary is a Non Player Character Definition 3 Slot name Type Value Slot name Type Value TheSceneObjectFrameisa4tuple.SOF =(FN,Rel, Name String “John” Name String “Mary” Location Point (200,100) Appearance String “MaryHappy.png” S),where Collision Scene Object Mary 9 1. FN isthenameofaframe. 1 5 If added, 2. Rel ={rel ,rel ,…,rel }andrel = Set this to CSwithMary.Actor 1 2 h k Trigger CSwithMary.PreCondition whichistherelationwithotherframespecifiedby (Activity) CsAT is a Conversation Slot Name Type value framenameFN.Therearethreetypesofrelation–“a Procedure() Actor Dynamic John 2 { Object kind of”,“a part of”. if( …) PreCondition rule if Actor.Collision.Name == Mary { then trigger InActivity 3 dialog.show(); 3. S={s ,s ,...,s }isafinitesetofslots,ands =,where 4 { i i Result String “Result1” 7 6 …  SN isthenameoftheithslot } i PostAction Rule if Result == Result1, 8 …  V isthevalueoftheithslot. set Mary.appearence = “MaryHappy.png” } GoalTest Rule if Result == Result1, set cs1 = true i 10 If added trigger  P isaattachedprocedurethatcanbetriggeredby PostAction and GoalTest i “ifadded”events. Figure 7: The OOICM running process Example 6. A frame instance for Non Player After the learning activity starts, the Petri Net runs Character andbecomesState2inFigure8.Allsceneobjectsare Figure6showsanexampleof Non Player Character setaccordingtotheirframes.Theplayercanpressup, frame. The scene object Mary will be located at the down,left,andrightkeytomoveJohn.Whentheplayer coordination(10,100),anditsappearanceistheimage pressesleftkey,theusereventinterrupthappens,andif from“C:\Mary.png”.TheCollisionslotisnullbecause John collides with Mary, CsAT will be triggered as nootherSOscollidewithit. shown in Figure 7. In the inference process 1, the Non Player Character CollisionslotvalueofJohnframeisaddedandthenthe Slot Value attachedprocedureistriggered.In2,Actorslotvalueof Name Mary CsAT isadded.In3,theprocessshouldcheckwhether profile Location (10,100) PreConditionissatisfied.In4,ifPreConditionistrue, Size Width=20,Height=30 theprocedureofInActivityisrun.In5,theprocedureof resource → Appearance “C:\Mary.png ” InActivitycausesJohnandMarytoconverse.In6,after behavior → Collision null theconversation,theprocedureofInActivityaddsresult Figure 6: The frame representation of a SO to Result slot. In 7, Result slot is added, so attached procedureistriggered.In8,thePostActionprocedureis 4.7. The OOICM Running Process run to set Appearance slot of Mary frame. In 9, AppearanceslotofMaryframeisupdated.In10,the Inthissection,wewilldiscusstherunningprocessof GoalTestprocedureisruntoaddatokeninPetriNet, framesandPetriNet.Wegiveanexampleofasimple and therefore Petri Net for SCF becomes State 3 in conversationscenariotoexplainthat. Figure8.Final,thePetriNetrunsagainandbecomes State4inFigure8.Thelearningactivitywillcontinue Example 7. The learning content of a simple untilPEinPetriNethasonetokenandthestoryends. 3 conversation scenario. talk ContinuingfromtheExample5, the initial mark of PL1 1 4 5 SCFPNisState1showninFigure8.P Shasonetoken. 2 PS PP11 PP1 PP2 ... PE AsshowninFigure7,thesceneofthelearningcontent containstwosceneobjectswhichare Player Character Figure 8: The running process of Petri Net

20

5. Implementation imported,suchasimagesandsounds.Itistheinputfor Swfmill [13]thatisanxml2swfandswf2xmlprocessor InthisSection,wewillintroduceourgeneratorthat with import functionalities. Swfmill will import the cangenerateActionScriptcodesandthencompilethe assetsdescribedin“Source.xml”intoablankflashfile codes into Flash file. Figure 9 shows the prototype called “source.”. After that, “FlashLC.as” and systemofthegenerator.TheSCFwillbetransformed “source.swf”areinputtedto MTASC [14].MTASC isan intoPetriNetbasedrule set. Activity and SO will be ActionScript 2 Open Source free compiler. It can transformedintoframesbyfillingintheslotsofframes compilelargenumberof .as classfilesinaveryshort accordingtotheattributesofActivityandSO.Because time and generate directly the corresponding SWF we apply rules to model SCF and apply frame bytecodewithoutrelyingonAdobeFlashorothertools. knowledgerepresentationtomodelActivityandSOin “FlashLC.as” may call function from Library, so the system layer of OOICM, the system environment MTASC has to import class from Library. Final, mustcontainaframeenginetomakerulesandframes MTASCwillgenerateaFlashfilecalled“FlashLC.swf”. workcooperatively.Therefore,weimplementthePetri Net engine and frame engine in ActionScript, and 6. Experiment proposeanalgorithmOOICM2AStotransformruleset andframesintoActionScriptcodes. For evaluating the OOICM model, we have implemented a generator based on OOICM. The generatortransformsXMLfileintoFlashfile.Authors UI constructtheRolePlayinglearningcontent by editing

Transform XML. In addition, a scenario is given to evaluate the expressivepowerofOOICMandwealsocomparethe generatorwithAdobeFlashandRPGMaker.

6.1. Experiment Design OOICM2AS

We use the generator to generate the learning contentandcomparewithAdobeFlashandRPGMaker. The experiment gives a scenario of the standard Figure 9: A prototype system based on OOICM operation procedure. The player plays the role of a graduate. The scenario describes the player has to (1) Frame Engine complete several procedures in order to get the A frame engine is necessary in order to handle the graduation certificate. Figure 10 shows the SCF, and inference of activity frames and SO frames. We Figure11showsthescreenshotofthegame. implementeachactivityframeand each Scene Object frames as several ActionScript classes. The communications among frames and Petri Net mainly relyontheActionScriptAPI dispatchEvent() . (2) OOICM2AS OOICM must be transformed into ActionScript (AS)codesothatthecompilercancompilethecodeinto Figure 10: The SCF of our experiment SWF file. We have implemented SCFPN AS class, ActivityASclass,SOASclass.OOICM2ASisatedious file and string processing. It writes appropriate string intoAScodefileaccordingtothesettingofPetriNet andframes. (3) Generator Our generator has four inputs and one output. “Story.xml”, “Activity.xml”, and “Scene.xml” are the specifications of SCF, Activity , and Scene Object respectively. Transform process will parse these xml files and then apply OOICM2AS algorithm to transform them into ActionScript file called “FlashLC.as”. “Source.xml” describes what asset is Figure 11: The screenshot of the learning content

21

6.2. Experiment Results 9. References

We count the steps of constructing this learning [1]Teed,R. Role-Playing Exercises .2006[cited2007Jul content for our generator and RPGMaker. Figure 12 20]; http://serc.carleton.edu/introgeo/roleplaying/ . shows the comparison of the number of steps. When [2]Adobe. Flash Player Penetration 2007[cited2007Jul20]; constructinganewlearningcontentinourexperiment http://www.adobe.com/products/player_census/flashplay design, the generator spends about 350 steps and er/ . [3]Adobe. Adobe Flash .2007March3[cited2007Jul20]; RPGMakerspendsabout250steps.Becausewehaveto http://www.adobe.com/products/flash/ . constructSCF,thecostforconstructinganewlearning [4]Enterbrain. RPG Maker .2006Jan31[cited2007Jul20]; content is more than RPGMaker. However, the http://www.enterbrain.co.jp/tkool/RPG_XP/eng/ . generator spends fewer steps than RPGMaker for [5]Riedl,M.O.,C.J.Saretto,andR.M.Young, Managing reusingalearningcontent.Intheexperiment,wereuse interaction between users and agents in a multi-agent theSCF,theauthorjust reconfigure the activities and storytelling environment ,in Proceedings of the second SOs.Inaddition,theAScode,generatingbygenerator, international joint conference on Autonomous agents and contains 686 lines. If we take the other library into multiagent systems 2003. account,authorshavetowritemorethan686lines of [6]Young,R.M.,etal., An Architecture for Integrating Plan-based Behavior Generation with Interactive Game codeinAdobeFlash. Environments. JournalofGameDevelopment,2004. 1(1). 400 [7]Magerko,B.,etal., AI Characters and Directors for 350 Interactive Computer Games ,in Proceedings of the 2004 300 Innovative Applications of Artificial Intelligence 250 Conference .2004:SanJose,CA. Generator 200 [8]Magerko,B., Story Representation and Interactive Drama ,

Steps RPG-Maker 150 in 1st Artificial Intelligence and Interactive Digital 100 Entertainment Conference .2005. 50 [9]Natkin,S.andL.Vega, A Petri Net Model for Computer 0 Games Analysis. InternationalJournalofIntelligent Games&Simulation,2004. 3(1). Construct Reuse [10]Vega,L.,etal., A new Methodology for Spatiotemporal Figure 12: The comparison of the number of steps Game Design ,in Fifth Game-On International Conference on Computer Games: Artificial Intelligence, Design and Education .2004. 7. Conclusion [11]Purvis,M., Narrative Structures for Multi-Agent Interaction ,in Proceedings of the IEEE/WIC/ACM Inthispaper,weapplyknowledgebasedapproachto International Conference on Intelligent Agent Technology . proposeOOICM,whichiscomposedofSCF,Activity, 2004. andSO.WeapplyPetriNettomodelSCFandapply [12]Verbrugge,C., A Structure for Modern Computer FrameknowledgerepresentationtomodelActivityand Narratives ,in International Conference on Computers SO.Ontologyisproposedtodescribetherelationsofall and Games .2002. [13]OSFlash. swfmill .2007Mar16[cited2007Jul20]; kinds of SOs. Moreover, we also implement a http://osflash.org/swfmill . RolePlayinginteractivelearningcontentgeneratorand [14]MotionTwin. MTASC .2005[cited2007Jul20]; evaluate the effectiveness of RolePlaying interactive http://www.mtasc.org/ . learning content authoring by means of OOICM. The result shows that this generator can help authors constructaRolePlayingflashlearningcontentwithout lowlevelprogramminganditcanmakereuseofcontent scenarioeasily.

8. Acknowledgement

This research was partially supported by National ScienceCouncilofRepublicofChinaunderthenumber of NSC952520S009007MY3 and NSC952520 S009008MY3.

22