How to Create a Multiplayer Game with Photon

1

Attached Files

The following files have been attached to this tutorial:

.capx

tap-battle-demo.capx

Download now 223.4 KB

Stats

3,694 visits, 5,061 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 21 Jun, 2018. Last updated 19 Feb, 2019

This tutorial explains how to create multiplayer games with Photon using game maker Construct 2. What is Photon? Namely a network platform for players to connect with other players in 1 network, precisely photon is the server.

Simply super short explanation, now just follow carefully below.

1. Right-click on the layout view and add a new name and name it, see the following picture.

2. In the Projects bar, add 1 other layout with the event sheet. See the following picture

3. In the first Layout, place Textbox and Sprite_btn_play in the middle position of the layout. See the following picture

4. In the first event sheet, add a global variable with the text type. See the following picture

5. In the second Layout, place Sprite_btn_tap outside the layout and arrange the text object. See the following picture

a. Text is placed parallel to the left right with text "YOU" and "ENEMY"

b. Text_Name1 and Text_Name2 are placed parallel to the left right under Text

c. Text_Score1 and Text_Score2 are placed parallel to the left right under Text_Name1 and Text_Name2

d. Text_status is placed in the middle of the layout

e. Sprite_btn_tap is placed outside the layout

6. In the second Event sheet, add 2 global variables with text type and 2 global variables with the number type and create the event according to the following picture.

.CAPX

tap-battle-demo.capx

Download now 223.4 KB
  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • First player connects to the room, but the second one doesnt

  • (on data has sending will add 1 to enemy score and display it) When "collision" is, then the score is -2 then how will it be (on event 1)? I am trying too many times.so please help me...i am beginner