My Multiplayer Success Story

Hello,

I would like to give a brief story about how creating multiplayer in unity was.

I was seriously scared to death and feared coding multiplayer because of some things i’ve read around the forum!But for my game I had to tackle it at some point,so about a week ago i started my work.Watched some tutorials,read some tutorials,examined many networking examples and by far the best solution was me to use smart fox 2x.

I went into it with a positive attitude but still focused on the goal.A little tip is networking is one of those things that if you try and don’t succeed go do something else for a few minutes,hours,maybe even days,whatever it is if your struggling then its best to get the problem off your mind.I had to do it multiple times.

It took me a few days to get a good stable code working.I messed with how to make it work and finally got lucky and had success.There are a lot of other variables outside of unity you have to know to make multiplayer work.For example : port forwarding(if behind a router),firmilar with your fire wall,udp and tcp allowing,the difference in an internal and external ip,and a decent amount more.

I did finally get smart fox 1x working.Then i moved to smart fox 2x.At first 2x was complicated and hard to understand but after someone told me wrong i realized it was them that steered me wrong and it was easier to work with then 1x.Far more advanced and makes the work flow of multiplayer so much smoother.

We cant forget the great work all kinds of wonderful people have done to make unity how it is.

I would like to say kudo’s to Unity Development Team,Coders,Tutorial Makers,And all that have made unity the great engine it is today.

Im now editing lobbies,rooms,user lists,chats,and all kinds of fun graphics!

I hope my story has inspired you to make a multiplayer game.Im available just about any time and i will be more than happy to help you with your multiplayer issues.It is not as scary as some people make it sound.But then again maybe im just smarter than i give myself credit for!Lol.

Youll never know how easy it will be for you until you try it.Let me know if you need help.

I feel as if i could right a huge tutorial explaining it all in detail to help the ones in the dark out a little.Im not a powerful light but ill try and shine some light on your issues!

Yeah! Make a tutorial! Step by step!

Could you post the links to the tutorials you used?

I used the Unity tutorial to create my networking prefab and got it to a point where I simply instantiate the prefab in order to get the networking started. I call the preafab: “NetworkInABox”. Cool, eh?

Unfortunately, I am no longer a RakNet fan and would love to see how you did the SmartFox integration. Any code to improve networking knowledge is a definite plus :slight_smile:

Oh yes, good for you, and it would be great if we could get some sort of tutorial series and or, a basic workflow so that we can start.
Thanks and congrats!

Awesome post Tyler,
Never worked with smart fox, but had the chance to work with ElectroServer and i must say, its so darn awesome!
It supports Unity, Flash, XNA, iPhone and Android, oh and is free for 25 users or less (per server). The v5.1 support HTML5.
It also have some nice license for small studios if you want more than just 25 users per server. Their licenses is a perpetual license. All you need to do is make an one-time payment. Here is their three models:
The 25 CCU (free)
The 1000 CCU license wich is 1000$ (one time fee).
And the unlimited CCU for 5000$ (one time fee).

If you want to get your hands on multiplayer, try it for free, you’ll see how awesome it is! :slight_smile:
Btw, The ElectroServer Unity integration have lots of tutorials and examples to get you started.
Cheers,

Hey Tyler,

Yes, a tutorial please :slight_smile:
Are you hosting your own master server ?

Multiplayer implementation is something I have been avoiding like the reaper… It is nice to hear a story about it going well for a change.

Also, if you could post links to the tutorials you found it would be much appreciated.

Im going to start the tutorial today.Im going to make it in video first then i will write it out in adobe reader.I feel a video can be a lot more substantial at this point.Thanks for the comments guys.I hope my tutorial helps you.It will be out sometime in the next few weeks.As for links to tutorials,well i read over so many i cant really find the ones that helped me the most.I will try to add as many as i can in the tutorial.

Thanks again!

this tutorial will be cool!

What will it cover?

Well i already have part 1 and 2 done(10 minutes each) part 1 covered setting up the smart fox server,enabling other players to play your game,and some basics of how ip’s work.Part 2 went over fire walls,and setting up the smart fox fps demo in unity.Im using the fps demo code as my base for the tutorial because i dont want to give my personal multiplayer code away.In part 3 we will go over what just exactly that code does,and how it works,also how to edit it to do just what you want!

I dont have part 4 planned right now but by part 5 i hope to be going over how to add your own personal game to the multiplayer server and how other players will interact with you.

This is fantastic news mate, this is the only thing in Unity which scares the hell out of me :slight_smile:

Thanks for all the effort, it is really appreciated.

Cheers,

Jiff

No problem.Im currently working out how to set-up a car game for use with multiplayer.I will also add that to the tutorial.i cant find a hole lot of tutorials explaining cars with multiplayer.

Good to hear about a positive outcome in regards to multiplayer/networking. Almost re-sparks my interest in making a small multiplayer game, almost.

Lol almost!You should go for it.

Do you still have said prefab?

Cool stuff Tyler - happy you got it working

Can’t wait to see the tut!

I hope the tutorial is done before I begin working on my game. It’ll still be awhile, but hopefuly within the next month or two! :slight_smile:

If not, expect a lot of questions and PM’s from me! hahahha :stuck_out_tongue:

Haha.Yes emergence I do plan to have it done soon.I have the tutorial done up to the point where the server is running,people can join your game,and play it with you.Only thing im waiting on now is to go through the code and explain everything so you can edit it if needed.