Forum Multiplayer RoomData bug?

Discussion and help relating to the PlayerIO Multiplayer API.

RoomData bug?

Postby DJamieson » May 30th, 2010, 3:36 pm

So, yesterday my code was working fine. I updated today to the latest version (1.5), and I cant get my game to work at all.

I believe I've located the problem to roomData not being stored (or something):

In Flash (AS3), Im initialising the room with:
Code: Select all
         Connect.client.multiplayer.createRoom(
            null, //id
            Connect.serverType, //DLL to spawn
            true, // visible
            {name:str, players:pl, width:bw, height:bh, timer:time }, //roomData
            roomCreated,
            roomError);


then join the room with

Code: Select all
Connect.client.multiplayer.joinRoom( connection, { playername:Main.playerName }, handleJoin, handleError);



In C#, I try this:
Code: Select all
        public override bool AllowUserJoin(Player player)
        {
            foreach(var kv in RoomData) {
           Console.WriteLine("RoomData[" + kv.Key + "] = " + kv.Value );
            }
        }

and nothing happens. Apparently, all my room data has disappeared.

Anyone able to shed some light on this?
DJamieson
 
Posts: 29
Joined: March 4th, 2010, 5:43 pm

Re: RoomData bug?

Postby fox1980 » May 30th, 2010, 11:17 pm

Check your error log in the admin panel. I believe you'll find some "code ran for too long" errors there.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: RoomData bug?

Postby DJamieson » May 31st, 2010, 1:52 pm

Not that I can see. I do have:

10 x
Code: Select all
TypeError: Error #1006: value is not a function.
   at MethodInfo-188()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at bridge::Connection/handleMessage()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at bridge.utils::BinarySerializer/onMessage()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at MessageBuilder/AddValue()
   at bridge.utils::BinarySerializer/onValue()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at TokenBuilder/AddByte()
   at bridge.utils::BinarySerializer/AddByte()
   at MethodInfo-581()


and 2 x
Code: Select all
RangeError: Error #2006: The supplied index is out of bounds.
   at flash.text::TextField/setTextFormat()
   at MethodInfo-173()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at bridge::Connection/handleMessage()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at bridge.utils::BinarySerializer/onMessage()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at MessageBuilder/AddValue()
   at bridge.utils::BinarySerializer/onValue()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at TokenBuilder/AddByte()
   at bridge.utils::BinarySerializer/AddByte()
   at MethodInfo-581()
in callback handler for Connection.addMessageHandler("ChatMessage")


But the thing is, Im getting the problem of no roomdata on a local development server. And all I've done is updated the c# and AS3 playerio code to the latest version :|
DJamieson
 
Posts: 29
Joined: March 4th, 2010, 5:43 pm

Re: RoomData bug?

Postby fox1980 » May 31st, 2010, 2:51 pm

I believe there was a change some time ago that prevents you from saving room data when you don't specifically set the roomID.
From i can see from your code you're asking the API to create one for you, so instead of passing null try passing a roomId string.
Check this post http://playerio.com/forum/multiplayer/error-when-roomid-null-t289 , maybe this is the same problem.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: RoomData bug?

Postby Oliver » May 31st, 2010, 9:01 pm

Hi,

We're looking into this issue... stay tuned.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: RoomData bug?

Postby DJamieson » May 31st, 2010, 10:46 pm

Tried passing a roomID in, didnt seem to make any difference.
DJamieson
 
Posts: 29
Joined: March 4th, 2010, 5:43 pm

Re: RoomData bug?

Postby Oliver » June 3rd, 2010, 9:07 am

This is fixed in v1.5.1, which has just been released.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: RoomData bug?

Postby DJamieson » June 3rd, 2010, 9:59 am

Excellent, many thanks.

Also, a small criticism: I realise that playerio is still in beta, and that Im using a free service (well, sortof free) but this isn't the first time Ive downloaded a forced update which has broken my game. Its incredibly frustrating, and Ive been unable to work for several days. I also realise that as the playerIO base code matures, it should (in theory) become more stable, but I had to spend a whole day running over code that I had changed trying to figure out what when wrong, only to discover (when I managed to get an old build) that the fault wasnt mine.

It also doesn't help that the documentation is lacking in places. The demo games are much more useful, but have the problems that they're somewhat simple, and - last I checked (at work currently) - were broken.

I dont mean to offend, but hope that you can use my comments to improve / fix the aspects of your service which have been a source of annoyance for me. I certainly like what you offer, and adding multiplayer to my game has improved it significantly.
DJamieson
 
Posts: 29
Joined: March 4th, 2010, 5:43 pm

Re: RoomData bug?

Postby Oliver » June 3rd, 2010, 10:12 am

Hey,

Thanks for the candid feedback. We appreciate that you care enough to tell us :-)

I have a couple of points.

As you mention yourself:
1. It is currently in beta
2. It will get more stable as it matures

But also,
3. We're building out a large test-suite that we can run on each release, in order to identify these sorts of issues before they're released. We feel that we've got very good coverage of the BigDB api, but we know the multiplayer api needs a more extensive test suite. The suite will grow and evolve slowly over time and inresponse to bug-reports like this, so it will take some time before it's really comprehensive

And:
4. A key point you made is forced update. Perhaps we should put more effort into only forcing updates when we're sure the old version will break (which is the point of the forced update). This was the case with 1.5.0, but is not the case with 1.5.1, so we'll make the 1.5.1 upgrade optional again... my guess is that 9 out of 10 updates don't need to be forced.

Again, thanks for the candid feedback and i hope you'll continue to use the service.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer