Smart Contruction Builder
Transcript of Smart Contruction Builder
-
7/29/2019 Smart Contruction Builder
1/12
SMART CONTRUCTION BUILDER
A MDA APPROACH TO GENERATE
CONSTRUCTION SIMULATION GAMES
SANCHEZ VERA, KEVIN DAVID
Abstract
Because of the increasing expansion of different kinds of mobile devices, the videogames industry
is passing through the problem of implementing a specific videogame application for every single
mobile platform, making difficult to reduce the time to market for all the devices. Thus, it is
necessary to create a way in which a videogame can be produced for multiple platforms in a short
time. In this paper we propose a Model Driven Software Product Line (MD-SPL) for videogamesapplications, specifically, construction-simulation games such as CityVille, FarmVille or Empires
and Allies. The MD-SPL takes advantage from the similarities of that kind of videogames, and tries
to deal with the platform variability, making possible to create games for android and html5.To
attain the goal, we use platform independent models to abstract common game business concepts
and interaction concepts, using the use case model specific for that kind of video games through
patterns. Finally, we validate that approach with a case study for School construction game.
INTRODUCTION
Technological advances in recent years have allowed an easy access to mobile devices for more
people in the world, making possible that sometimes one person have more than one device. This
large number of users of mobile devices make these platforms points of interest for application
developers, because mobiles have a big part of the world's software market. This variety of mobile
devices includes the existence of a variety of different platforms like Android, iOS, Symbian,
BlackBerry, Windows Mobile and others.
The platform variability makes that developers must learn to use each of the technologies, it is
because they have to implement applications for multiple platforms in order to achieve the whole
market. The videogame industry has faced this problem of variability of platforms, not only from
the boom of mobile phones, but since the arrival of gaming consoles in which the success of a
game on a specific console, demanded the implementation of the game for other consoles. The
big difference is that the problem today is stronger, not only focused on different consoles, but in
the variety of platforms and technologies on mobile devices.
-
7/29/2019 Smart Contruction Builder
2/12
There are many research focused on model driven video game development, the works of
Montero & Cars [1] proposed platform independent models for videogame gameplay
specifications, offering to game designers a precise model to describe, analyze and communicate
gameplay from early stages of development. The work is composed by a model that is called the
social context diagram, that defines how many players and teams interact with the game, an
structure diagram, that defines the game elements, attributes and events that compose the gamesystem, and the rule set that defines the game system behavior, implicitly specifying gameplay
through precisely defined declarative rules.
In another work, Montero & Cars [2] propose to apply Model Driven Development (MDD)
methodology to game development, raising the level of abstraction towards game conceptual
modeling, they use an structure, behavior and control diagrams for that objective, and present a
game design prototype tool to prototype 2D platform games for PC, with automatic code
generation from UML models.
In the Tang & Hanneghan[5] works they proposed a model driven serious games development
framework that consists of nine parts namely: (1) User Interfaces (UI), (2) Models, (3) MDE Tools,
(4) Components Library, (5) Code Templates, (6) Artefacts, (7) Technology Platform, (8) Operating
Platform and (9) Software.
Another works are focused in specific types of videogames, the work of Altunbay, Cetinkaya &
Metin [4] is concentrated in a model specification for Board games like chees, they create a board
game metamodel in which they specify de board game through an specific language modeled in
BNF. Through model to model transformations, and model to text transformation they generate
the game code.
This paper presents a software product line for creating construction-simulation games. Using themodel-driven development we abstract concepts of construction- simulation games on a PIM
model (platform independent model) and through model transformation chains we pass to PSM
models (Platform Specific Models), which can be easily converted, through a model to text
transformation, in the game code for that type of videogames. The advantages of the line are
given in terms of the time it takes for a developer to create a game in the traditional way versus
the time taken using the product line. We can say that the line takes into account the functional
variability of this type of games and the variability of platforms, initially allowing the generation of
code for android and html5.
In order to validate our work, we present an example called University Ville, in which we use oursoftware product line to create a simulation construction videogame for make an university. The
present paper is organized as follows: in chapter 1 we are going to explain the problems faced in
traditional software development and how model software architecture can solve those issues, in
chapter 2 we are going to talk about the state of the art for our work, in chapter 3 we talk about
the domain analysis taken into account in this work, in chapter 4 we present our independent
models, in chapter 5 our domain specific language for simulation construction games, in chapter 6
the complete model transformation chain, and finally future work and conclusions.
-
7/29/2019 Smart Contruction Builder
3/12
TRADITIONAL SOFTWARE DEVELOPMENT VS MODEL DRIVEN DEVELOPMENT
The traditional software development is driven by design and coding, including many phases in
iterative processes. In a normal project, people have to pass through many phases like
conceptualization, analysis, design, implementation, testing, and deployment, making the process
long and lowering productivity. The low-level design and coding generates a portability problem,because a software implementation is tied to a programming language and trying to create the
same software for another platform requires to re-create the software. Another problem related
to traditional software development is the problem of interoperability in which a developed
system has to communicate with other systems making the software tied with specific
technologies for communication. Finally, we have a maintenance and documentation problem,
because sometimes the documentation is not of very good quality, making difficult to understand
the code for maintenance.
With model driven development we give a solution to the problems encountered in traditional
software development, everything because of the development life cycle, we start with a Platform
Independent Model or PIM in which we include only the business concepts of the problem, then
through a model to model transformation we pass to a Platform Dependent Model or PSM that
includes specific concepts of a technological platform. Finally, through a model to text
transformation we can pass a PSM to software code.
This approach generate an increase in productivity, because, when the transformations rules were
created, an user only have to define a model conforms to the PIM metamodel, and the model
transformation chain will produce the code. The quality of the documentation is also improved, it
is because the code is auto generated, and the documentation too.
STATE OF THE ART
A PLATFORM INDEPENDENT GAME TECHNOLOGY MODEL FOR MODEL DRIVEN SERIOUS GAMES
DEVELOPMENT
-
7/29/2019 Smart Contruction Builder
4/12
The work of Tang and Hanneghan[5] was focused on the creation of a framework to create serious
games. The define the serious games as interactive applications that combines pedagogy and
interactive entertainment to create a virtual learning environment in an effort to motivate and
regain the interest of a new generation of digital native learners.
They proposed a model driven serious games development framework that consists of nine parts
namely: (1) User Interfaces (UI), (2) Models, (3) MDE Tools, (4) Components Library, (5) Code
Templates, (6) Artefacts, (7) Technology Platform, (8) Operating Platform and (9) Software. In the
first part they create the user interface using natural language, scripting and GUI code, after that,
they construct the models that describe the complete videogame in step 2, and then in steps 3
and 4 they do model transformations in order to obtain the source templates for the game. In the
next steps they complete the videogame. In figure 1 we show their complete process.
-
7/29/2019 Smart Contruction Builder
5/12
GENIUS
The Genius project propose a Model-Driven Web Engineering approach for construct transactional
web applications, that approach allows to deal with two main problems found in the enterprise
web application development, the first one is the lack of existence of an artifact in which a
business expert can explain a problem using only business concepts without needing an engineer
and the second one is the lack of a mechanism to abstract common concepts of structure,
behavior and implementation of functional requirements to achieve automatic code generation.
Genius is based on specific patterns that abstract features in order to improve developer
productivity by having standard solutions to certain problems. The representation of the problem
is the first step taken to generate transactional applications, the representation is achieved by
using two DSL, one called Enterprise Application Model that contains the domain structure of the
business and another called Extended Use Case Model that represents the application functional
requirements. The second step is to obtain a representation of the solution using two elements,
the pattern description, that includes the name and parameters required for functionality, and the
pattern of solution, that contain the information needed to generate the user interaction flow .
Using these representations, the GENIUS project generated transactional applications with
common functional requirements, the user intervention is only for the construction of the initial
modeling.
-
7/29/2019 Smart Contruction Builder
6/12
Mandarina Mobile
The main idea of the project Mandarina Mobile is proposing a solution that allows automatic
generation of connected mobile applications for multiple platforms, based on a MD-SPL approach
(Model Driven - Software product line). The idea of the project is to cope with three problems
encountered in developing connected mobile applications in a traditional way, low productivity in
creating applications, problems with developers that do not exploit usability standards of each
mobile platform, and the low extensibility of the generated applications. Based on these issues,
Mandarina Mobile specify a reference architecture in which functional variability and non
functional variability is contemplated (Given the devices and the different functions supported like
gps, wifi, accelerometer etc.). Using these models and some model transformation chains,
Mandarina mobile attains to derive mobile applications, and increase productivity by
automatically generating consistent graphical interfaces, taking into account the principles of
display of each platform and improving usability and the quality of the application code, because it
is based on a reference architecture. The proposed solution focuses on four main activities: 1)
functional variability, 2) variability of platforms, 3) architectural representation, and 4) mobile
generation.
-
7/29/2019 Smart Contruction Builder
7/12
SPECIFICATION OF USE CASES THROUGH PATTERNS AND RELATIONS OF COMPOSITION ON A
PRODUCT LINE FOR CONNECTED MOBILE APPLICATIONS
This project is based on Genius project ideas but with a big difference, Genius focuses on
transactional enterprise web applications and this project wants focus their patterns specifically to
connected mobile applications. The main objectives of the project are to develop a strategy for the
definition of the assets of the SPL by describing the variability of functional requirements through
use cases that allow the composition of these by means the include relationship, to define a
strategy for the specification of use cases through use case patterns expressed in terms of user
interactions with graphical interfaces of the application and the services provided by the platform,
and finally, to specify the main services provided by mobile platforms through use case patterns
that enable the creation of connected mobile applications.
DOMAIN ANALYSIS
The construction-simulation games in which this work is focus are those in which the player collect
resources, construct elements such as buildings or crops that are resource producers and enlarge
their constructions based in the collected resources. The aim could be construct a farm, an
empires or a city, always thinking in increase the size and production capacity of the elements
constructed. Three examples of that kind of games could be FarmVille, CityVille, and Empires andAllies, it is important to say that the three games are completely different, but in some cases they
share common general elements. Let talk about the main elements of the game Empires and
Allies. We have at the beginning a plane or construct area in which we can put different elements
like decorations, resource production buildings, home buildings, element creation buildings (For
produce warrior and arms) and govern buildings. Each element have a value in terms of resources
and some elements after a time produced some resources, the resources are raw materials for
construction. Besides that, a player have experience points and a nivel based on the experience.
Now we are going to talk about the main elements of the game City Ville. Like in Empires and
Allies, we have at the beginning a plane or construct area in which we can put different elements
like decorations, resource production buildings, home buildings and govern buildings, here we donot produce elements only resources. Each element have a value in terms of resources and some
elements after a time produced some resources, the resources are raw materials for construction.
A player have experience points and a nivel based on the experience too. Finally we are going to
talk about the main elements of the game FarmVille. Like in Empires and Allies, and CityVille, we
have at the beginning a plane or construct area in which we can put different elements like
decorations, crops, home buildings or animals. Each element have a value in terms of resources
-
7/29/2019 Smart Contruction Builder
8/12
and some elements after a time produced some resources, the resources are raw materials for sell
and earn coins. A player have experience points and a nivel based on the experience too. We can
say that the games share the same basic elements of functionality, we have some resources like
coins, seeds or wood, the games based their economy in these resources, we can buy or construct
thing using the collected resources and we can expand our construction area. The main
differences between these games are some game social mechanics included, the graphics in eachgame, the specific resources of each game, and the animations of the elements constructed or
included in the game scenery. Our work is motivated by the idea of the share of common same
basic elements in the games, based on this idea we abstract in a metamodel the common
elements of that kind of games, in order to produce a domain specific language or DSL to describe
construction-simulation video games. Following, we are going to explain all the elements that
compound the metamodel and to give an example of the element in the three games.
Plane
The Plane is the element that represent the area that can be constructed, in each game it is
represented as a green area. In the following image taken from FarmVille we can see the green
area in which we can construct things like crop spaces.
The Plane has the following characteristics:
The plane has an x axis size and a y axis size, these sizes represent a table space in which
we can construct things.
The plane has a side square size that represent the size of one of the square sides that
occupies a (x,y) position in the plane.
In a specific position in the Plane, one point(x,y), there are not two elements.
In terms of graphics, the plane has the following characteristics:
The plane have a visual matrix of isometric plane squares, all of the squares have the same
side size.
The plane have a color that represent an empty space.
-
7/29/2019 Smart Contruction Builder
9/12
Resource
A resource is a raw material that can be produced and collected inside the game, it represent the
basic elements of the economy for buy thing or to produce things. For example, in CityVille the
resources are coins, bills, energy, and product boxes.
A resource have the following characteristics:
A resource has an actual number of resources.
A resource has a limit number of resources.
Element
An element correspond to anything that can be constructed over the Plane, including decorations,
buildings, crops etc. An element encapsulates the general behaviors of things that can be
constructed, they have three principal components, a cost in terms of resources, a number of
resources needed to produce something, and the resources that will be produced, it is importantto say that the existence of the three elements it is not necessary. Furthermore, an element have
properties, that could be things like a name, a description, or the time takes to finish his
construction or the time takes to finish a resources production. Elements could be subcategorized
in order to recognize specific characteristics in the behavior of an element. We have two general
kinds of elements, the first one is the animated element and the second one is the inanimated
element.
An element has the following characteristics:
An element has a time taken to finish his construction.
An element could has a cost in terms of zero or many resources.
An element could produce zero or many resources.
An element has a time taken to produce resources.
An element has a list of resources needed to produce other resources.
An element occupies a position in the plane, it can occupies one or more (x,y) positions
but these positions have to be next to each others.
An element has an state that represent the actual activity of the resource, as an example
we can talk about construction state (The time to complete the construction has not been met),
waiting for resources to start production state (To begin the production of resource, the element
-
7/29/2019 Smart Contruction Builder
10/12
need other resources), production complete state (The production is complete and the player can
collect the produced resources).
-Animated Element
An animated element is a subcategory of an element that represent an element that have some
kind of animation, for example a crop that grows over time. In the next image we can see and
example taken from CityVille, crops begin like simple seed in the earth but at the end the are a big
plant.
In terms of graphics, the animated element has the following characteristics:
It has a constant animation, for example a house with smoke from the chimney.
-Inanimated Element
An animated element is a subcategory of an element that represent an element that do not have
some kind of animation, for example a rock or an avenue. In the following image we show an
example of animated elements that can be constructed in CityVille, some decorations like threes
do not have any kind of animation.
Challenge
A game could have challenges, the challenges are objectives that a player have in order to earn
experience points, they are described through a description and a number of resources that aplayer have to collect, one challenge can be compounded for other sub challenges.
In the following image we show a general metamodel of the concepts included in construction-
simulation games.
The Challenge has the following characteristics:
The challenge has a list of resources that have to be archived to win.
The challenge has a level in which it can appear.
-
7/29/2019 Smart Contruction Builder
11/12
PROPOSED MODEL
GENERAL PROPOSAL
REFERENCES
[1] Emanuel Montero Reyno and Jos . Cars Cubel. A Platform Independent Model for
Videogame Gameplay Specification Software Engineering and Information Systems Research
Group. Department of Information Systems and Computation. Technical University of Valencia.
Camino de Vera s/n. 46022 Valencia (Spain).
-
7/29/2019 Smart Contruction Builder
12/12
[2] Montero, E., Cars, J. A. Model-Driven Game Development: 2D Platform Game Prototyping.
9th International Conference on Intelligent Games and Simulation (Game-On08), Valencia, Spain,
November 2008.
[3]Tang, S. & Hanneghan, M. (2011). State-of-the-Art Model Driven Game Development: A Survey
of Technological Solutions for Game-Based Learning. Journal of Interactive Learning Research,22(4), 551-605. Chesapeake, VA: AACE.
[4] Altunbay, D., Cetinkaya, E., & Metin, M. G. (2009, 20th May). Model Driven Development of
Board Games paper presented at the First turkish Symposium on Model-Driven Software
Development (tMODeLS), Bilkent University, ankara turkey.
[5] Tang, S. & Hanneghan, M. (2010). A Platform Independent Game Technology Model for Model
Driven Serious Games Development. Proceeding DESE '10 Proceedings of the 2010 Developments
in E-systems Engineering. Pages 95-100. IEEE Computer Society Washington, DC, USA