Forum General Unity build to Flash Player 11 & PlayerIO

Any issues or discussions relating to Unity development are welcome here.

Unity build to Flash Player 11 & PlayerIO

Postby moosemouse » September 18th, 2011, 5:06 am

I am beginning to remake my racing game in Unity3D. I am planning to port back to Flash once Unity has released their upcoming Flash Player 11 "Stage3D" build ability. My question is (and I realize you may not have enough info yet to answer):

Do you see anything so far that would stand in the way of me making a PlayerIO multiplayer game in Unity and then porting it to Flash?

Thanks,
Shawn
User avatar
moosemouse
Paid Member
 
Posts: 83
Joined: August 11th, 2010, 2:51 pm
Location: New Albany, Ohio USA

Re: Unity build to Flash Player 11 & PlayerIO

Postby Oliver » September 20th, 2011, 2:28 pm

I don't completely understand the question. If you're asking if the Player.IO Unity Client will work when unity compiles to Flash, the answer is: We don't know. However, we have a working ActionScript 3 client, so we're not doing anything that Flash does not allow, so in theory, it should work.

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

Re: Unity build to Flash Player 11 & PlayerIO

Postby moosemouse » September 20th, 2011, 3:17 pm

Hi Oliver,

Sorry, I don't completely understand how to ask the question :oops:

Yes, I am asking if the Player.IO Unity Client will work when unity compiles to Flash. Basically, I would like to switch to doing all of my game dev in Unity. Then just press the "Build Flash SWF" button in Unity (once it and Flash Player 11 are released). I understand that you may have no way of knowing yet. But if you did have any insight it would be very helpful to me :)

I just really don't understand the technology well enough to know if this is a silly/obvious question. Seems like it could be something that trips me up, so I am trying to get my ducks in a row.

Thanks,
Shawn
User avatar
moosemouse
Paid Member
 
Posts: 83
Joined: August 11th, 2010, 2:51 pm
Location: New Albany, Ohio USA

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » October 30th, 2011, 5:57 am

Hi Shawn,

I've been following the Unity/Flash/PlayerIO situation quite closely and even though I can't say with certainty (because it hasn't been released yet), I don't think the PlayerIO Unity client will work out of the box because Unity Tech have mentioned that they will have limited RakNet support (what Unity uses for socket calls) in the initial Flash release. Since the PlayerIO client uses the Unity web/socket calls, that would include this too.

But don't panic, because Unity will be providing a robust way through messaging for the Unity SWC to talk to a flash wrapper layer around your game, which means that you can just use the AS3 PlayerIO libraries and pass data back and forth to Unity.

I know it isn't the neatest solution, and one day maybe the flash exporter will support it "out of the box" with better networking support, but it is absolutely doable.

Hope this helps.

-Rob.
Rocket Bunny Games
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby moosemouse » October 31st, 2011, 1:52 pm

Thanks for the info, Rob. It is very helpful. I will research the Flash wrapper idea.

Shawn
User avatar
moosemouse
Paid Member
 
Posts: 83
Joined: August 11th, 2010, 2:51 pm
Location: New Albany, Ohio USA

Re: Unity build to Flash Player 11 & PlayerIO

Postby bighugejason » July 2nd, 2012, 2:15 pm

Any updates on this?

Trying to compile the Mushroom Example for Flash with Unity, fails with the following error:

Code: Select all
Can not resolve reference: System.String UnityEngine.WWW::get_error()


The documentation has the following to say about that:

This means that you have a precompiled dll in your project that was not built with flash support in mind and references classes that Unity Flash does not support.


In this case, the player.io dll is unfortunately to blame.

As far as I can understand, the only way around that, is to use the flash version of player.io and make a wrapper for it. It would be awesomely neat if this could be included in the unity DLL, though, so no extra code would be needed. I don't know how possible that is, but a man can dream.

In the meantime, has anyone else made such a wrapper and wants to share?
bighugejason
 
Posts: 16
Joined: December 28th, 2010, 10:39 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby dreamora » July 2nd, 2012, 2:24 pm

Since Unity 3.5.2+ Unityengine.WWW is supported.
Only the initial Unity Flash 'dev preview' had it missing.

Ensure you update to 3.5.3 which is the current version and at least this one error should be gone.
dreamora
 
Posts: 225
Joined: March 2nd, 2012, 9:58 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby johannes » July 6th, 2012, 8:44 pm

Thanks, dreamora!

Compiling the mushroom example with the latest Player.IO (2.3.2) and the latest unity (3.5.3f3) works a lot better, but there are still errors:

Code: Select all
Failed to convert type 'PlayerIOClient.Internal.identifier4': Failed to resolve O (Mono.Cecil.ResolutionException)
Failed to convert type 'PlayerIOClient.Internal.identifier5': ParameterDefinition missing from node. (cil2as.Decompiler.Core.UnexpectedNodeException)
Failed to convert type 'PlayerIOClient.VaultItem': Cannot replace the null nodes (System.InvalidOperationException)
Failed to convert type 'PlayerIOClient.Internal.identifier463': Object reference not set to an instance of an object (System.NullReferenceException)
Failed to convert type 'PlayerIOClient.Internal.identifier465': The given key was not present in the dictionary. (System.Collections.Generic.KeyNotFoundException)
Failed to convert type 'PlayerIOClient.DatabaseObject': Cannot replace the null nodes (System.InvalidOperationException)
Failed to convert type 'PlayerIOClient.DatabaseArray': Cannot replace the null nodes (System.InvalidOperationException)
Failed to convert type 'PlayerIOClient.Internal.identifier482': ParameterDefinition missing from node. (cil2as.Decompiler.Core.UnexpectedNodeException)
Failed to convert type 'PlayerIOClient.BuyItemInfo': Cannot replace the null nodes (System.InvalidOperationException)
Failed to convert type 'PlayerIOClient.Internal.identifier564': Failed to resolve System.Void System.Console::set_ForegroundColor(System.ConsoleColor) (Mono.Cecil.ResolutionException)


I get these independent of target [1], and as far as I can tell, the only way to fix this is by modifying either PlayerIO or Unity's flash export. I'd be very happy to be proven wrong, but if not, it seems the only viable option is to make a wrapper for the Flash version of PlayerIO. That seems to work, but requires development time and maintenance. Would be neat if it just worked out of the box.

Full error log at http://www.pastebin.ca/2168245


[1] at least development build for FlashPlayer 11.0 (SWF 13) and non-development build for FlashPlayer 11.2 (SWF 15) yields the same result
johannes
 
Posts: 2
Joined: July 6th, 2012, 8:37 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby MentalFish » September 20th, 2012, 11:05 am

Any news on this issue?
User avatar
MentalFish
 
Posts: 16
Joined: October 31st, 2011, 6:52 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby dreamora » September 20th, 2012, 11:52 am

On Unity 3.x I would assume it to never work. thats just the flash preview with major parts of the .net framework not working or totally missing.

Did anyone try it on Unity 4.0b8 (the preorder beta)
dreamora
 
Posts: 225
Joined: March 2nd, 2012, 9:58 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » September 20th, 2012, 1:36 pm

Yeah, it won't work on Unity 4 either. The PlayerIO Unity DLL is built with sockets which aren't supported yet for Flash, among other things. It isn't that hard to just write a bridge between Unity and Flash to send the PlayerIO info back and forth. That's what I did and it works just fine.

Oliver may be working on a new version of the DLL which will work natively but I don't think it is a priority for them.

Tell me if I'm wrong Oliver. :)

If you want to see PlayerIO in action with Flash, check out my game at www.rocketpokerworld.com

-Rob.
Rocket Bunny Games
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby MentalFish » September 20th, 2012, 2:22 pm

So Mr. RocketBunny Sirr... :) when will you write a detailed how-2, in terms of such bridging? 8-)
User avatar
MentalFish
 
Posts: 16
Joined: October 31st, 2011, 6:52 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » September 21st, 2012, 10:49 am

I'm just waiting on confirmation from Oliver on the plans for the DLL and Flash but if nothing is on the horizon for a while, I'll be happy to help with a tutorial.

-Rob.
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby MentalFish » September 21st, 2012, 11:02 am

Cool, good to know Rob. I am considering releasing a game on Kongregate, and there seems to be quite a few anti-Unity-plugin people there, so a Flash option would be good. Then again, it could be a vocal minority which is hammering the stability issue of the Unity player.

First things first anyway, get the game done... :)
User avatar
MentalFish
 
Posts: 16
Joined: October 31st, 2011, 6:52 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » September 21st, 2012, 10:50 pm

Yeah, I would use Flash on Kongregate.

Plugin adoption is still far too low to use the player.

Also, the Kongregate API is much more reliable for AS3.

-Rob.
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby Sundaerae » November 22nd, 2012, 4:41 am

Any update on this?
I really need a multiplayer solution for unity flash
Sundaerae
 
Posts: 21
Joined: September 3rd, 2012, 4:25 am

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » November 22nd, 2012, 5:35 am

Sure, I can probably do up something in the next few days.

I'll have a chat to Chris and Oliver about it first.

-Rob.
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby RocketBunny » November 23rd, 2012, 10:35 am

Ok, here it is!

http://www.arcadedevelopergroup.com/Uni ... ayerIO.zip

It has a tutorial inside as well.

I think Chris might do something more official with it a bit later, but for now you can just download it from there.

Let me know if you have any issues, or you wish to heap praise on me. :D

-Rob.
RocketBunny
Paid Member
 
Posts: 23
Joined: June 16th, 2010, 9:49 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby mindbogglegames » November 23rd, 2012, 11:03 am

Awesome, nice work!
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Unity build to Flash Player 11 & PlayerIO

Postby Sundaerae » November 27th, 2012, 3:21 am

Great! The embeddingapi really solved all my problems
I can have access to any 3rd party swc now :D
Sundaerae
 
Posts: 21
Joined: September 3rd, 2012, 4:25 am


Return to General



cron