A mobile chess app for Android and iOS with local multiplayer via Bluetooth Low Energy.
A mobile chess app for Android and iOS with local multiplayer via Bluetooth Low Energy.
This devlog will have a bit of a ātechnicalā touch. First, we need to mention the reason we have this devlog, which is a recent GitHub issue. Its content suggests that my program should support older Android versions (possibly around Android 6).
At that time, my app only allowed installation on devices running Android 7+. When I came up with the idea, I also targeted Android 7+ because the BLE functions work well from this version. But coincidentally, I have a tablet at home running Android 5. A fleeting thot crossed my mind, and I decided to make the BTChess app compatible down to Android 5!! A move that I donāt know if itās genius or a mistake anymore.
The first thing I have to do is reinstall the Flutter SDK. The Flutter SDK I was using at that time supported minSdkVersion=24. That means the app built will only run on Android with API 24+ (that is, Android 7+). At first, I tried to lower it manually in the configuration files, but that didnāt seem to solve the problem, so I had to find and install an older version of the Flutter SDK. Then, I had to review all the project dependencies, check which ones do not support the current SDK version, and downgrade their versions. After that, I was able to build the app for Android 5+, but another issue arose. There is a slight difference in how the app ārequestsā Bluetooth permissions, and it took me an extremely long time to fix it so that it could work.
I think itās time to discuss the trade-offs. The benefits of this modification include the ability for BTChess to support Android 5+ instead of just Android 7+ (BTChess can be used on an Android tablet over 10 years old!). The āsmoothnessā of the app and the stability of the BLE gameplay mode were compromised as a result of having to downgrade several dependencies. Iāll make an effort to enhance and optimize these shortcomings.
So, do you think this modification is worthwhile š¤
If you feel it seems harsh and distant when I use the term āa person I donāt know at all.ā Yes, you will be surprised when you read on š¤
A week has passed, and I think I need to update the progress of this project. I have improved the UX a bit so that when the app crashes, it wonāt throw a long, scary exception message at you. Actually, at first, I thot keeping it as it was would be better (it really is better for debugging š„²). But for users, throwing the entire exception message out makes my app look unprofessional in some way, so I have to fix it.
You know what, just a few days ago I went on GitHub and saw that someone just starred my repo. I was very happy, but at that moment I didnāt think much until I went to the repo page of this project to check. An issue was created, you have no idea how happy I was at that moment. My project was simply created because I needed it, like I created it to solve my own problem when playing chess with friends. So, the moment I realized that what I created to solve my own problem could also help others made me extremely happy. Itās like the feeling of having done something useful, really wonderful, right?
Thatās it, I just resolved an issue opened by someone I donāt even know. But that āstrangerā turned that day into the best day Iāve had since joining Flavortown š„°
Log in to leave a comment
That day I went to school. with the intention of borrowing a few friendsā phones to test the BLE game mode feature. My friends happily agreed, and then they sat and watched me install the app. This time I tested it on two iPhones, the installation process went smoothly, everything looked fine. I told my friends that my app allows playing chess via Bluetooth connection. Everyone was impressed, and I was extremely excited to show them the result of my more than three months of work.
But whatever happens, happens. I had never tested this app on two iOS devices before, and the moment I tried to connect the two machines together, a gloomy error message appeared.āConnection Failedā. I tried again and again, but it was still the same, āConnection Failedā. I could feel the excitement fading away, followed by forced smiles. At that moment, my pride seemed to be shattered by that error message. I hurriedly uninstalled the app, returned the phone to his friend, and accompanied it with a forced smile and a thank youā¦
I went home and thot back on what happened that morning. Then I realized, normally when using the app, I always pair two devices together in the Bluetooth settings first to avoid errors, but the two iPhones, or rather the two iOS devices, cannot do that. The issue was identified, and I started to invest it and work on improving the app continuously for a week.
A week later, I borrowed my friendsā phones again. They let me borrow it too, but the excitement from before has diminished a lot. I understand, and I want them to see my achievement, something I am proud of. I installed the app, set everything up, took a deep breath, and tried playing in BLE mode. I try to join the lobby, the message āConnectingā appeared, and perhaps at that moment, anyone nearby could see how nervous I was. And my efforts were rewarded justly. The āOpponent Connectedā notification appeared on the screen, accompanied by the cheers of friends around. The sigh of relief along with the words āit works,ā finally, I did it.
P.S.: My friends are very excited about the app I made. Although itās still a bit buggy, the Bluetooth game mode is something truly novel.
A bunch of connection bugs between Android and iOS devices have been fixed. I have released version 1.0.0-alpha. 1 šÆ
To be honest, it has quite a few technical improvements, and Iāve also updated the README of the repo to make it look ācoolā š¤ and less boring to read (I learned from my experience after reading the reviews from you guys on the previous ship š¤).
The moment I was preparing to publish this new pre-released version. I was thinking about naming it with the suffix āalpha. 1ā or ābetaā because after all, itās a big change that Iām proud of. But from an userās perspective, this version is not enough to be called beta (or at least, thatās what I think š„²).
The last thing I want to say in this devlog is that even tho the app has an iOS version, the installation process is extremely difficult š
Iāve done my best to write an installation guide, so if youāre interested, you can check it out on my repo.
I would be very happy if you could give my repo a star, it would be a huge motivation š„°
Log in to leave a comment
Oh, I forgot to mention the video; itās a demo I made on the newly released version. The task of improving the app so that it can work on two different operating systems like this has taken more than a week of me sitting in front of my laptop coding and reading docs. I think I need to go touch some grass šāāļø
Actually, I spent time searching, and it turns out that I can get an IPA file without macOS Xcode stuff.
The secret here is the macOS runner from GitHub Actions!! Yeah, by using the macOS runner, I can build the IPA file. However, I donāt have an Apple Developer account to āsignā the code built, so things result in a mess that I have to put more work on to find a way to make that mess become an IPA file, and I did it. š¤ I also build a batch script to automate the process (which is showcased in the video), and I also document the instruction so you can do it too.
It means Iām able to test and build the app for iOS!! Yeah, without macOS, without Xcode, omg.
Log in to leave a comment
I build a custom BLE protocol, with the love of chess and lot of hard work. I put them together and I represent you BTChess - a mobile chess app with local multiplayer via Bluetooth Low Energy :yayayayay:
yoo and this is the demo of the first alpha version of my app. It is āusableā to some extent, although there are still many shortcomings, but overall the main functions are working. This took me a lot of time, I had to spend 2 weeks researching directions as well as drawing plans and designing the architecture for the app. Next is a week to create the custom BLE protocol for the app. then over 2 months of development and finally 1 week for testing and bug fixing (I hate the bug fixing part the most lol, itās extremely exhausting). Anyway, itās done now, and I hope you all like my idea for this app. If you have any suggestions, feel free to DM me on Slack or open an issue on GitHub.
P.S.: Actually, by the time of this devlog, Iāve only logged about 52 hours on Hackatime. I wish the time I spent researching and designing the protocol could be counted too, that would be great haha.
Log in to leave a comment
Yoo, so this is a short demo of the app. It only covers the hotseat mode of the app; the BLE mode will be shown in another video. I hope you guys like it. :D
Log in to leave a comment
Long time no adding devlog, and hereās one :O⦠I think itās almost done implementing this stuff and ready to ship, guys. I was implementing this game screen stuff through the Lunar New Year. Now Iām rushing to ship it ASAP.
Edit: Sorry cuz itās still a code editor pic but iām assure the next devlog will be the demo of this game
Log in to leave a comment
Working pretty hard these days =)) I plan to make a landing page for this project, cuz I put a lot of effort to it, and I love making it ^^ Hope this project brings me a macbook lol, to be able to build this app for iOS
Log in to leave a comment
Iāve implemented a full game screen and some widgets to show the player name, color indicator, captured pieces, and material advantage. I also did some work on the action buttons that do flip the board, undo, draw, resign, etc. The next phase would be the home screen and navigation features.
Log in to leave a comment
Another devlog coming right up. The app passed all the unit tests, and rn Iām implementing the UI. Time to find good assets for the app :DDD Take a look at that crazy pyramid!!
Log in to leave a comment
Iāve working on this project for a week now, and Iām here to update about the progress of making this app. Iāve implemented the core model and service for the app. Itās ready for the first unit test (to make sure everything function properly). I plan to learn some CI/CD to automate the testing progress
Hi, this is my first devlog, on my first project submitted to Flavortown. The idea I got is from my school, when I found it hard to play chess with my friend comfortably (my chess set is too bulky to bring to class, and playing chess on oneās phone is uncomfortable for me), which is why I thought at this time, āWhat if we can play chess on two phones connected through Bluetooth?ā Btw, we donāt have wifi at my local school, so Bluetooth is the first thing that comes to my mind when Iām thinking of a way to connect two phones. Also want to say hi to you guys; my name is Nguyen, you can call me Brandon, and I love to make things that solve real problems.
Log in to leave a comment