godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.11k stars 69 forks source link

Godot Bluetooth #145

Closed DisDoh closed 4 years ago

DisDoh commented 4 years ago

Describe the project you are working on:

I'm working on a bluetooth Poker on android which i want to recode and ameliorate in gdscript and using godot compatibility to port it on ios and android. My actual App

Describe the problem or limitation you are having in your project:

There's no godot plugin for bluetooth.

Describe how this feature / enhancement will help you overcome this problem or limitation: The game is a multiplayer one with bluetooth as communication process.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

The plugin or the feature should be able to handle bluetooth communication process that mean to be able to send and receive data to multiple connected devices.

Describe implementation detail for your proposal (in code), if possible:

There is an open source library for android which handles bluetooth communication and could be useful for the implementation. Ketai.org

If this enhancement will not be used often, can it be worked around with a few lines of script?: No, don't think so. Is there a reason why this should be core and not an add-on in the asset library?:

I think it's place is in the asset library.

Calinou commented 4 years ago

I think it's place is in the asset library.

In this case, you don't need to open a proposal here :slightly_smiling_face:

This feature can likely be offered as a GDNative add-on or C++/Java module.

DisDoh commented 4 years ago

Where should i post this proposal as module?

Calinou commented 4 years ago

@DisDoh You could post this proposal in one of the other community channels. Still, remember that in the open source world, people generally work on what they want to work on (unless you pay them). Therefore, don't expect too much if you're not ready to do it yourself or pay someone to do it.

willnationsdev commented 4 years ago

@DisDoh You can post this on the unofficial Godot Ideas repository. Also, there is a Godot 2.1 Bluetooth module. Don't know how well it works though. Either way, it could get you started on implementing a GDNative-based solution, or you could just update it to work with Godot 3.1 or 3.2 and then keep it as a module when you build your iOS/Android export.

Edit: Oh yeah, I forgot that Android has the new plugin system too (not sure how that works, but...). Perhaps you could use that to make it downloadable too. Would only be for Android though maybe? Idk.

girng commented 4 years ago

Perfect use case to show the power / awesomeness of GDNative? Me likey

lentsius-bark commented 4 years ago

mmm, bluetooth!

DisDoh commented 4 years ago

https://github.com/DisDoh/GodotBluetooth

Here it is the start of the GodotBluetooth module now connecting between two android devices and ability to send a string. I would complete it day after day...

lentsius-bark commented 4 years ago

You're awesome!

DisDoh commented 4 years ago

https://github.com/DisDoh/GodotBluetooth

So for now it's able to communicate with more than one android device and to communicate with String Array and Int array. So the next step is to be able to implement BLE(Bluetooth Low Energy) to be compatible with IOS... If anyone willing to participate here is the discord group: https://discord.gg/GrmdnR

Calinou commented 4 years ago

I'll close this, as this feature isn't essential to most users and can be provided by a third-party module as demonstrated above.