- Home /
C# MMO Backend and Unity
Hi!
I've created a MMO backend in C# that I'm currently connecting to using Flash for the client side. Since Flash doesn't have any hardware support for rendering and my game is in 3D I'm leaning towards using Unity3D for the client instead. The protocol I'm using consists of three parts. A command, data length and the actual data. All stored in a byte array and sent back and forth between the server and client. Is it possible for me to use unity3d and communicate with my server as it is, or do I have to set up some other RPC system?
Answer by duck · Apr 20, 2010 at 09:11 AM
Yes, if your server uses normal socket connections for communication, you can use .net's socket library for sending and receiving information to and form your server.
You would use the same socket progamming code in C# in unity that you would use if you were writing a windows form c# client to talk to your server, with the only caveat that the current version of Unity uses .Net 2.0 rather than the latest version of .Net (I'm guessing this makes sense to you if you've already written a c# server app!)
Answer by Cyclops · Apr 20, 2010 at 01:49 PM
I posted some sample TCP Client Socket code in another Question that might be helpful. It's String-based, but it wouldn't be hard to develop whatever protocol format you needed for your data.
Answer by softready · Aug 24, 2012 at 04:50 PM
If you're looking for Socket connection inside Unity, you can use Photon Socket server. If you're planning to retrieve/store the data, you could use CloudyRec for Unity which provides the backend solution. http://gamedevresources.blogspot.sg/2012/08/getting-starting-with-cloudyrec.html
Answer by srivello · Aug 11, 2013 at 11:04 AM
Hi,
Great discussion on using Unity to talk to the backend. File I/O and server communication in Unity is a challenge. For beginners, I launched a free, complete "Unity3D & Server Communication" article. Check it out!
-Samuel Asher Rivello RivelloMultimediaConsulting.com
Your answer
Follow this Question
Related Questions
MMORPG NPC/AI Simulation Movement and Position 0 Answers
MMORPG Server, Database, Client 1 Answer
MMO server performance 2 Answers
Most efficient way to structure a huge online "virtual world" 0 Answers
Hamachi and Unity? 1 Answer