Kaiserludi admin

About

Username
Kaiserludi
Joined
Visits
3,341
Last Active
Roles
Registered, Administrator
Points
212
Badges
20
  • Re: Error compiling Android NDK

    Hi @juaxix.

    This is likely caused by the fact that you are using NDK r10b.

    Please update to r12b and download the latest Photon Client SDK (4.1.3.3).

    4.1.3.2, which is what you probably work with right now, was the last release that required the NDK version to be either r10d or r10e.
  • Re: Chat changes in 4.0.5.0

    Hi DG Gage.

    Don't worry.
    This is just a naming mistake on our side in the header file that we will fix for the next release.
    opSendPrivateMessage still expects a username, not a channelname. The implementation in the Client.cpp file also still uses userName as name for that parameter.

    PS:
    I <3 Kaiserludi.</blockquote>
    Sorry, but I have to tell you that I am only into women ;)
  • Re: 4.0.5.0/VS2015/UE4 Compile error

    Hi @DG Gage.

    I can't reproduce this with our UE demo. Everything works fine for me.

    VS2015 is not mandatory for UE4.10. You can specify that you want to continue using VS2013 by building UE from its github source and passing -2013 on the command line.

    However Photon 4.0.5.0 also works fine with UE4.10 when using VS2015.

    Please make sure to adjust your .Build.cs file to the switch in VS versions. With VS 2013 you need to reference the vc12 builds of the .lib files from the Photon Windows Client SDK, while with VS2015 you need to reference the vc14 builds.

    Furthermore there have been some breaking API changes between 4.0.4.1 and 4.0.5.0 that you have to adjust your code to. Maybe those changes and missing adjustments to them are causing your issues.
    Please carefully read the release-history files so you know what you need to adjust. You may also want to redownload our demo http://doc.photonengine.com/en/realtime/current/sdks-and-api/sdk-unreal-engine, which I have updated just a few minutes ago. The latest version of that demo is compatible to 4.0.5.0.

    Also please doublecheck that you have not missed any step in the guide on http://doc.photonengine.com/en/realtime/current/sdks-and-api/sdk-unreal-engine when updating to 4.0.5.0. You will need to adjust the headers again and of course you shoudl remove the old headers and libraries before pasting the include folders and libs from the new SDK into your project folder to avoid that any conflicting files from an older SDK version remain in your project folder.

    Here is a diff of the changes that I made when updating the demo from 4.0.4.1 to 4.0.5.0:
    
    Index: demo_particle_common/LoadBalancingListener.cpp
    ===================================================================
    --- demo_particle_common/LoadBalancingListener.cpp	(revision 5980)
    +++ demo_particle_common/LoadBalancingListener.cpp	(revision 5981)
    @@ -230,6 +230,18 @@
     		view->error("Warn: opCreateRoom() failed: %s", errorString.UTF8Representation().cstr() );
     }
     
    +void LoadBalancingListener::joinOrCreateRoomReturn(int localPlayerNr, const Hashtable& gameProperties, const Hashtable& playerProperties, int errorCode, const JString& errorString)
    +{
    +	updateState();
    +	if (errorCode == ErrorCode::OK)
    +	{
    +		view->info("room has been entered");
    +		afterRoomJoined(localPlayerNr);
    +	}
    +	else
    +		view->error("Warn: opJoinOrCreateRoom() failed: %s", errorString.UTF8Representation().cstr());
    +}
    +
     void LoadBalancingListener::joinRoomReturn(int localPlayerNr, const Hashtable& gameProperties, const Hashtable& playerProperties, int errorCode, const JString& errorString)
     {
     	updateState();
    @@ -389,8 +401,8 @@
     	Hashtable props;
     	props.put("s", gridSize);
     	props.put("m", map);
    -	if(lbc->opCreateRoom(name, true, true, 0, props))
    -		view->info( "Creating room %s", name );
    +	if(lbc->opCreateRoom(name, ExitGames::LoadBalancing::RoomOptions().setCustomRoomProperties(props)))
    +		view->info("Creating room %s", name);
     	else
     		view->error("Can't create room in current state");
     }
    @@ -441,12 +453,12 @@
     		nByte coords[] = {localPlayer.x, localPlayer.y};
     		data.put((nByte)1, coords, 2);
     
    -		if(sendGroup)
    -			lbc->opRaiseEvent(false, data, 2, 0, 0, 0, 0, 0, sendGroup);
    +		if (sendGroup)
    +			lbc->opRaiseEvent(false, data, 2, ExitGames::LoadBalancing::RaiseEventOptions().setInterestGroup(sendGroup));
     		else
     		{
    -			if(useGroups)
    -				lbc->opRaiseEvent(false, data, 2, 0, 0, 0, 0, 0, getGroupByPos());
    +			if (useGroups)
    +				lbc->opRaiseEvent(false, data, 2, ExitGames::LoadBalancing::RaiseEventOptions().setInterestGroup(getGroupByPos()));
     			else
     				lbc->opRaiseEvent(false, data, 2);
     		}
    @@ -461,7 +473,7 @@
     {
     	Hashtable data;	
     	data.put((nByte)1, localPlayer.color);
    -	lbc->opRaiseEvent(true, data, 1,0,ExitGames::Lite::EventCache::ADD_TO_ROOM_CACHE);
    +	lbc->opRaiseEvent(true, data, 1, ExitGames::LoadBalancing::RaiseEventOptions().setEventCaching(ExitGames::Lite::EventCache::ADD_TO_ROOM_CACHE));
     }
     
     int LoadBalancingListener::getGroupByPos(void)
    Index: demo_particle_common/LoadBalancingListener.h
    ===================================================================
    --- demo_particle_common/LoadBalancingListener.h	(revision 5980)
    +++ demo_particle_common/LoadBalancingListener.h	(revision 5981)
    @@ -89,6 +89,7 @@
     	virtual void connectReturn(int errorCode, const ExitGames::Common::JString& errorString);
     	virtual void disconnectReturn(void);
     	virtual void createRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
    +	virtual void joinOrCreateRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
     	virtual void joinRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
     	virtual void joinRandomRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
     	virtual void leaveRoomReturn(int errorCode, const ExitGames::Common::JString& errorString);
    Index: PhotonDemoParticle.Build.cs
    ===================================================================
    --- PhotonDemoParticle.Build.cs	(revision 5980)
    +++ PhotonDemoParticle.Build.cs	(revision 5981)
    @@ -45,7 +45,7 @@
     	private void AddPhotonLibPathWin(TargetInfo Target, string name)
     	{
     		string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "Win32";
    -		PublicAdditionalLibraries.Add(Path.Combine(PhotonPath, "lib", "Windows", name + "-cpp_vc12_release_windows_md_" + PlatformString + ".lib"));
    +		PublicAdditionalLibraries.Add(Path.Combine(PhotonPath, "lib", "Windows", name + "-cpp_vc14_release_windows_md_" + PlatformString + ".lib"));
     	}
     
     	private void AddPhotonLibPathAndroid(TargetInfo Target, string name)
    Index: PhotonLBClient.cpp
    ===================================================================
    --- PhotonLBClient.cpp	(revision 5980)
    +++ PhotonLBClient.cpp	(revision 5981)
    @@ -24,7 +24,7 @@
     	Super::BeginPlay();
     	srand(GETTIMEMS());
     	listener = new LoadBalancingListener(this);
    -	client = new ExitGames::LoadBalancing::Client(*listener, *AppID, *appVersion, ExitGames::Common::JString(L"UR") + GETTIMEMS());
    +	client = new ExitGames::LoadBalancing::Client(*listener, *AppID, *appVersion);
     	listener->setLBC(client);
     
     	automove = listener->getAutomove();
    @@ -35,7 +35,7 @@
     	ht.put(2, 2);
     	info("Connecting...");
     	info("appID is set to %ls", *AppID);
    -	client->connect(*serverAddress);
    +	client->connect(ExitGames::LoadBalancing::AuthenticationValues(), ExitGames::Common::JString(L"UR") + GETTIMEMS(), *serverAddress);
     
     }
    
    You likely need to do similar adjustments to your code.


    PS:
    C:\Users\Gage\Desktop\i-hate-my-job
    Maybe that has just demotivated your project source and it will magically start to compile again if you move it to C:\Users\Gage\Desktop\i-love-my-job ;-)