Friday, 9 August 2013

Using Remote Shared Objects with LAN game in Actionscript 3

Using Remote Shared Objects with LAN game in Actionscript 3

Is it possible to use remote shared objects through a LAN connection in
AS3? I do have Flash Media Server available, but as far as I know a server
isn't required when accessing the LAN.
In order to connect to the LAN, I'm using NetConnection with RTMFP:
nc = new NetConnection();
nc.connect("rtmfp:"); //Connect to LAN
Since I'm developing a multiplayer game, the usage of remote shared
objects is important to communicate with each client (usually done with
assistance through sever-side code), but remote shared objects cannot be
created through a LAN connection using SharedObject.getRemote():
Error: Error #2134: Cannot create SharedObject.
At first the option of using NetGroup.post() method seemed almost viable,
but according to Adobe's documentation "posting is not similar to using
shared objects... posting does not manage changes".
Is there an alternative to using remote shared objects through a LAN
connection? Since the game has a real-time environment, updates would be
fired continuously throughout gameplay (i.e. a player's X and Y
coordinates).

No comments:

Post a Comment