MDD FOR G ENERATING RPG G AMES FOR M OBILE P HONES Eduardo Marques , - - PowerPoint PPT Presentation
MDD FOR G ENERATING RPG G AMES FOR M OBILE P HONES Eduardo Marques , - - PowerPoint PPT Presentation
T HE RPG DSL: A CASE STUDY OF LANGUAGE ENGINEERING USING MDD FOR G ENERATING RPG G AMES FOR M OBILE P HONES Eduardo Marques , Valte Balegas, Bruno Barroca, Ankica Barisic, Vasco Amaral T HE P ROJECT Development of a language to create RPG
THE PROJECT
Development of a language to create RPG games Domain analysis Language Design Textual/Graphical language editor Generate framework code Game properties verification Target users: domain experts
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
DOMAIN ANALYSIS(1)
Identify the RPG Domain characteristics Restrict the domain 80% approach Textual description Feature model
DOMAIN ANALYSIS(2)
World Map Scenes
Tile map
Agents Hero
Inventory
Hostile
Interaction: Fight
Friendly
Interaction: Dialogue
Resources Gold, Wood and Metal Magics
DOMAIN ANALYSIS(3)
Agent properties Life points, magic points, strength, agility, intelligence,
experience
Objects Artifacts, equipment, keys, doors, obstacles, traps and
switches
Objectives Reach a specific scene Pick an artifact Interact with an agent Time
DOMAIN ANALYSIS(4)
DOMAIN ANALYSIS(5)
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
TARGET PLATFORM(1)
Platform analysis: Advantages and drawbacks Ease of learning/development
Framework Characteristics Slick Java based language; Uses LWJGL Sphere Scripting language; Abstraction level that allows typical RPG features implementation Corona Scripting language; Cross-platform compilation for Android and iOS
TARGET PLATFORM(2)
Corona Framework Development of an abstraction layer Implements RPG features Data structure library
Decision trees, graphs, menu lists
Simplify inter-model transformation
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
METAMODELS CREATION
RPG language metamodel: Based on domain analysis Framework metamodel: Based on API layer developed over the framework 1-1 relation between models (whenever possible)
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
GRAPHICAL LANGUAGE
Drag and drop approach Ease of use Developed using Eugenia and Emfatic
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
METAMODEL TRANSFORMATIONS
Generate target platform model instances Generate Petri-Nets for verification Using ATL Language and toolkit for model transformation
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
SOURCE CODE GENERATION
From RPG language to target platform language To generate verification rules Using Xpand – Template based language
RPG language Metamodel Graphical language Choose target platform Generate framework’s Metamodel RPG language instance APN Verification Source code generation Framework’s Metamodel instance Transformed to Transformed to Domain Analysis
VERIFICATION(1)
Create a minimal model of RPG language specific
for verification purposes.
An abstraction to simplify Petri-net generation
VERIFICATION(2)
Verified properties: User can finish game
Player completes the final objective
User can finish game with maximum score
Player completes all the objectives