Search Unity

Third Party Photon Bootcamp Multiplayer Demo

Discussion in 'Multiplayer' started by tobiass, Apr 13, 2012.

  1. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Photon Bootcamp Demo


    Overview
    Exit Games and Kingsmound turned Unity's famous Bootcamp Demo into a blueprint for multiplayer shooters.
    The complete project is available for free in the Asset Store.

    Features
    • Create and join rooms
    • Synchronization for position and animation
    • Firing and hits
    • Compatible with Photon Cloud Service
      A fully hosted and loadbalanced service for realtime multiplayer games. No server setup, no maintenance by you. Just register and you have a running server available to you and your customers. Worldwide.
    • Compatible with Photon Server SDK
      As alternative you can also host Photon on your own machines. The Photon Server SDK is a realtime multiplayer framework that implements game logic in C#. It's fully customizable, flexible and providing triple-A performance.
    • Based on Photon Client SDK for Unity
      This demo is based on the "plain" Photon SDK (download here) for Unity, a customizable API and base framework to develop multiplayer games. If you like a more hands on approach and seek an alternative to Photon Unity Networking.

    Images


     
    Last edited: May 4, 2012
  2. bertelmonster2k

    bertelmonster2k

    Joined:
    Apr 3, 2009
    Posts:
    78
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,261
    Nice one, thanks!
     
  4. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    I'm a french so i speack a little english. I have a problem for install the photon bootcamp demo. Can you help me ?
     
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    bobo: I'm sorry. My French is most likely worse than your English. So, you should follow the included readme. It's brief but should be easy to follow.
     
  6. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    My problem is after install bootcamp demo multiplayer i clik on play. but the game says "missing apID" and i have 3 solutions open "dashboard" "select settings object" and "stop".
    Please help me, you can speack english because i use google traduction.
    thanks
     
  7. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    sorry i forget photo. I take a capture.
    $Capture.PNG
     
  8. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    I read the "README" but i understand because I use google traduction but i have many problems.
     
  9. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    When you use PhotonCloud, you get an application id (AppID), which is a string to paste into your game client. This way, your client and players are kept separate from other games.

    You need to login to the website and copy the AppID:
    Visit: https://cloud.exitgames.com/Dashboard
    Running the game in the Unity Editor, in that error screen, press "Select SettingsObject" and find the AppID variable to paste your ID.
     
  10. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    Thanks, i test that after.
     
  11. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    ok i test. but when i press "Selct Settings Object" it nothing happens. Help me !
    but i have a questons, until install "bootcamp demo unity pultiplayer", i do install photon cloud server ?
     
  12. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    thank i play the game !!
    you are very nice.
    thank
     
  13. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
  14. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    thank you very much, but I have two problems.
    1 - players take too long to die.
    must take 30 balls for him to die.
     
    Last edited: May 3, 2012
  15. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    I would remove it
    $Capture.PNG
     
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    bobo159951: Do as you please. From a Demo standpoint, that output and the amount of hitpoints are fine for us.
    You could also note it has only one level ;)

    By the way: we updated the demo but the change is very minor. We only worked on the in-game menu to make a return to lobby possible. Again: This is not extremely beautiful and more a demo.
     
  17. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    thank you, but actually I do not know how to change hitpoints. Can you explain to me how it's done?
    And also I would like to remove the bar circled in red, how can I do?
    thank you in advance, I hope not to annoy you!
     
  18. skeletarik

    skeletarik

    Joined:
    May 7, 2012
    Posts:
    2
    Please, help me! I ran Photon Server on my computer and filled in "Custom Server Address" my ip. And pressed the button "Play". But it wrote me, that AppId field is empty. I don't want to run this demo with Photon Cloud. I want to run it with Photon Server. What should I do if I want to run it without Photon Cloud, but with Photon Server? Answer, please.
     
  19. bobo159951

    bobo159951

    Joined:
    Apr 24, 2012
    Posts:
    12
    I'm French so it is for this reason that I talk funny. I had the same problem, you must include on the address https://cloud.exitgames.com/Dashboard
    registered after Thee, connects you. You copy / paste your app id.
    You start your game, after you click on "sellect setting object" and you rendtre in variable appId your appId.
    Maybe you do not understand me.
     
  20. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    skeletarik: When the "UsePhoton" object's Custom Server Address is missing the "port" part of the address, the message you see appears.
    The address has to be entered in form of IP:port (e.g. 127.0.0.1:5055).
    If you enter the IP 127.0.0.1, the server must be running on the same machine that also runs your client, so there is a warning about this fact. Don't be surprised if you see that message popping up ;)
     
  21. skeletarik

    skeletarik

    Joined:
    May 7, 2012
    Posts:
    2
    Thank you) I'm sorry, but I forgot to write, that I solved this problem a few hours later :) My error was not only in port, in deploy/LoadBalancing/Game Server1 and Game Server 2 I changed ip-address from 127.0.0.1 to my ip. It was a bit difficult to find that, and I would be grateful if you wrote in readme that this two files must be changed :) In order that other people will be able to start to work with Photon Server at once :) Sorry, my English isn't very good because I'm from Russia)
     
  22. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Good to know you found it. We will update the documentation soon.
     
  23. aniruddh1998

    aniruddh1998

    Joined:
    May 7, 2012
    Posts:
    2
    Can anyone please upload the photon bootcamp demo? please? My unity 3.5.1f2 crashes whenever I try to download it through the asset store.. :( :( :( . If anyone would upload it, it would be very nice of him/her.. Please can anybody post it to media fire or something else?
     
  24. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Did you report a crash bug to Unity?
    You could also try to delete the download before re-downloading it again.
    Sorry, we don't have it online anywhere else yet.
     
  25. aniruddh1998

    aniruddh1998

    Joined:
    May 7, 2012
    Posts:
    2
    I reported.. But I didn't get any reply... :( :( . Can anybody please upload it to the server?... I have a server which uploads at a superfast speed... If you can upload it then it would be very nice.. You can upload it here... What is the size of the game?
     
  26. gharaibeh

    gharaibeh

    Joined:
    Apr 26, 2011
    Posts:
    115

    i put 127.0.0.1:5055 but i got a status when i entered the room name and hit create :
    [DebugReturn] GameInstance state is: Disconnected
     
  27. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    aniruddh1998:
    You should delete the files downloaded by the Asset Store. Then re-download and import into a new, empty project.

    gharaibeh:
    You have to run the server on the same machine that will be running the demo. The guide is now updated:
    http://doc.exitgames.com/photon-server/PhotonIn5Min/#cat-First Steps
    Run "LoadBalancing (MyCloud)" instead of the "Default" instance!

    Clients from other machines will not be able to connect just yet. 127.0.0.1:5055 works only for the same machine (called: loopback ip). PhotonControl has a menu item "LoadBalancing IP Config". This finds your server machine's IP and can set it up for the LoadBalancing server logic.
    http://doc.exitgames.com/photon-server/PhotonControlApplication/#lbpca
     
  28. Intrawebs

    Intrawebs

    Joined:
    Mar 24, 2011
    Posts:
    45
    I've been researching the best package for our FPS. We are looking at UDK(3/4), CryEngine and Unity. We dont need the super high end graphics so therefore Unity3D is a potential choice due to saving 25% in fees for UDK or CryEngine. However, those two engines are built for FPS, Unity is not. Then I saw this asset you created. So I have some questions....

    1. Pricing - ideally once a customer has purchased our game they can host their own games for other clients to connect to using the Photon Server SDK (not cloud), is that correct? Is it safe to assume if our games max at 16 total players per server then its 100% free?

    2. With #1 above in mind, how does server/host discovery work for the client (lobby using your cloud services?) and whats the pricing model for that (is it your pricing page and based on CCU in the master lobby and once a connection is made to the host game they are no longer a CCU in the lobby?).

    3. Withing your kit in the original post does it address the FPS issues that this kit does such as interlpolation, lag compensation, predictions, hit boxes etc that a standard FPS has and that UDK/CryEngine have built in?

    In summary, I need to assess if its wise to do a AAA FPS with Unity (Mac/PC/Consoles) and where the tradeoffs are regarding what one gets out of the box from a AAA engine....its the 25% over the lifetime of a product in fees vs. a Unity3D license and stuff from the asset store.

    EDIT: for #1 above the host would be an "authoritative" server, a little curious how physics works as well in that regard but more importantly the impacts on feasibility with Photon and Unity to do that.
     
    Last edited: Sep 18, 2012
  29. ThePhotons

    ThePhotons

    Joined:
    Aug 30, 2012
    Posts:
    8
    Intrawebs: We have a couple of FPSs using Photon:

    - Offensive Combat: http://u4iagames.com/ (AAA team)
    - CMUNE Überstrike: http://uberstrike.cmune.com/
    - beGone: http://www.nplay.com/BeGone/
    - (Mobile) Critical Strike: https://play.google.com/store/apps/details?id=com.StudioOnMars.CSPortable

    #1 right now our license does not allow redistribution of Photon executable. But we will allow this for the 20CCU version: so yes.
    #2 you need to write this discovery - we have no turn key solution for this yet
    #3 yes, you need to implement this on your own

    Feel free to touch base directly via developer@exitgames.com

    Chris
     
  30. Xplodin

    Xplodin

    Joined:
    Aug 30, 2012
    Posts:
    1
    Sorry if this is old but, my friend cannot see my created room, and I cannot see his, I have the appid set for cloud and it had no errors.
    Any Ideas?
    P.S. I downloaded from the asset store.
     
  31. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    In simplest case, you have a whitespace in your appId. Please copy and paste again and make sure there's no " ".
    We only noticed recently that this is a source for issues and will trim the entry with upcoming releases.
     
  32. detonator

    detonator

    Joined:
    Jul 15, 2012
    Posts:
    17
    Same problem. No whitespaces.
     
    Last edited: Nov 15, 2012
  33. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
  34. detonator

    detonator

    Joined:
    Jul 15, 2012
    Posts:
    17
    How i can know PUN version? I use web player on local machine, without enter PUN version. Room not visible. I use web player on kongregate without enter PUN version. Room not visible. Game version field is it mean?
     
  35. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    You get the PUN version from: PhotonNetwork.versionPUN.
    GameVersion is the value you pass into ConnectUsingSettings().
     
  36. detonator

    detonator

    Joined:
    Jul 15, 2012
    Posts:
    17
    I am new in networking and photon unity networking. For get PUN version, in project boot camp multiplayer demo, i create new script, and add it to empty GameObject in the scene. In function Start i add code: print(PhotonNetwork.versionPUN); I have error Assets/NewBehaviourScript.cs(8,15): error CS0103: The name `PhotonNetwork' does not exist in the current context
    Where i can find PUN scripting reference?
     
  37. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Don't worry, I am doing this too long already ;)
    Cause: I didn't think about it enough. The Photon Bootcamp Demo does not use PUN at all. It uses our plain LoadBalancing API.

    When you don't use PUN, leave the blank the PUN version ("") in the monitor client to spy on created rooms:
    https://dl.dropbox.com/u/4295285/cloud-monitoring-client/index.html
     
  38. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Remember to remove the (s) off the https:// when ya put a link in from Dropbox or something. It doesn't load automatically, it acts like I have no webplayer installed.
     
  39. detonator

    detonator

    Joined:
    Jul 15, 2012
    Posts:
    17
    All work fine right now:) A see created rooms. But maximum players in the room is two. How i can fix this?
     
    Last edited: Nov 21, 2012
  40. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    JamesArndt: Odd. When I use the https link, it loads for me. Maybe it's a security thing and I added an exception for dropbox that accepts their signature. Not sure. Good you point it out though!

    detonator: Where the room is created, you pass in the number of players allowed. I have no clue why we thought 2 is a good number here. I think it's OpCreateRoom (I often confuse it with PUN's CreateRoom method, which is named this way to resemble Unity's Networking methods more closely).
     
  41. cobaltBlue

    cobaltBlue

    Joined:
    Oct 25, 2011
    Posts:
    39
    Hi I'm planning to implement multiplayer into a racing game, currently comparing the two implementations of exitgame's unity sdk and "PUN", PUN looks slightly easier to code but I this is my first time implementing a real time game (with physics) using photon if anyone has any good advice based on prior experience please do share.. (I'm using UnityCar for the vehicle's physics)..
     
  42. detonator

    detonator

    Joined:
    Jul 15, 2012
    Posts:
    17
    In the Unity editor, i joined to room. In scene window, I try to manipulate another player gameobject. After that, player is disconected. But model of the player, is staying at the game. That room is closed. When i create new room, model of the manipulated player appear in the room. I try to restart browser, delete cache, and make new bild. Some information of disconected player stores on sever. How i can delete it?
     
  43. incenseman

    incenseman

    Joined:
    Nov 20, 2012
    Posts:
    90
    bobo159951 asked a question about removing this box from the game screen and I have looked for an answer that was given and cannot find it.

    I also would like to get rid of this box.




    Also even if I have the "Development Build" unchecked in the build settings the Development Build" still shows in the lower right hand side of the screen in the game.

    How do I get of that.

    "Development Build" is unchecked in the build settings.

    Is it only able to build for 30 days without the "Development Build" showing and then you have to pay $1,500 US to get rid of it?

    If that is the case then I will just have to suffer with it.

    $1,500 US is way to much money for unity.

    I have used other game engines that perform as well and they were open source and free.

    The only thing that Unity does that the others don't do is making the games playable through a browser.

    Like I said if that is the case I will just have to suffer with it.

    I would still like to get rid of the server info box ingame though.

    Also when I run the game through webplayer and switch weapons I get the following error:
    "NullReferenceExceptionObject reference not set to an instance of an object".

    However the weapons work just fine.

    How can I stop that error from coming up in the game.
     
    Last edited: Dec 19, 2012
  44. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    I can't give much help about modifying the box away right now (sorry, busy, trying to reply anyways). But you can look up the GUI code for it in the scripts. Look up "rountriptime in". This should be text that shows up. Comment out the code that shows this.

    About the nullreference: Please copy&paste the full error including the filename and line number...
     
  45. incenseman

    incenseman

    Joined:
    Nov 20, 2012
    Posts:
    90
    The error that I posted for "nullreference" in quotes in the post before this one is the exact and full error.

    Here it is again: "NullReferenceExceptionObject reference not set to an instance of an object"

    The error occurs in game not in the editor.
     
  46. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    I only get this error when start the game in editor:

    NullReferenceException: Object reference not set to an instance of an object
    ReflectionFx.OnDisable () (at Assets/Scripts/Fx/ReflectionFx.cs:44)
    UnityEngine.Behaviour:set_enabled(Boolean)
    ReflectionFx:Start() (at Assets/Scripts/Fx/ReflectionFx.cs:30)
     
  47. incenseman

    incenseman

    Joined:
    Nov 20, 2012
    Posts:
    90
    I opened usePhoton.cs and commented out the following lines and now I have no errors at all and the server info box is gone.

    Thanks a ton Dude!! :)

    I posted the results to help others that need the same thing.
     
  48. EagertoLearn

    EagertoLearn

    Joined:
    Dec 27, 2012
    Posts:
    15
    Need someone to tell me where to locate the code that handles player respawn point.

    On death the player is respawned need to know where to locate the handler that directs the position or object that places the player on respawn.
     
  49. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    60
    Hello could anyone help me out? this seems to be exactly what i need. but is there any way to make it so that rooms are persistent? or only reset when commanded/scheduled.

    I'm trying to make a third person shooter/RPG-ish kind of game where players can collect weapons and items, and it's persistant per room (preferably) or server wide, but the rooms stay open/active even while no players are inside (the player models will just disappear while theyre logged out)

    could anyone give me any insight on this? and if it isnt possible with this, what other asset might accomplish this. (im a 3D modeler, not a scripter, so my programming knowledge is very limited.
     
  50. marnes

    marnes

    Joined:
    Aug 24, 2012
    Posts:
    4