[Unity / .Net] Beta2 available!

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

[Unity / .Net] Beta2 available!

Postby Lapo » 10 Nov 2008, 14:03

Hello everyone,
Unity / .Net API beta 2 update is ready for download! It includes various bug fixes notified by beta testers and new features missing from the previous release.

Download the package from here

Quick release notes:

Code: Select all

» Feature: HTTP failover for bluebox support when socket connection fails
» Feature: auto cleanup and disconnection using IDisposable. Manual Disconnect call not required anymore
» Feature: in debug mode the client API now reports if a callback message tried calling an unset delegate
» Feature: connecting is now also async
» Improvement: a lot of null checks around the code to make Firefox happy
» Bug: refactored all async socket to use a manual threaded socket instead to work around a Unity/Mono crash bug
» Bug: properly callback on socketexceptions and connect when it fails
» Bug: fixed messages that sometimes got cut off in the middle when multiple messages got received (thanks AT)
» Bug: fixed 2 minor bugs reported on forums by AT regarding populating room variables and using floats as numbers.
Also added robustness check for null parameter in SendXtMessage


As usual keep posting your feedback! :)


Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
ccontinisio
Posts: 32
Joined: 21 Nov 2007, 13:18
Location: Rome, Italy
Contact:

Postby ccontinisio » 18 Nov 2008, 13:15

Hi Lapo,
I was just guessing:
can you let Unity-developed iPhone application and Flash-made browser games interact with each other?

For example, we have a game made for the web in Flash (UFHO) that we are porting to the iPhone. We use SFS for net play, can we make the iPhone gamers play with the Flash ones? 't would be an interesting crossover...

Sorry if it's not the right section or this wuestion has been answered somewhere else!

Ciro Continisio
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Nov 2008, 13:25

I was just guessing:
can you let Unity-developed iPhone application and Flash-made browser games interact with each other?

Yes sir :)
At the moment the C# API are not iPhone ready yet, but we're looking into it, so it's definitely possible to have a Flash client, a Unity browser client and an iPhone client all play in the same virtual place 8)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
ccontinisio
Posts: 32
Joined: 21 Nov 2007, 13:18
Location: Rome, Italy
Contact:

Postby ccontinisio » 18 Nov 2008, 13:31

Thanks Lapo, quick as always!
But let me understand... isn't the iPhone language Objective C? (I'm not the one who's working on the iPhone port, this is clear :D)

Maybe Unity for the iPhone retains its C# programming backbone?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 18 Nov 2008, 15:04

Unity keeps its javascript/C#/boo scripting capabilities and compiles it down to something running on the iPhone.

So porting an existing Unity project to iPhone is purely a matter of reworking art + performance optimizing. The code and everything else stays the same. Ultra efficient.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Nov 2008, 15:06

Yes Unity for the iPhone uses C# and Javascript just like the "regular" Unity.
The beauty of it is that you can port already existing games in very little time without going crazy with the Objective-C crazyness (sorry Apple, we're in 2008 come on... give us some friendlier dev tools!)

p.s. = if you wonder how it works, Unity compiles to the code to native ARM code
Lapo

--

gotoAndPlay()

...addicted to flash games
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 18 Nov 2008, 18:51

Personally I just spend less than 1 day to port an existing Unity web game to an iPhone version. Main part of the time was spend reducing polygons, texture sizes, stereo sound to mono and streamlining lights. Very little code changes involved.

Cant wait to get cracking on iPhone games leveraging SFS and with cross-platform game clients in the same game
kugelfunk
Posts: 6
Joined: 09 Sep 2008, 16:34

Postby kugelfunk » 11 Dec 2008, 12:07

We have developed a few AS3 games that can also be played multiplayer using the SFS API. Now we are working on iPhone singleplayer versions of them with the goal in mind to later also connect it to the SFS and enable multiplayer.

I am not a 3D guy and our games make no use of 3D. So using Unity seems to add no value for our case except for the existing SFS connection functionality.

Do you guys think there are some major obstacles to writing an xml parser for parsing the sfs xml packages and using some iPhone compatible Objective C or native C socket functionality to communicate with smartfoxserver?
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 11 Dec 2008, 12:28

Hi there,
I've been playing with Objective-C sockets, XML parsing and the like to see how hard it would be to make a set of native iPhone API.
Unfortunately I have to say it was not much fun :(
Manual memory management and good old C types/pointers legacy popping up all over the place make it a bit of a downer for me.

At the end of the day an SFS API port would be feasible and if you have good experience with C/Objective-C you might jump into it, however it's not something you will do overnight.
I guess you would also need to consider how complex it would be to develop the game from scratch versus using the high level engine coming with Unity and it's scripting capabilities which allow you to forget about reference counting, pointers and other ugliness :)

Personally I feel high level API and dynamic languages as a strong advantage, unless they raise performance issues. In the case of Unity scripts are compiled into ARM native code so you get the best of both worlds.
If you add that we already have stable C# API I have the gut feeling that the time and effort needed to create the Obj-C API might not be worth it.

And before you ask... we don't get any money from Unity to push their product :)
Lapo

--

gotoAndPlay()

...addicted to flash games
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 11 Dec 2008, 13:23

I dont know what other options there exists in the .NET world really in terms of compiling them down to something native on the iPhone.

While it is possible to simply parse the XML into obj-c and back again (thats essentially what the API does + some extra stuff) - I have also tinkered with obj-c now. I have 2 games in the app store written in obj-c, and it does definitely not feel like step into the future......

I am definitely not going to volunteer for the job!
kugelfunk
Posts: 6
Joined: 09 Sep 2008, 16:34

Postby kugelfunk » 11 Dec 2008, 13:29

Thanks, I appreciate your thoughts. I just looked a little bit at what people say about unitys' specific 2d support and it seems there isn't much while the 3d engine is just a total overkill for what we need.

Since we've already started developing the singleplayer version using Cocoa Touch I will look at the socket and xml part also and see what I can make of it.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 16 guests