Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all 8947 articles
Browse latest View live

Multiple scenes

$
0
0
i have two maps in different scenes

scene A

scene B


Everything works fine except when some player enters the scene A, he visible and moves on the scene B. ??!
i think because the player going same room

my game use auto crate room and auto join

any idea to fix this ?

Multiplay, mechnaim based players.

$
0
0
Hiya

So I currently have implemented multiple with mechanim based avatars.
I have the transfrom and animator viewers, as well as a view of my one component that uses the read/write streams

So far, most of it is working well. except mainly the jump. When I run about once I press jump, the player anim goes all glitchy, and only occasionally lifts off the ground.However I can see they should be jumping as another object attached to the player that has a viewer is going up and down. I suspect I have to send information that a remote player is "jumping" with certain vector, and add it (since that is what happens when the local player presses jump)?

Is there an example of when we should use discrete, continuous etc as options. For example when I had discrete on the "forward" its was laggy, but continuous is much smoother...but I presume that costs more in traffic.

THanks

-P

Player Name Blank When Connecting

$
0
0
I'm trying to obtain the names of new players that join a room. Despite the client setting its PhotonPlayer's name to something, the player that OnPhotonPlayerConnected provides on the master client always has its name blank, and allProperties contains only one entry: a blank string under key (Byte)255.

What is the proper way to pass other clients' PhotonPlayers' names through, and is there a legend somewhere of what all the byte codes of allProperties indicate?

PhotonTransformView and PhotonRigidbodyView

$
0
0
Long and short of it is, if the players have rigidbodies, what should I use to synchronize it?

I'm currently using transform view but unfortunately even with interpolation/extrapolation, it's rather choppy. Even under ideal circumstances, it takes the other player's position half a second to react to any explosions/whatever. Same result if I use both in conjunction. If i use just a rigidbody view the position is completely incorrect.

Any suggestions?

PUN vs Realtime vs Turnbased

$
0
0
Hi there,

I've never used Photon before. I'm interested in making a Unity game that involves asynchronous drawing and responding to such. I'm a little confused as to all of the product offerings of Photon though - can someone explain the difference between PUN, Realtime, and Turnbased? I understand why there might be a different product for Realtime and Turnbased, but how they compare to and/or overlap with PUN doesn't make any sense to me.

Just trying to pick the right SDK to use. Thanks!

Vexir

flash Games and server side networking

$
0
0
Hi All

I am working on a game with a friend but while we have been testing it we have run into some issues

The first one is that the game is an open world game where you can move about and interact with other players, we plan on having lots of players in a room and want them all to be synced to the server. we also want to be able to have AI's fighting players.
for both of the above to happen, we would need to have a server-side script. I have done some research into this and can not find out how to make and upload one.

my next question is if we can make the game so it works on a web page (flash game), or is this not possible with Photon?


can someone explain how it works?
and we are short on money so for testing cannot afford to pay for a package but it will be vital when the game is released.

thanks for the help

Connect() to 'ns.exitgames.com' failed: System.Net.Sockets.SocketException: No such host is known

$
0
0
I keep getting this connection failed error in my unity. Am using the free version of PUN to develop my game and it creates alot of issues while testing. It doesnt always happen, but its pretty common. Could anyone help.

Multiple Join Disable

$
0
0
I want the same user logging on from different devices.
I did research for it I found this CheckUserOnJoin

but i think this is no longer valid

i see code commented disable
//public bool CheckUserOnJoin { get { return this.checkUserOnJoinField; } set { this.checkUserOnJoinField = value; } }
//private bool checkUserOnJoinField = false;

what can I do

Having trouble following part 9 of PUN Network tutorial

PUN 1.75 is not compatible with .NET 2.0 Subset API Compatibility Level

$
0
0
Hi,

After updating PUN version from 1.73 to 1.75 iOS build gives the following error.

After changing API Compatibility Level to from .NET 2.0 Subset to .NET 2.0 I can take build successfully.

I think Photon3Unity3D.dll requires .NET 2.0 compatibility level anymore.

Is it possible to remove this requirement ?

Thanks.

stdout:
ERROR: Failed to resolve base type System.Configuration.ConfigurationException for type System.Configuration.ConfigurationErrorsException
Fatal error in Mono CIL Linker
System.Exception: ERROR: Failed to resolve base type System.Configuration.ConfigurationException for type System.Configuration.ConfigurationErrorsException


UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:94)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:107)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:100)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:131)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:201)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:128)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Duration of buffered RPCs

$
0
0
Hi,

When using buffered RPCs, e.g. PhotonTargets.AllBuffered, how long will the RPC 'history' be remembered? Will all buffered RPCs be remembered for the whole lifetime of the room? Or are they expired after some time?

Thanks,

S

Is there an OnPhotonDestroy (similar to OnPhotonInstantiate)

Region is none

$
0
0
Hi, I'm trying to get a list of regions for players. I've manage to get 'a' list, but there is an issue:

http://i.imgur.com/lLcm2pb.png

As you can see many of the regions are 'none. This is the code I'm using:

if (networkingPeer.AvailableRegions != null)
{
foreach (Region region in networkingPeer.AvailableRegions)
{
regionText += region.Code + " (" + region.Ping + ")" + "\n";
}
text.text = regionText;
Debug.Log("regions=" + regionText);
}


and in my Start() function:


networkingPeer = PhotonNetwork.networkingPeer;
networkingPeer.ConnectToNameServer();
StartCoroutine(PhotonHandler.SP.PingAvailableRegionsCoroutine(false));

Any idea why the region codes are coming back as 'none' ?

IPunPrefabPool Working Sample with SmartPool(free)

$
0
0
Hi Everyone,

I created a working sample of IPunPrefabPool for effectivly use a pooling system for your network object instances. works from Unity 4.7 and Unity 5.

It's available on github: https://github.com/jeanfabre/Exitgames--PUN--Pooling_u4

You can download it directly here if you don't want to clone the rep.

It's very simple, straight to the point and the main script you are interested in really is this one: PunSmartPoolBridge.cs

It's using a free pooling system called SmartPool but really, once you understand the basics, you can switch to any pooling system.

Watch out for the few things to know:

- You need to keep your prefab inside a Resources folder anyway, It's important for PUN to load that prefab and analyze photonViews to assign viewIds. Note that there are no instantiation, it's only loaded
- On the Prefab instance, use OnPhotonInstantiate() to catch initialization, Start() and OnEnabled() are not suitable for reliable data across the various cases of instantiation and pool usage accross the network.

Let me know if you have questions :)

Bye,

Jean

IPunPrefabPool Example for Object Pool

$
0
0
Hi ,

I want to pool my effects in my network game.

Can you pleas provide some example how to do it .

What i tried
1. Add PhotonView in Effect and Call PhotonNetwork.Instantiate

And it gets visible in all screens.

How to pool this ?

What i want to do is throw grenade and show effect.


Regards
Unity Learner




Requesting info from the room when in the lobby

$
0
0
I am needing to display a list of players and other information before the player enters the room

I know I could use Room Properties for this - but I was imaging it would be a large list of information and paragraphs of text. I only want to send the player this information when they request it from a specific room.

Is there anyway to request this information from a room before joining it?

CheckUserOnJoin() disable method?

$
0
0
RoomOptions.CheckUserOnJoin=true; error method not found


I m control this file "LoadbalancingPeer.cs" line 1488 CheckUserOnJoin disable

what can I do?

how to sync or map animations in FPS game

$
0
0
First let me say I have experience in network coding of multiplayer games, but this is my first time using bolt. I am working on an FPS game where the the FPS animations of the player will be different from the animations of a connected peer. I basically want to know how this is accounted for in bolt, and if there is any built in way to map animations or if this requires some scripting. I will have to map things like FPS_run animation to standard run animation, FPS shoot to shoot and so on. Any tips would be appreciated.

Serialization in RPC problem.

$
0
0
My RPC call is looking kind of like this:
object[] objectArrayToSend = GenerateObjectsToSend();
photonView.RPC("MyRPC", PhotonTargets.All, new object[] { objectArrayToSend });


So I'm sending an array of objects. All of the objects are listed as supported types here. At least I think. here's a list of all possible types that can be in the objectArrayToSend array:
int
int[]
bool
Dictionary
Dictionary

The problem:
When the RPC is called (tested using Debug.Log) objectArrayToSend[0] is an integer of value 1.
However, when it runs, I call Debug.Log((int)objectToSend[0]) and it outputs 0.

Best way to send Trail Renderer over network?

$
0
0
Hello everybody,

I was wondering if anybody knows the most efficient way of sending a trail renderer over the net so all other players will see and but more importantly be able to interact with it.

You see - currently in our game, the trail renderer is created with a polygon collider that if hit by other players - they die (think Tron).

Currently we are sending over the verts and tris of the polygon collider to send over the info but it is a lot of work and lagging a ton. We want to optimize how it is send but unsure what the best method is as we just started using Photon about 3 months ago.

Any help is much appreciated!

- Kas
Viewing all 8947 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>