Application of Client Server Network In Multiplayer Augmented Reality Games

London Journal of Research in Computer Science and Technology
Volume | Issue | Compilation
Authored by Andi Nur Rachman, M. Adi Khairul Anshary, Euis Nur Fitriani Dewi , NA
Classification: NA
Keywords: NA
Language: English

This research develops augmented reality games by applying multiplayer features. Some previous research on augmented reality games has suggestions for features similar to multiplayer. And the weaknesses of some previous studies also exist in augmented reality which still requires technology based tracking markers. The markers used must match the Markers available in the database game. For this reason, an augmented reality game needs to be made by adding multiplayer features and also applying markerless technology. This study succeeded in making a Multiplayer Action Game by utilizing Augmented Reality technology without using the luther silk method. Based on the tests that have been carried out, alpha test results that contain functional tests are obtained and the results of beta testing with a questionnaire obtained 74% value which is declared "Good" then this game is feasible to use and support.

               

Application of Client Server Network in Multiplayer Augmented Reality Games

Andi Nur Rachmanα, Euis Nur Fitriani Dewiσ &  M. Adi Khairul Ansharyρ

____________________________________________

ABSTRACT 

This research develops augmented reality games by applying multiplayer features. Some previous research on augmented reality games has suggestions for features similar to multiplayer. And the weaknesses of some previous studies also exist in augmented reality which still requires technology based tracking markers. The markers used must match the Markers available in the database game. For this reason, an augmented reality game needs to be made by adding multiplayer features and also applying markerless technology. This study succeeded in making a Multiplayer Action Game by utilizing Augmented Reality technology without sing the luther silk method. Based on the tests that have been carried out, alpha test results that contain functional tests are obtained and the results of beta testing with a questionnaire obtained 74% value which is declared "Good" then this game is feasible to use and support.

Keywords:  augmented reality, game action, markerless, multiplayer.

Author α σ ρ: Dept. Informatics Siliwangi University Tasikmalaya, Indonesia.

  1. INTRODUCTION

Action Games Are a type of game with the main features in the form of many actions where players must have fast reaction skills to avoid enemies or avoid obstacles [1]. Players usually control characters in the form of protagonists. Action games based on shootings, for example, give players a lot of weapons that can be improved, while other games based on a fantasy world will provide swords and magical powers. When the game starts, he must still pay attention to the health and life of his character. Characters can usually receive several attacks, but if they receive too many attacks the character will lose his life. If the character's life is lost, the game ends.

Client server network is a computer network architecture where the client requests data and a server that provides data responses to the request. The application of this network can support game development with the Real-time Multiplayer feature. Multiplayer is a type of game that can be played by more than one player in the same game arena and at the same time. In multiplayer games it allows each player to interact with other players, work together on the same team, become a rival, to be able to provide a form of social communication that is hardly found in games with a single-player orientation [2].

Augmented Reality (AR) is an environment that inserts 3D virtual objects into real environments [3]. There are several types of Augmented Reality, one of which is Markerless Based Tracking. In implementation because markers are not prepared beforehand, while algorithms running in AR applications must recognize patterns, colors or other features that can be displayed on the camera frame. After the pattern is read, virtual objects can appear on the smartphone screen [4]. Although using a virtual environment created by computer graphics, the main arena of Augmented Reality is the real environment. Therefore the projected object can be seen from various angles in the real environment.

After reading some of the literature on augmented realiaty, similarities were found in several literatures, where there were similar suggestions, namely on the suggestion to add multiplayer features to augmented reality games. And also this game will use Markerless Based Tracking instead of the Based Tracking Marker, so there is no need to use markers that must match the database in the game.

The limitations in this study are as follows:

  1. The game is only for Android devices.
  2. Type of game is an action game where each player controls a character.
  3. The player has a life on the character, if the life runs out then the game is finished.
  4. Game features are players against players.
  5. The maximum number of players in the game is 2 players.
  6. The markers used must have at least a pattern or color.
  7. To play the game a Google Play account is required.

The objectives of this study are as follows:

  1. Design and build an Action Multiplayer game by applying Augmented Reality technology.
  2. Applying Markerless Based Tracking technology to Augmented Reality.
  1. METHODOLOGY

The research method used in this study uses the following research:

C:\Users\Nazmi\Pictures\Untitled.png

Figure 1:  Research Methodology

2.1  Data Collecting

Data collection aims to collect data and materials that support and are used in the research and manufacture of this game. In the process of collecting data using two stages. The first step is to collect related literature data. Collect literature using literature studies and observations. Then the next data collection is the collection of material in the form of multimedia elements that will be used in making this game.

2.2  Analysis of Requirements

Analysis of requirements in making this application includes all the data needed for making an application, both input, and output needs.

2.3  System Development

The method used is Luther Sutopo's version, where there are six stages to making a multimedia product, namely: concept, design, collecting, assembly, testing and distribution materials. Sutopo adopted Luther's methodology with the scheme must begin with the concept and end with the distribution phase, while the collecting material can be done in parallel with the assembly stage [5].

  1. Concept, is the determination of the initial goal, the user's target, the type of product, the limitation of the function and the final target. In this concept stage the determination of goals and final targets influences the nuances of multimedia as a reflection of organizational identity.
  2. Design, is the stage of making specifications about product architecture, interface, design and supporting products. Specifications are made as detailed and detailed as possible because they will affect the next stage.
  3. Material Collecting, where the material or material needed for this game is collected such as text, images, audio and animation.
  4. Assembly. is the stage of installation of all elements of the game based on the design using the storyboard and navigation structure that has been made before.
  5. Testing, this stage is done after the manufacturing stage by running the game then seeing if there are errors or deficiencies in this game.
  6. Distribution, In this last stage, all stages have been completed in a structured manner according to the development method studied so the game is ready to be published through the Google Play Store.

2.4  Evaluation

The stages are carried out after all the process of making the application has been successfully carried out including the drawing of conclusions and the idea of development.

  1. RESULT AND DISCUSSION

3.1  Concept

The stages that will be developed and will be built based on existing ideas, to determine the title, objectives, users, types, basic rules and boundaries.

Table 1:  Concept Description

Titel

:

Tawuran Onlen – One on One AR

Theme

:

Action

Audience

:

General

Duration

:

Unlimited

Animation

:

3D Character (*.FBX)

Image

:

Picture, Button, Icon (*.JPG dan *.PNG)

User

:

2 User

Interaktivity

:

Button, Virtual Joystick

Description Game

:

This game features battles between 2 players. Each player uses each character, where each character has a life and weapon. If the weapon is about the player's character then the life will be reduced, and if the life runs out then the game is finished.

3.2  Design

This stage uses storyboards to describe events and storylines from the construction of products that are built. As well as the navigation structure as a navigation or direction of information, making it easy for users to use.

Table 2. Story Board

Scene 1

Display Login

Scene 2

Display Main Menu

Scene 3

Display Lobby

Scene 4

Display Game

C:\Users\Nazmi\Pictures\Use case new.png

Figure 2:  Use Case Diagram

Use case diagrams illustrate the sequence of activities carried out by actors, opponents and systems.

Figure 3:  Flowchart Markerless

3.3  Material Collecting

  1. 3D Animation Character

Using 3D animated characters available on the internet to be used as the main characters of each player and also as enemies in the game.

Figure 4:  3D Animation Character

  • Interaktivity Button

Collecting several images as an Interaktivity button between the player and the system, each button has different functions such as a button to exit, a button to enter the game and an action button. The following picture for the button that has been collected.

Figure 5:  Interaktivity Button

  1. Program Code Creation

The making of program code is made using the C # programming language, the process of writing program code is done on visual studio in this application also added code from the library of vuforia packages and asset programs from unity asset store.

3.4  Assembly

At this stage, the first thing to do in making this Multiplayer Action Game is to create a game scene. In its implementation, making this game uses Unity using C # language.

Figure 6:  Scene Login

Gambar 7:  Scene Main Menu

Gambar 6:  Display Lobby

Gambar 8: Scene Game

3.5  Testing

  1. Algorithm Connection

This algorithm is used to enter a Google Play account. If the player has entered, the game will start creating a lobby.

void Authenticate()

{

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()

.Build();

PlayGamesPlatform.InitializeInstance(config);

PlayGamesPlatform.DebugLogEnabled = true;

PlayGamesPlatform.Activate();

PlayGamesPlatform.Instance.Authenticate((bool success) =>

{

if (success)

{

Debug.Log("Berhasil");

CreateQuickGame();

}

else

{

Debug.Log("Tidak Berhasil");

}

});

}

  1. Algorithm Create Lobby

After the connection is successful, the player will enter the lobby. the maximum enemy is 1 and if the number has been reached then the game will start. The player will be placed at position (0,0,0). and the position data will be sent to another player.

void CreateQuickGame()

{

const int MinOpponents = 1, MaxOpponents = 1;

const int GameVariant = 0;

PlayGamesPlatform.Instance.RealTime.CreateQuickGame(MinOpponents, MaxOpponents,

GameVariant, this);

}

private bool isRoomSetup = false;

public void OnRoomSetupProgress(float percent)

{

if (percent >= 20f)

{

isRoomSetup = true;

Debug.Log("Mencari Permainan");

PlayGamesPlatform.Instance.RealTime.ShowWaitingRoomUI();

}

}

private bool connect = false;

public void OnRoomConnected(bool success)

{

if (success)

{

connect = true;

player = Instantiate(prefab, new Vector3(0, 0, 0), Quaternion.identity);

player.transform.parent = imagetarget.transform;

player.GetChild(2).gameObject.SetActive(false);

player.GetChild(7).gameObject.SetActive(false);

player.name = PlayGamesPlatform.Instance.RealTime.GetSelf().ParticipantId;

bool reliability = true;

string data = "Instantiate:0:1:2";

byte[] bytedata = System.Text.ASCIIEncoding.Default.GetBytes(data);

PlayGamesPlatform.Instance.RealTime.SendMessageToAll(reliability, bytedata);

}

else

{

connect = false;

CreateQuickGame();

}

}

  1. Algorithm Send Data Position and Rotation

Send position and data rotation to other players. And if the player dies, the lost data will be sent to another player.

string data = "Position:" + player.position.x + ":" + player.position.y + ":" + player.position.z;

byte[] bytedata = System.Text.ASCIIEncoding.Default.GetBytes(data);

PlayGamesPlatform.Instance.RealTime.SendMessageToAll(reliability, bytedata);

string datarot = "Rotation:" + player.eulerAngles.x + ":" + player.eulerAngles.y + ":" + player.eulerAngles.z;

byte[] bytedatarot = System.Text.ASCIIEncoding.Default.GetBytes(datarot);

PlayGamesPlatform.Instance.RealTime.SendMessageToAll(reliability, bytedatarot);

}

}

if (!player.gameObject.activeSelf)

{

menang.SetActive(false);

kalah.SetActive(true);

string lost = "Lost";

byte[] bytelost = System.Text.ASCIIEncoding.Default.GetBytes(lost);

PlayGamesPlatform.Instance.RealTime.SendMessageToAll(true, bytelost);

}

  1. Algorithm Receive Data

receive data position, rotation and lost from other players. If data lost is received, the winning panel will appear.

  1. DISTRIBUTION

At this stage the game has been completed in the form of .apk, the game then distributed through the Google Play Store.

public void OnRealTimeMessageReceived(bool isReliable, string senderId, byte[] data)

{

if (!PlayGamesPlatform.Instance.RealTime.GetSelf().ParticipantId.Equals(senderId))

{

string rawdata = System.Text.ASCIIEncoding.Default.GetString(data);

string[] sliced = rawdata.Split(new string[] { ":" }, System.StringSplitOptions.RemoveEmptyEntries);

if (sliced[0].Contains("Instantiate"))

{

Transform naming = Instantiate(prefab, new Vector3(0, 0, 0), Quaternion.identity);

naming.transform.parent = imagetarget.transform;

naming.name = senderId;

naming.GetChild(0).gameObject.SetActive(false);

naming.GetChild(1).gameObject.SetActive(false);

naming.GetChild(2).gameObject.SetActive(true);

naming.GetChild(7).gameObject.SetActive(true);

naming.GetChild(8).gameObject.SetActive(false);

}

else if (sliced[0].Contains("Position"))

{

Transform target = GameObject.Find(senderId).transform;

if (target == null)

{

return;

}

Vector3 newpos = new Vector3

(

System.Convert.ToSingle(sliced[1]),

System.Convert.ToSingle(sliced[2]),

System.Convert.ToSingle(sliced[3])

);

target.position = newpos;

GameObject.Find(senderId).GetComponent<Animator>().Play("Walk");

}

else if (sliced[0].Contains("Rotation"))

{

Transform target = GameObject.Find(senderId).transform;

if (target == null)

{

return;

}

target.transform.eulerAngles = new Vector3(

System.Convert.ToSingle(sliced[1]),

System.Convert.ToSingle(sliced[2]),

System.Convert.ToSingle(sliced[3])

);

}

Figure 9:  Distribution Game

  1. CONCLUSIONS

Based on the results of the research that has been done, conclusions can be taken as follows:

1. A Multiplayer Action Game has been built using Augmented Reality Technology in response to previous research suggestions.

2. Successfully implemented Markerless Based Tracking on Multiplayer Augmented Reality Games.

Based on the research that has been done, suggestions can be given as follows:

  1. Improved multiplayer system so the game can run more smoothly.
  2. Add restrictions on the number of players in the game.
  3. Improved markerless implementation so that operation during tracking for markers is more stable.
  4. Can be played on IOS devices.

REFERENCE

  1. George, Louis. 2017. “Rancang Bangun Aplikasi Game Augmented Reality Permainan Tradisional Sulawesi Utara Dodorobe”. Universitas Sam Ratulangi.
  2. Shobana, dkk., 2017. Augmented Reality Multiplayer Gaming. Loyola ICAM College of Engineering and Technology.
  3. Azuma, R., 2013., A survey of augmented reality. Presence: Teleoperators and Virtual Environments, 6(4), p.355-385.
  4. Lee, Youngo, Jongmyong choi. 2014. “Tideland Animal AR:Superimposing 3D Animal Models to user Defined Targets for Augmented Reality Game”, 5 Desember 2014.
  5. Sutopo, Ariesto Hadi. 2003. Multimedia Interaktif dengan Flash. Graha Ilmu. Yogyakarta.
  6. S. Ellen, “Slovin’s Formula Formula Sampling Techniques.”



author

For Authors

Author Membership provide access to scientific innovation, next generation tools, access to conferences/seminars
/symposiums/webinars, networking opportunities, and privileged benefits.
Authors may submit research manuscript or paper without being an existing member of LJP. Once a non-member author submits a research paper he/she becomes a part of "Provisional Author Membership".

Know more

institutes

For Institutions

Society flourish when two institutions come together." Organizations, research institutes, and universities can join LJP Subscription membership or privileged "Fellow Membership" membership facilitating researchers to publish their work with us, become peer reviewers and join us on Advisory Board.

Know more

subsribe

For Subscribers

Subscribe to distinguished STM (scientific, technical, and medical) publisher. Subscription membership is available for individuals universities and institutions (print & online). Subscribers can access journals from our libraries, published in different formats like Printed Hardcopy, Interactive PDFs, EPUBs, eBooks, indexable documents and the author managed dynamic live web page articles, LaTeX, PDFs etc.

Know more