Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Menoites · Jan 16, 2012 at 07:10 AM · 2diosiphonebluetooth

Native iPhone Bluetooth Multiplayer?

So I want to create a 2D Tank game that you can connect to another iPhone over Bluetooth and battle in a stadium. I have everything working, but now I just need to get the Bluetooth connection and I am at a loss. I have searched around and it seems that in 3.x Unity was supposed to get a native Bluetooth API, but apparently it didn't or if it did I just cannot find it.

If I could choose, I would rather not pay for it (I'm an Indie developer, not a massive corporation) and I would rather it be simply [i]Bluetooth[/i] connection - No GameCenter or OpenFeint, just simply connect over Bluetooth and play.

Comment
Add comment · Show 9
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · Jan 16, 2012 at 09:40 AM 0
Share

Just for the record -- in iOS/$$anonymous$$ac development the whole WiFi/Bluetooth thing is pretty annoying. (Or depending on how you look at it, is really great!) A lot of the apple systems are done so that there is "no difference" between Bluetooth and WiFI. Thus if you're just starting with networking on the $$anonymous$$ac/iOS and you use their "game kit" system (a beginner's networking library) you actually - and this is pretty frustrating - CANNOT TELL, OR DECIDE whether the user is using Bluetooth or WiFi. As a practical matter (i.e. by looking at logs), I think incredibly few games are ever played using bluetooth - everyone just has a WiFi hub somewhere these days. The bottom line is it's quite possible that you should just "forget about the issue" and when you have a sled working, you'll see it works either with WiFi or (if no WiFi available) with bluetooth. If you are already a $$anonymous$$ac developer you will know all this but it might help someone else reading in the future.

avatar image Menoites · Jan 16, 2012 at 07:11 PM 0
Share

Well that would be fine - It doesn't really matter whether it's over WiFi or Bluetooth, all that matters is that there is a device-to-device connection and there is no connection with GameCenter, OpenFeint, Plus+, or another of the other game networks out there for iOS.

avatar image Fattie · Jan 16, 2012 at 07:22 PM 0
Share

Hi $$anonymous$$enoites -- then you have no probelm. Just go ahead and start learning about Unity's networking system.

Are you new to network program$$anonymous$$g? if so, be prepared for plenty of learning. Networking is just plain hard. But Unity's system is about as easy as it gets. To be clear, you will never have to touch $$anonymous$$ac Networking, it is totally "automatic" and involves no program$$anonymous$$g.

Enjoy.

avatar image Menoites · Jan 16, 2012 at 07:25 PM 0
Share

So I can use the Unity Network system (http://unity3d.com/support/documentation/ScriptReference/Network.html) and it will work for iPhone/iPad as well, or is it simply $$anonymous$$ac/PC networking only, and I have to use a plugin (Like Prime31's Plugin below) for iPhone/iPad networking?

avatar image Fattie · Jan 16, 2012 at 07:38 PM 0
Share

Ah -- yes, ABSOLUTELY CORRECT. It is 1000000% iPhone / iPad.

In fact, I would say 999 out of 1000 times it is used by developers, it is used for iPhone/iPad networking.

(I wouldn't be surprised if it has NEVER been used for $$anonymous$$ac/PC ! :) )

So you're completely golden. By the way, regarding the "kit" mentioned below and similar. It is completely confusing to me what they are offering: no networking could be simpler than the Unity Networking system, so I'm not really sure what they are selling.

One guy on the asset store sells a system that is essentially "a really good and complex example of how to use the Unity Networking System." I don't really recommend it - just jump in and start learning about, as you say, the Unity networking System. Enjoy.

if you are BRAND NEW to networking program$$anonymous$$g, expect a learning curve. (I have no clue if you are a newbie or an oldie.)

All network program$$anonymous$$g is inherently difficult.

Just for the record: you may be wondering "How good is the Unity Networking System" -- that is to say compared to the difficult chore of writing absolutely native iOS networking code (presumably using - let's say - CocoaAsyncSocket and the like). In our opinion - it's very good indeed. You won't be disappointed. If you spend 12 months hand-crafting iOS networking code, and you're an El33t iOS developer, and you're a personal friend of Quinn, you can maybe get faster connections (I mean faster join-together time) but the actual efficiency of the networking is fantastical, it's great. Enjoy!!!!

Your problem is solved.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dannyskim · Jan 16, 2012 at 07:15 PM

I know you said you'd rather not pay, but Prime31's plugins for Unity are great and are affordable for an Indie studio. His GameKit bluetooth plugin for unity is only 50 dollars, which I believe is well worth it's weight in functionality. I haven't tried it personally, but if it's anything like his 5 other plug-ins i've bought, it should be relatively easy to integrate if you know what you're doing.

http://www.prime31.com/unity

Quote from prime31.com and his plug-in for bluetooth:

Have you ever wanted to add Bluetooth or WiFi multiplayer to your game but didn't want to deal with the all the complexity of networking? Now you can add multiplayer support to your game in just one line of code! If you want to kick it up and notch and add voice chat it's just one more line! It is really THAT easy! Check out a simple example video here. For the adventurous types, the GameKit Bluetooth/WiFi and Voice Chat plugin gives you all the tools you need to make your own game lobby fully customized to match your games style!

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Menoites · Jan 16, 2012 at 07:18 PM 0
Share

Haha yeah, if I couldn't find a free one I was going to go with Prime31's Bluetooth plugin. It seems the best of the best plugins out there, and it seems quite simple to use. Also seeing as how a lot of the other Unity projects I am working on require a Bluetooth/WiFi connectivity as well, the $50 might just become chump change.

Thanks Danny :) Just wondering - Which of his plugins have you used and have been easy to work with? I was also looking into using his iCloud and possibly Store$$anonymous$$it but I really have nothing to go on for those...

avatar image dannyskim · Jan 16, 2012 at 07:27 PM 0
Share

I'm currently using his TapJoy, Store$$anonymous$$it, Free 2dToolkit, GameCenter, and Etcetera plug-ins. They've all been fantastic to use as long as you understand his usage of delegates, events, and actions and how to add your code into his base to tailor it to your project.

Trying to learn Objective-C then creating a wrapper for all of these plug-ins would have literally taken me 4 - 6 months, making the REUSABLE purchases of these plug-ins invaluable and a moot price point for me. That's assu$$anonymous$$g I make any money off my projects of course, =p.

Storekit was a breeze to implement after learning how to deal with the delegate and actions calls. The only thing that's missing from the Store$$anonymous$$it is the native access to the Apple Spinner to freeze the Unity thread when a transaction is communicating and being processed. This is included in the Etcetera plug-in separately, which is why I decided to purchase it.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Does Unity take care of unseen objects? 2 Answers

[Character Controller] Jump-Movement in other direction while beeing in midair 0 Answers

Is unity the way to go for a 2D game for iOS? 2 Answers

why unity IPA file size increased after installation as compare to unity APK? 1 Answer

Unity 5.0.1f1: iOS client to Linux server RPC silent failure 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges