DOKK Library

Game Development with Optical Illusion and Artificial Intelligence

Authors Dr. K. Deepa Tilak Ma’am Snehal Waykole

License CC-BY

Plaintext
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                      594



     Game Development with Optical Illusion and
               Artificial Intelligence
                                 Snehal Waykole, Dr. K. Deepa Tilak Ma’am

                                   Department of Computer Science and Engineering
             SRM Institute of Science and Technology, Kattankulathur, Tamil Nadu, India- 603203
                                     sn8131@srmist.edu.in, deepathk@srmist.edu.in,
                                                DOI: 10.29322/IJSRP.11.07.2021.p11578
                                          http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578

  Abstract - Gaming industry is arguably one of the most important and innovative sectors in tech today. Its importance
  to culture, social networking and entertainment cannot be understated. The term entertainment industry is no longer
  reserved for Hollywood ad the movie industry because gaming in now providing one of the most immersive and awe-
  inspiring forms of entertainment to more than two billion people around the globe. Most of the games practice the
  theme of war and other puzzle games are based on simple tasks but bringing the concept of optical illusion in games
  is still new. This game is inspired by the concept of Penrose triangle and Escher’s paintings. The Levels use Breadth
  first search algorithm for pathfinding.
  Index terms- Game development, Penrose triangle, Optical Illusion, Breadth first search algorithm.


                                                          I. INTRODUCTION

Gaming Industry has seen a significant increase in revenue and demand in past few years. Demand for new games, new
concepts has increased and every single day there is a new game that is released either on play store or web for
installation. There are millions of games involving war concepts, cooking shows, sports, and action but just a few that
stand out from the list. Monument valley, Manifold gardens and Limbo are few of them. The aesthetic design of
Monument valley, Monochrome concept of Limbo gave the players a different experience of emotions. Players are fond
of theses games and unique concepts. This paper shows the involvement of optical illusion in the level design of a
game. Here, the orthographic view of camera tricks the player into thinking that the architecture is on 2 floors but just
one bridge can make it seem like its just one floor with different access. The player is controlled using breadth first
search algorithm used for pathfinding and this is developed in Unity platform.

                                                        II. RELATED WORK

 In the paper [1], the authors are depicting their approach toward a new game development life cycle which is different
from a Software development lifecycle. It presents a new Game development Life Cycle with guidelines to successfully
deliver a good quality game. A few of the GDLCs are picked and compare with the developed GDLC by the authors.
This GDLC involves six steps being Initiation -> Pre-Production -> Production -> Testing -> Beta -> Release.
Following these six steps will allow a developer to create a proper game without facing difficulties in debugging the
errors and queries later. So in conclusion, Its stated tht a software cycle do not consider engineering and arts as
combined element, hence a game development lifecycle neds to be different than that of software development life
cycle.
In the paper [2], authors study about the Unity Game development engine and give a survey on the usage and benefits
of it for game development. It can be used for virtual reality, augmented reality, two-dimensional and three-dimensional
games along with simulations along with other purposes. This paper focuses on the benefits of unity engine, the
problems that can be faced while using the engine and the best approaches to enhance the skills of game developers.




 This publication is licensed under Creative Commons Attribution CC BY.                                     www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                         595
In paper [3], authors have implemented two programs – and intelligent camera system and pathfinding in 3D
application. Traditionally, AI was always left till the last stage in a game’s development cycle as most programmers
know that it is almost impossible to develop game AI until one knows how the game is going to be played. As the use of
AI in games matures, more time and energy were spent on developing AI system. This project involves the study of
existing use of AI in games, the concepts behind them and how they are applied into games.
In paper [4], the authors implement Breadth first search for finding the shortest path in cartesian area. This paper
attempts to show some of the path solutions from the initial location to the destination location, using the Breadth First
Search algorithm. The given solution can consist of many solutions with the path meet the criteria of the problem
already mentioned, Research conducted by previous research Yan ZHOU, this research not only provides the shortest
path solution but also provides another form of optimal search if there are obstacles that block the process of the path
being traversed.

In the paper [5], the authors create a game applying the rules of optical illusion in the design. It shows that the impact of
optical illusion on the gaming experience is to bring a sense of novelty. Adding an operationally or visually brand-new
content to 3D game arouse the interest of players in game and produces a good gaming experience. The game Alice in
Wonderland has different types of illusion in each level design and shows the variance of optical illusions that can
arouse the interest of players in the game and can produce a good gaming experience. Application of Spatial Optical
illusion in the first level, Mirror optical illusion in second and Bounded and unbounded concept in third level makes it
an interesting game.
In the paper [6], the authors depict the importance of online games for therapeutic purposes. Offline games have always
been a part of therapies, but online video games are still under-researched. Research into online video game therapy for
mental health concerns might focus on two broad types of game: simple society games, which are accessible and
enjoyable to players of all ages, and online worlds, which offer a unique opportunity for narrative content and
immersive remote interaction with therapists and fellow patients. Both genres might be used for assessment and training
purposes and provide an unlimited platform for social interaction. The mental health community can benefit from more
collaborative efforts between therapists and engineers, making such innovations a reality.
In the paper [7], the author has written about the research done on Penrose triangle and similar figures that follow the
rules of optical illusion. Exploration and illustration of the paper revolves around example that are drawn from a family
of figures of Penrose Triangle. Huffman's account of the Penrose triangle was used to show that not every adequate
mechanism is psychologically plausible or can be used to predict a class of perceptually similar figures.
In the paper [8], the author presents the design and implementation of the game called cognitive arenas. It is a very
common game and was developed keeping the Mac OS X and Windows Operating System. The aim behind the project
was to promote education via innovation. The students playing the game can learn their given material in one of the
modules and answer the questions asked in the game where simultaneously he play the shooter game. The player can
move to three levels of scenes depicted in Unity3D Game Engine to play the game interestingly.
In the paper [9], the authors introduce a system called Lume for procedural narrative generation that combines the best
of two approaches that is a large emergent possibility space with less focus on narrative structure, or toward greater
structure with smaller possibility space. These two approaches are combined through a novel combinatorial scene
architecture in which stroylet scenes are comprised of parametrized node-trees. This system still exists in a prototype
phase. This system is currently being used to develop a full-scale narrative game.
In the paper [10], authors review the Turing’s Test and some of its key criticism. They try to prove that Turing’s test
can be applied in game development process. The human conference in 2003 competition scored in the range undecided
to probably human which may itself prove that something about how the Turing’s test limits human ability t recognize
intelligence when we do encounter it.




 This publication is licensed under Creative Commons Attribution CC BY.                                        www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 S.NO.       TITLE                         AUTHOR                YEAR              ADVANTAGES
International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
ISSN 2250-3153                                                                                                               596
 1           Game Development              Rido Ramadan,         2013              This paper brings to light the importance
             Lifecycle                     Yani Widyani                            of having a different game development
             Guidelines(GDLC)                                                      cycle that the software development cycle.
                                                                                   The author tries to show the importance of
                                                                                   game development cycle while creating a
                                                                                   game and also compare different cycles
                                                                                   used in recent times.


 2           Unity Game            Afzal Hussain,     2020                         This paper describes the Unity game
             Development Engine: A Haad Shakeel ,                                  engine and its functions which made it the
             Technical Survey      Faizan Hussain,                                 most used engine to create games easily. It
                                   Nasir Uddin , and                               combines the design and programming
                                   Turab Latif Ghouri                              fields and gives the user one place to work
                                                                                   on all the needed components.


 3           Game ai: artificial           Yee Chia Hui,         2004              They have emphasised on use of AI for
             intelligence for 3d path      Edmond C.                               Game development. Not only can AI
             finding                       Prakash and                             cleverly control characters in game, but it
                                           Narendra S.                             can also be used in implementing an
                                           Chaudhari                               intelligent camera system that can handle
                                                                                   a diverse and dynamic three-dimensional
                                                                                   environment.

 4           Breadth First Search       Robbi Rahim,      2018                     In this paper, BFS is used to find the
             Approach for Shortest      Dahlan Abdullah ,                          shortest path in cartesian area. In BFS
             Path Solution in Cartesian Saiful Nurarif ,                           every node is checked before moving
             Area                       Mukhlis                                    forward. This creates and advantage of
                                        Ramadhan , Badrul                          finding the best path in limited time. This
                                        Anwar ,                                    also gives us multiple routes of same
                                        Muhammad                                   distance and same time, so any one can be
                                        Dahria ,                                   chosen as the correct path.



 5           Research on the         Yingfang Zhang,             2017              This paper briefly introduces the principle
             Application of Optical  Shiyun Li                                     of visual illusion and analyzes the classic
             Illusion in Game Design                                               works of visual illusion. The impact of the
                                                                                   optical illusion on the gaming experience
                                                                                   is to bring players with a sense of novelty.
                                                                                   Adding an operationally or visually brand-
                                                                                   new content to 3D game arouse the
                                                                                   interest of players in game and produces a
                                                                                   good gaming experience.




This publication is licensed under Creative Commons Attribution CC BY.                                              www.ijsrp.org
http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
ISSN 2250-3153                                                                                                               597
 6           Online video game         Nathan wilkinson, 2008                      This paper is a research on how video
             therapy for mental health rebecca p. Ang &                            games and the internet can now be
             concerns                  dion h. Goh                                 combined in therapeutic interventions.
                                                                                   Mental Health is not a part of game
                                                                                   developers plan, but when the game is
                                                                                   launched in society, its affects and actions
                                                                                   can be therapeutic or violent in each
                                                                                   player.


 7           The penrose triangle and Stephen W Drape 1978                         This paper has explained types of Penrose
             a family of related figures                                           triangle and the logic behind each design.
                                                                                   He also explains the Escher's paintings
                                                                                   which led to the discovery of Penrose
                                                                                   triangle like optical illusion and supports
                                                                                   the game design for my project as well.




 7           3d game development     Pa.Megha,                   2018              The aim of the paper is to promote
             using unity game engine L.Nachammai                                   education via innovative platforms. The
                                     ,T.M.Senthil                                  functions supported by Unity game engine
                                     Ganesan                                       are autonomously very abundant. All
                                                                                   game development are possible such as,
                                                                                   shader, physics engine, visual studio
                                                                                   compatibility for programming, runtime
                                                                                   functions, audio ,video and animation.




 9.          Lume: A System for            Stacey Mason,    2019                   Having a story behind the game attracts
             Procedural Story              Ceri Stagg, Noah                        players and increases interest towards the
             Generation                    Wardrip-Fruin                           game.




 10.         Turing's test and             Daniel Livingstone 2006                 If the objective is proved gaming can
             Believable Games                                                      become an extremely real experience as
                                                                                   difference between computer and real
                                                                                   player will be minimal.




This publication is licensed under Creative Commons Attribution CC BY.                                              www.ijsrp.org
http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                      598

                                                     III. PROPOSED MODEL
In this paper, we propose a model to predict the outcomes of football matches. We train the final data-set on various
machine learning classifiers. We compare the performances of each classifier and choose the one that returns the best
result. Then, we optimize the classifier using Hyperparameter tuning that yields the best result to further enhance the
model accuracy in making predictions. Our final result is labeled as Full-Time Match Result (FTR). This label will
indicate a Home team win (H), an Away team win (A), or a Draw (D).
In this paper, I have implemented the rules of optical illusion to design the two architectures. I am using breadth first
search for pathfinding for the character and implementing the code on Unity 3D engine. This paper focuses on showing
that optical illusion can be a part of game development and can bring a change in the storyline concepts of games. Here
an adjacency list is used to save the nodes and since the distance between every node is unit distance, BFS is the best
choice for path finding.




                                                     Architecture Diagram




Our project is divided into 2 modules:
    ➢    Module 1: Game Design

                        ➢    Setting up Game View

                        ➢    Building Platforms

                        ➢    Creating Camera Stacks

    ➢    Module 2: Game programming

                        ➢    Adding Graphs, Nodes and Edges

                        ➢    Pathfinding Algorithm

                        ➢    Controlling Player

                        ➢    Completing Game Manager




 This publication is licensed under Creative Commons Attribution CC BY.                                     www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                     599




Module 1: Game Design

1.1) Setting Up The Game View

This level is for Android and will need a game view which is comfortable on phone. The common aspect used for
developing games for phone screen size, it is set at 9:16 ratio. The lights need to be inserted at every angle for
perspective clearance and game visibility.




1.2) Building Up the Game Platform

In this the architecture is brough together. Since there are platforms here which will be dynamic during the game, every
platform is set on different layers. The bridge will have movement at 90 degrees. Other three platforms are vertical
platform, horizontal platform, and the stairs platform.




 This publication is licensed under Creative Commons Attribution CC BY.                                    www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                    600




1.3) Creating Camera Stacks

In the Universal Render Pipeline (URP), you use Camera Stacking to layer the output of multiple Cameras and create a
single combined output. So here the base camera is the main camera set on background. Other two cameras are the layer
camera and player camera set on architecture and player, respectively. The Layer and Player camera are in overlay
mode on the base camera. Overlay enables the camera to ignore the background and focus on the layer it is selected for.
Camera stack overrides the output of the base camera with the combined output of all the cameras in camera stack.
Universal Render pipeline performs several optimisations within camera including rendering order optimization to
reduce overdraw. But Camera stack effectively defines the order in which the camera rendered.




 This publication is licensed under Creative Commons Attribution CC BY.                                   www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                       601




Module 2: Game Programming

2.1) Adding Graphs, Nodes and Edges

A waypoint, or node, forms one unit of the path. It describes a three-dimensional location. The helper Edge class allows
a node to connect to its neighbouring nodes. You can toggle each edge on and off, which will be useful later. The node
Script attached to the layer creates nodes on every box. Here the Gizmo helps in drawing and describing the look of the
nodes when they are at rest or active and clicked. The end node and the start node is also defined with different colours.




 This publication is licensed under Creative Commons Attribution CC BY.                                      www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                       602

2.2) Pathfinding Algorithm

Breadth First Search is used for pathfinding algorithm here. Every node is connected to adjacent nodes in the inspector
tab and a path is created. Once the player clicks on destination point, in the Scene view, the path is created with yellow
line and the blue node show the appropriate path. In the algorithm, the graph is unweighted and bidirectional and an
adjacency list is used to save the node for creating the unordered list which is used to create a finite graph.




2.3) Controlling Player

Once the path is setup, the agent needs to follow the path suggested through BFS, for this animation is added. Two C#
scripts are added which include the controller and animator. Controller commands the player according to the actions
clicked by the player. Animator contains a small code giving command of walking back and forth when clicked at one
point.




 This publication is licensed under Creative Commons Attribution CC BY.                                      www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                    603




2.4) Game Manager

Once the pathfinding algorithm is implemented and all the functions are running with no error, Game manager is set up.
Here the Screen Fader is activated. When the game starts it need a good introduction, so the white fader is added so
when the level starts, the white screen fades away revealing the architecture and player. In the end the player gets an
option of restart or the player can just exit the game. These functions are all controlled by the game manager.




 This publication is licensed under Creative Commons Attribution CC BY.                                   www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
 International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
 ISSN 2250-3153                                                                                                         604




                                               IV. CONCLUSION AND FUTURE WORK

The level design in inspired by Escher’s paintings and these are just two basic models to explain the involvement of
optical illusion in the architecture and implementation of BFS for pathfinding. Not being a grid based game other
pathfinding algorithms like A* algorithm cannot be implemented for pathfinding. In the future I would like to extend
the levels and create a game out of this concept. It can help in survey of effects it has on mental health as the aesthetics
of this game will be peaceful and the colour range can lead to emotional changes. The impossible geometry and the
aesthetic feel of the game can increase the demand and can bring in players who like to explore new worlds.




 This publication is licensed under Creative Commons Attribution CC BY.                                        www.ijsrp.org
 http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578
International Journal of Scientific and Research Publications, Volume 11, Issue 7, July 2021
ISSN 2250-3153                                                                                                   605




                                                          REFERENCES


[1] Ramadan, R., & Widyani, Y. (2013, September). “Game development life cycle Guidelines". In 2013
International Conference on Advanced Computer Science and Information Systems (ICACSIS)

[2] Afzal Hussain, Haad Shakeel , Faizan Hussain , Nasir Uddin , and Turab Latif Ghouri.“Unity Game
Development Engine: A Technical Survey”.In University of Sindh Journal of Information and Communication
Technology (USJICT)

[3] Y. C. Hui, E. C. Prakash and N. S. Chaudhari, "Game AI: artificial intelligence for 3D path finding," 2004 IEEE
Region 10 Conference TENCON 2004., Chiang Mai, Thailand, 2004, pp. 306-309 Vol. 2, doi:
10.1109/TENCON.2004.1414592.

[4] Robbi Rahim, Dahlan Abdullah , Saiful Nurarif , Mukhlis Ramadhan , Badrul Anwar , Muhammad Dahria ,
Surya Darma Nasution, Tengku Mohd Diansyah, Mufida Khairani."Breadth First Search Approach for Shortest Path
Solution in Cartesian Area”.Journal of Physics: Conference Series, Volume 1019, 1st International Conference on
Green and Sustainable Computing (ICoGeS) 2017 25–27 November 2017, Kuching, Sarawak, Malaysia

[5] Zhang, Y., & Li, S. (2017, September). Research on the Application of Optical Illusion in Game Design.
Retrieved from 2017 5th International Conference on Mechatronics, Materials, Chemistry and Computer
Engineering (ICMMCCE 2017)

[6] Wilkinson, N., Ang, R. P., & Goh, D. H. (2008). Online Video Game Therapy for Mental Health Concerns.
International Journal of Social Psychiatry, 54(4), 370–382.

[7] Draper, Stephen W. “The Penrose Triangle and a Family of Related Figures.” Perception, vol. 7, no. 3, June
1978, pp. 283–296, doi:10.1068/p070283.

[8] Stacey Mason, Ceri Stagg, and Noah Wardrip-Fruin. 2019. Lume: a system for procedural story generation.
Proceedings of the 14th International Conference on the Foundations of Digital Games. Association for Computing
Machinery, New York, NY, USA, Article 15, 1–9. DOI:https://doi.org/10.1145/3337722.3337759

[9] Daniel Livingstone. 2006. Turing's test and believable AI in games. Computer Entertain. 4, 1 (January 2006), 6–
es. DOI:https://doi.org/10.1145/1111293.1111303




This publication is licensed under Creative Commons Attribution CC BY.                                  www.ijsrp.org
http://dx.doi.org/10.29322/IJSRP.11.07.2021.p11578