Inspiration
Upon seeing the TapStrap device, it reminded me of the little gestures people do at card games in casinos. I thought it would be fun to make a casino card game where you could control the game using the gestures commonly used in real life.
What it does
You can play blackjack against a standard casino dealer, betting to try and make money or lose it all. The game has keyboard controls, but everything can also be done with the TapStrap. The controls are based off the gestures commonly used at casinos- for example, tapping on the table is a hit, so tapping with the TapStrap indicates you want to hit for a card.
How we built it
We started by building an initial blackjack game using Processing in Python mode. This allowed us to easily make a UI and base game logic together. Meanwhile, we experimented with using the TapWithUs SDK and eventually integrated it into the game. After that, we simply made various improvements using what we had left.
Challenges we ran into
The first challenge was environment- of our teammates, we used a variety of operating systems: Windows, MacOS, and Ubuntu. Since the TapWithUs SDK wasn't developed for Linux systems, it was particularly difficult to do anything in Ubuntu. However, we eventually got a setup that worked and we could all run the code in one way or another.
The second challenge was using the Python based SDK. Processing actually compiles its Python into Java code, which meant we couldn't use common Python libraries like numpy in our game code. This also meant we couldn't use the SDK. We got a (very hacky) workaround where we used the networking tools available in processing to connect to a server on localhost. The server sent all the data for the TapStrap to the game to be used in the game logic.
Finally, having low experience with most of our tools, we couldn't plan much design. Although design can be a great way to start a hackathon, our code became much hack-ier because we didn't. By 3am, it was difficult to read and edit, but we were more familiar with the tools so we made attempts to clean it up throughout the night. It's still terrible code (but it works).
Accomplishments that we're proud of
1) Getting it to work. Seriously.
2) Some of the visual design elements. None of us had any experience using Processing for Python before so it was new using it to build an entire game. It has relatively primitive tools (compared to engines like Unity), so even small animations took a fair amount of work.
3) The feel of the game. Casinos are meant for recreational, so it wouldn't make sense if our game didn't feel recreational. Using the TapStrap, we found that players could lean back and relax, controlling the game on the desk or even their lap. Compared to the usual computer stance of being hunched over your keyboard (like we have been since noon yesterday), this is refreshing and relaxing. Anybody familiar with the rules of blackjack can just pick up the game very quick.
4) Our ownership. Apart from a set of playing card pngs, Flask, and the SDK itself, we wrote almost everything from the ground up ourselves. We're not using something prebuilt to make our product look flashy or just using some other API to do most of the work for us- what we're showing off is our own work. Additionally, it does a really great job at highlighting the TapWithUs device.
We also stayed up all night (mostly).
What we learned
We all experimented with a ton of new tools. Two of our members were novices with Python, and the third could teach a lot to the other two members. On the other hand, the member most familiar with Python has never built anything with a drawing based GUI toolkit like Processing, so he learned quite a lot as well. Having to use the Flask server, we learned more about HTTP and sending data across sockets.
What's next for Tap BlackJack
Using so many unknown technologies, we only really dived into some basic usages of the SDK available to us. The new SDK gave access to raw data from an IMU on the device, but we simply weren't prepared to attempt to process that data. However, going forward, perhaps with more than 24 hours, and a better programming environment to group in, we could aim more ambitiously, However, Blackjack won't be able to take advantage of this.
As for improvements to Tap BlackJack itself, it could do with some graphical improvements or functionality buffs, like the inclusion of multiplayer or even different casino games like poker. As a first go at using the SDK, it was lots of fun and turned out surprisingly well, However, it could never make it to a production app unless you basically rewrite it with better planning. This would be a great opportunity to try out the other SDKs available, particularly those for mobile apps.
Built With
- flask
- processing
- python
- tapwithuspythonsdk
Log in or sign up for Devpost to join the conversation.