.NET sockets tutorial

there is a .NET sockets tutorial that can help me to learn from 0 how to do an iPhone multiplayer game ?

I see there is some example project in SmartFox site , but i dont understand how to set the server , were found a server . i install the project but after i dont know what to do .

Thank you

The SmartFox examples are for usage with the SmartfoxServer

if you want general .NEt sockets, you optimally use Google and search for C# xxx socket with xxx either beeing tcp or udp depending on what you are looking for

I am literally a neophyte … there’s a tutorial for unity?

l tic tac toe example now works, I had to install the test server .

There is none as far as I know as unity + networking = unity networking
but there is a sample project I think it was done by zumwalt, just search the board

Also the sockets in unity are just normal .net sockets so you can check out and use any .net socket tutorial, because the code will be the same independent of Unity (actually aside of the classing and explicit function names near independent of any os at all)

also be warned that Wi-Fi isn’t comparable with 3G, keep that in mind when writting the code and doing assumptions

i think this is the example http://www.unifycommunity.com/wiki/index.php?title=Simple_TCP/IP_Client_-_Server

now i try to learn ,

thank you

1 Like

Scinfu:

Can you tell me more about what you’ve done and where you found the information? I’m starting the journey into remote player connections. If you have an example of a working tic tac toe game, I’d be interested what, where and how.

My current desire is to get a turn-based two player game up and running where one player needs to send one integer per turn to a master unit, which will process that turn, and send one integer back.

Tic Tac Toe seems like a great place to start.

personally, I’d suggest you to check out Project darkstar ( http://projectdarkstar.com/ ) for usage as a game server…
It is a really interesting server development framework, and by using it you could cut out a big part of development, and provide istantly an high quality server…

If you check it out and are interested, you can PM me and i’ll send you (or post here) a basic Project darkstar server implementation with different accounts alredy setted up… and a basic unity project for communication between the two…

P.S: You would have to learn to program in java barebone to use it…

Philip

(Server technology make me feel like a podling staring into the beam of the dark crystal. I can feel my life force being sucked out…)

Interesting… (http://projectdarkstar.com) Java? Aiee! I suppose it can’t be that much harder than learning C#…

I’ve also looked at SmartFoxServer as well (http://www.smartfoxserver.com)

All of this seems like over kill for a turn-based two player game where only two integers per turn need to be passed… but then again… the main issue is the connection and interface, not the complexity of the game data. I still need to hook up two players, and have some sort of lobby either way…

PhilipV: Are you related to Project Darkstar? Or just a user? And you’ve gotten it working with Unity3D and the iPhone?

I did notice the lack of mention of Unity3D being listed:

I encountered this thread when scanning the forum for a solution, but I’ve now posted an new thread with my specific questions here:

http://forum.unity3d.com/viewtopic.php?p=235787

Hey

Project Darkstar has the issue of very few reference cases - its simply still under development. SFS, Photon/Neutron and some of the other backend systems have more real world deployed games and thus the early problems have (mostly) been ironed out long time ago.

With that said, Darkstar has some really nice clustering technology. But overkill in what you need.

If I were you, I would take a look at the SFS lobby tutorial and/or the SFS tic-tac-toe tutorial - and see if its not more or less exactly what you need as a framework to easily and without re-inventing the wheel get up running and move on.

/Thomas

Thomas,

Thanks for the pointer. I’ll take a look at the tic tac toe example. This may be all that I need.

If I can get this project to work under the “lite” version, it would also be good, as any cost savings to me at this point would be great.

Download SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

run and see what is your IP server .

Download the api and exemple foe unity iphone SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

open the example project , in editor add you IP server , Install on iDevice , Play .

I’ll forge ahead with this, but I may be out of luck, as I’m only working with Unity iPhone basic at this point…

Take a look,Thanks.

Can P2P? iphone ← wifi → iphone(no need net,no need service) :stuck_out_tongue:

Yup… This experiment in SFS may just have to wait a bit!

Yep - requires pro for the socket bits. Goes for any kind of backend.

And for SFS you need at least the basic (not lite). But all 3 SFS versions are free up to 20 simultanious connections.

If you are more adventurous, you can hack the API code as it contains a “blue box” fallback if socket communication is not possible - meaning it falls back to http protocol. While this also uses sockets right now, you could port it over to use Unity WWW class.

But alas - blue box is SFS pro only.

/Thomas