Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
60 views6 pages

Development of 2D Game With Construct 2

The document discusses the development of a 2D game called 'Funky Student' using the Construct 2 game engine. It provides background on Construct 2 and compares it to other 2D game engines. The development process is then explained, including designing game layouts, organizing layers, and using events and actions.

Uploaded by

galih wiratmoko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views6 pages

Development of 2D Game With Construct 2

The document discusses the development of a 2D game called 'Funky Student' using the Construct 2 game engine. It provides background on Construct 2 and compares it to other 2D game engines. The development process is then explained, including designing game layouts, organizing layers, and using events and actions.

Uploaded by

galih wiratmoko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MIPRO 2019, May 20-24, 2019, Opatija Croatia

Development of 2D Game
with Construct 2

Antonio Šag and Tihomir Orehovački


Faculty of Informatics, Juraj Dobrila University of Pula, Croatia
{antonio.sag, tihomir.orehovacki}@unipu.hr

Abstract - Developing a computer game presents a big The remainder of the paper is structured as follows. The
challenge, since creating a single product requires much second section will briefly introduce Construct 2, present
more knowledge and experience in different areas than just comparison and features of the competitive 2D game
programming. However, the question is how to bring your engines and explain which games motivated us to start our
work to life in hours and days instead of weeks and months. own project in that respect. The essential part of the paper
Using the Construct 2 drag and drop method, we are able to is the third section in which the whole process of game
implement visual materials into our game, and the principle development is thoroughly explained. Conclusions are
of programming is reduced to the events option, which helps drawn in the last section.
us to assign actions through selected graphics icons.
Application instant preview allows fast prototyping and II. BACKGROUND TO OUR WORK
iterative development which enables testing during the entire
creation process, making it much easier to detect and resolve A. Construct 2 enivronment
problems. It gave us flexibility and the ability to see how the Construct 2 is a very simple commercial application for
prototype of each version actually responds to certain the creation and design of two-dimension games developed
actions, conditions, and events. As a final point, with a good
in early 2011. In Construct 2, the classic coding is replaced
organization and understanding of powerful event system,
with dragging and dropping game objects. Games
flexible behaviours, stunning visual effects and capabilities
provided by the Construct application package, it is possible
developed in Construct 2 are implemented in HTML5 and
to do any conceivable 2D project. Javascript languages. Several commercial computer games
were developed with Construct 2, some of which are
Keywords - Game Development, Construct 2, Game available on Steam [2] such as Airscape: The Fall of
Optimization, GUI, Interactive Review, 2D Project, Procedural Gravity, and The Next Penelope [1].
Mode
B. Comparison with the competitive 2D game engines
I. INTRODUCTION Adobe product called Adobe Flash Pro (Adobe
In the 21st century, computer games are one of the most Animate) is the industry’s leading animation toolset which
popular form of entertainment. Games have entered into lets us create apps, ads and amazing multimedia content
every aspect of everyday life and they do not have the age that moves across any screen. It allows us to draw art assets
limitations. The development of this form of entertainment in the engine using vector art and also animate it in-engine
is very demanding because the multimedia shape includes using key frames which is very convenient and simple to
integration and adaptation of videos, animation, 3D, text, use. Programming the animations is relatively easy as well.
audio and motionless picture. The development of Flash uses the Action Script 3 programming language
multimedia computer game is a very complex job which which is similar in syntax to JavaScript or C#. Flash is still
requires the team of experts who have the understanding of widely used in game development these days. It has a free
theory and practical methods used during the development 30-day trial option, but once the trial is finished we must
and who know how to use professional tools for the buy a license, unlike Construct 2, where we can work with
development of the multimedia games. The motivation for a free version as long as we like..
the game creation came from the detailed research and Game Maker Studio was originaly released by Yo Yo
analysis of the so-called “old-school” 2D games which games in 1999 under the name Animo. It was originally
marked many childhoods. Throughout this paper, we will
made for creating 2D animations but quickly moved on to
discuss the production of 2D platform game intended for
being a very robust 2D game development tool. Overall
one player. The name of the game is “Funky Student”, and
the groundwork of production is based on the usage of this engine is known as an introduction to game dev tool
Construct 2 architecture. The particularity of Construct 2 or a hobbyist tool. Games made in Game Maker Studio are
environment is in its adaptability to various platforms, such generally made using pre-defined events. Example of pre-
as browsers that support HTML5 and operational systems defined event will be: "when we select create new event
like Linux and Windows as well as the interactive we can then select “When Left Button is pressed” and then
compilation of the game at any moment, which enables select a pre-defined action like “Move Left” [7]. This
realistic overview of the game functionality to the means when the Left is pressed the assigned character
programmer. Graphic user interface is conceived with the moves left. This makes it easy for people to make simple
principle of adventure platform game „Super Mario”. games without knowing how to program. The following

1647
Figure 1. summarises the features of each of the tools A. The look of the layout
covered and provides a simple comparison of the tools. Layouts represent levels in the game. The reference of
the motifs in the background are characteristics related to
the city of Pula as shown in Figure 1. The second and third
layout were generated according to a conceived initiative.
All the content and objects we enter into an active scene
will automatically be connected to the active layout.

Figure 2. The first layout in “Funky Student” game

B. Layers
Layouts consist of layers which enable us to classify the
imported materials in groups. When importing materials
and objects, it is important to do the process of sorting by
the layers as shown in Figure 3. This process is done in
specified window for layers thus contributing to the easier
workflow, better organisation and visibility of the project
Figure 1. 2D game engine comparision itself.
C. Current similar games
The idea of the game is generally perceived as a so-
called platform way of playing where the user controls the
main character and the levels represent platforms which
contain various objects such as enemies, key to unlock the
“door” in order to pass to the next level and alike. The basic
approach to the 2D platform game is easily related with a
well-known game “Super Mario”. Also, the principles, the
interface and the access to other 2D games contributed to
the plan itself and the development of the game. On that list
are games such as Icy Tower, Flappy Bird and Angry Birds,
which have represented the “addictive era” of 2D games
with its simplicity and adjustable user interface. Figure 3. Different layers created in “Funky Student” game

III. PROCESS OF DEVELOPING THE 2D GAME C. Event sheet and events


Before the actual development of the game, during the Every layout has its event sheet in which all the steps
pre-production part, it was necessary to come up with the related to the addition of the events, addition of actions and
concept of the game itself and to design its components. other events as depicted in Figure 4. Events are the main
The game itself is conceived so that the main player is characteristics of the Construct 2 that facilitate game
located in the 2D platform where its goal is to collect three development. They eliminate the need for complicated
signatures in order to successfully finish the level and open scripting in programming languages with fixed syntax and
the door of the university to pass to the next level. The task overcoming obstacles when developing a game by careful
is made more challenging because of the different enemies studying the enormous quantity of content in help, tutorials,
which are located on various positions in levels. Moreover, and guides. To understand what is the best way to solve a
there are gems on the platforms which serve as guides certain problem, Construct 2 offers us the programming
through the level. The player has the power we can relate with the help of logical blocks of the system. In other
with the popular game “Super Mario” where he can destroy words, events are collective blocks. The basic concept of
the object of the enemy with his jump, or more precisely,
the fall. The game has three levels accompanied with
special sounds which accentuate particular action and with
the background music which gives the additional charm.

1648
events is that conditions filter the cases which fulfil the
state, and then the actions are done only for those cases.

Figure 6. Effects in Contruct 2 environment

F. Families
Figure 4. Example of event structure In Construct 2, families are groups of objects. All kinds
of objects in the family have to be from the same plug-in
D. Behaviours (for example all Sprite objects and not the combination
Behaviours give predefined functionality to object Sprite and Tiled Background objects). Families help us to
types. Construct 2 includes 26 behaviours, some of which avoid the repetition of events, as depicted in Figure 7.
are shown in Figure 5. One example of behaviour can be
“solid behaviour” which makes other behaviours react to
the object as if it were an impassable.

Figure 7. Example of using vs. not using the family principle

G. Plug-ins
Figure 5. Behaviours in Contruct 2 environment Plug-ins determine the type of objects. Construct 2
contains a specific window for the plugin list. Some of the
E. Effects plugins are shown in the Figure 8. For example, Sprite is
Effects change the visual appearance of the object. They one type of the objects while video, keyboard, and button
can be added in the Effects dialog box. Effects can be are completely different types of objects.
added to the layers and layouts, although the effects which There are three main kinds of plug-ins:
are blended to the background cannot be used in the layout. x Visual plug-ins (e.g. Sprite) occur in appearance
They are sometimes categorised as shaders or WebGL and they draw something on the screen.
shaders, only because that technology enables the x Hidden plug-ins (e.g. Array) are set on certain
appearance of those effects. Construct 2 has over 70 layouts, but are not drawn on the screen.
different effects which can be used in its library, and some
of them are shown in Figure 6.

1649
x Project plug-ins (e.g. mouse, audio) are added to J. Object types instances
the whole project and can be added only once. Object types instances allow to each object (e.g. enemy)
to save its own life value. In short, the variable is a value
that can be changed (or vary) and is stored separately for
each instance.
K. Main character
It is necessary to specify in advance what a certain
object will be used for. Since we talk about the main
character, it is necessary to specify in advance its
movements, namely rig animations, which prove to be
very helpful in animation of movements, assignment of
events and player action, as presented in Figure 10. It is a
drag and drop process of the set of animation pictures in
the Sprite object. In that manner, we create the initial
animation in which we need to specify collision on each of
imported pictures. There are five animations for the main
character: walk, stand, jump, fall and dead. In order to be
able to move through the platforms, it is necessary to
Figure 8. Plug-ins in Contruct 2 environment
assign “jump and run” style of movements to the player,
H. Objects which is done with behaviour Platform, that enables the
object to move left, right and the possibility to jump.
Object is the representation of certain idea. Mentally,
when you imagine a certain idea, it can be something like
a book or a ball. Although you know very well how a book
looks like, you also know there are many unique books.
Every instance of any object in Construct 2 assigns a
unique value known as UID (Unique ID) [1]. As a visual
representation of objects inside of the game, all the objects
(and one animation of each) are shown in Figure 9.

Figure 10. The main character animation

L. Enemies
By employing events, we can control movement of
enemies through the work space independently of the main
character or adjust their movements depending on main
character. The process of creating the enemy is equal to the
Figure 9. Objects of the “Funky Student” game
one creating the main character. Figure 11 shows events
I. Object types for simple automatic movement of the enemy that will
during the realisation of the Solid behaviour, in this case
One of the main elements of the game design in the wall, do the rotation for 180 or -180 degrees on the x
Construct 2 are object types. They define the class of some axis and keep moving.
object. For example, we have types of objects “Player” and
“Enemy” which come from the same (Sprite) plug-in.
They have different animation and will behave differently
with the help of events although they come from Sprite
object.

1650
sum of gems through levels. All stated global variables
inside the game are presented in Figure 14.

Figure 14. Global variables in “Funky Student” game


Figure 11. Events related to the movement of the enemy

M. Destruction of enemies O. HUD


It is common to all the enemies that in the case of The word HUD (head-up display) represents the insight
“TRUE” collision with the main character (player) they are into the player’s progress, things (s)he currently possesses
destroyed, as shown on an event tree in Figure 12. During (e.g. lives) and things (s)he collects (e.g. signatures and
the “FALSE” collision, one life is taken away from the gems) as shown in Figure 15. It is necessary to create a
player and the Flash behaviour is initiated which gives the special layer for HUD in order to fix and keep its position
object the possibility to flash in a way that it rapidly turns on every level. It is most commonly created from textual-
on and off the visibility of that object. Events for “FALSE” numerical object connected to some variable. In this
collision are shown in Figure 13. Finally, the sound record project, HUD is used so that the player can get insight in
is initiated which demonstrates the collision, or rather his/hers lives, gems and signatures.
“FALSE” collision with the enemy. In order to destroy the
enemy, the player must jump and fall on the enemy to do
the destruction of the enemy object.

Figure 12. Event representation of “true” collision of the player with the
Figure 15. The HUD display
enemy

P. Passing the level


The ultimate goal of the player is to finish the game,
which is achieved by passing from one level to another.
Each level is specific and has different structure of
Figure 13. Event representation of “false” collision of the player with
platforms and enemies. As presented in event sheet that is
the enemy depicted in Figure 16, the process of passing the level is as
follows: when the player collects three signatures, the
system will start the action of changing the animation on
N. Global variables the “university door” and the colour of the flag from red to
Global variables store their values between layouts. green which will result in visual simulation of the door
Events from any layout can access to any global variable, opening.
even if it was created on the other event sheet which is not
turned on.
In this project there are parts which follow each other
and change in time. Those are global variables related to
turning on and off the background music and special
effects, as well as the variables connected to relations,
namely the state of the game (e.g. win or lose) and
numerical variables which refer to lives of players and the

1651
2018. Since nearly any game can be published on that
service, it is ideal for small development teams who would
never have their game published by the traditional
publishers. It can be said that Steam lead to the increase of
Indie games which do not require big investments in the
development and teams of just several people are enough
for their making [6].
IV. CONCLUSION
Figure 16. Event sheet related to level passing The process of making a computer game is a complex
one. Depending on the type of the game, it is necessary to
Q. Main menu choose the right event hierarchy, namely the processes
The last phase in the game development is design of the which need to be followed and maximally optimised to
main menu. As shown in Figure 17, the main menu is here decrease the influence of bugs and unwanted actions.
to present the game home screen to the player and Drawing on old-school 2D games, objects (main character,
introduce him/her the basic controls. During any moment enemies, platforms, gems, signatures) have been created
of the gameplay, main menu can be reached by pressing whose actions (events) are added in the Construct 2
the escape (ESC) button or by clicking on the home button. environment. When the user successfully completes a
particular level, the university doors open. For this part of
the game, the reference is made with the action of exam
taking. Construct 2 introduces the game designer with the
making of user interface in interesting and dynamic
manner. Events govern the objects which are means the
game backbone is made from. The environment is
accessible and easy to use, with an interface which is
susceptible to various expansions/accessories from the
third party plug-ins as well as plug-ins programmed in
JavaScript. By importing prepared objects, one gets a
template of the game with three levels and user interface.
Figure 17. Game’s main menu In order to achieve that game looks good and photo-
realistic and at the same time to have realistic simulations,
R. Bussines plan, target group and game distribution one would usually need to invest a lot of time, effort, and
The first step is to identify and understand the target have expertise in in various fields and environments.
group. During the aforementioned, it is necessary to take Construct 2 enables anyone to create a game in easy and
into the consideration the following factors: geographical straightforward fashion. The aforementioned feature of
location, economic factors, and age of target players [4]. Construct 2 attracts the interest of many programmers,
The game “Funky Student” is aimed at younger users especially the younger generations who are just
(but not necessarily) and is based on the free to play discovering the world of programming. In that respect, the
method (F2P), where the game would basically be free, but Construct 2 environment would be an excellent
it would have monetization options. The price of the game representative in the world of interesting and instructive
and the price of additional features in the game should be ways of programming.
maximally optimised with the consumer boundaries of the
target group. A price which is too low or too high will REFERENCES
directly influence the monetization potential of the game. [1] Scirra Ltd, 2015 Manual, Construct 2 – (Online)
It is also necessary to investigate all the available options https://www.scirra.com/manual/1/manual.zip
of distribution platforms for the game. The most common [2] Steam, What is Steam? - (Online)
https://www.youtube.com/watch?v=QjWoSr_hZeY
way of distribution of the multimedia computer game is
[3] J. Feil and M. Scattergood, “Beginning Game Level Design”,
the digital one. Boston: Thomson Course Technology PT, 2005.
Digital distribution of not only accessories, but also the [4] J. Schell, “The Art of Game Design, Amsterdam”, Boston :
entire multimedia computer games has become the most Elsevier/Morgan Kaufmann Publishers, 2008.
common way of buying games. Online distributors usually [5] A. Šag, “Izrada računalne igre u programskom okruženju Construct
take around 30% of income, and if they take less, it usually 2“, Bachelor's thesis, Faculty of Informatics, Juraj Dobrila
means lesser penetration to the market. The choice of the University of Pula, 2018.
platform and the canal of distribution will play an [6] M. Gligora Marković, M. Antić and M. Rauker Koch, “Proces
razvoja multimedijske računalne igre”, Journal of the Polytechnic
important role in the overall incomes from the game. of Rijeka, vol. 1, no. 1, pp. 151-163, 2013.
Services such as Steam with impressive base of 35 million [7] J. O. Flaganan, Game Engine Analysis and Comparision –
active players has as much as 80% of digital distribution (Online) https://www.gamesparks.com/blog/game-engine-
of games on PC platform according to estimations for analysis-and-comparison/

1652

You might also like