igravitystudios / matchimals.fun

🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web
https://www.matchimals.com
MIT License
162 stars 31 forks source link

Native App – iOS, Android, and Web #25

Closed chrisheninger closed 5 years ago

chrisheninger commented 5 years ago

I've spent the past couple of months rebuilding the app using React Native... this issue will serve as a placeholder for merging the two codebases together (the native code is currently private).

matchimals-app

julienroulle commented 5 years ago

Any update on the react native side? I've been using your project to teach me boardgame.io and i plan to use react-native to create a boardgame based on drag and drop, but i'm stuck since react-dnd is not supported in native .. I'd be glad if maybe we could join forces on this, or at least share your advancement with me :)

chrisheninger commented 5 years ago

Hey @julienroulle– I've got a separate repo that's still private with everything I've done for Native. Most of the game logic stayed the same– but there was a big rewrite of the UI and how I handle dropping the card and tracking where it lands.

I had taken a big break from working on it but just happened to pull it up last weekend and get everything running again– I'll be sure to notify you when I've got it in a place to share. :)

julienroulle commented 5 years ago

how I handle dropping the card and tracking where it lands.

Hey @chrisheninger , This would interest me so much right now as I am trying to do the same. Would you mind sharing your files please? Would be such a huge leap forward for me not to reinvent the wheel ;)

Looking forward for your response, Julien

chrisheninger commented 5 years ago

I'll do what I can to open source all the code soon so you can pull it and try it locally– but I copied the main three files with functions related to drag and drop into a Gist for now.

https://gist.github.com/chrisheninger/f9208ca5f88c3ca3d851ccae536728f8

A quick overview:

That's not everything but I hope it's enough to point you in the right direction. It's definitely a bit messy but I was able to get it to work and was happy with the results– I've got a separate branch where I'm experimenting with pinch+zoom along with the pan gesture but it's not in a good enough state to share. 😅

julienroulle commented 5 years ago

Man this looks very promising! Thank you so much for sharing this with me, I'll be sure to share the result with you once I include it in my personal project 👍

chrisheninger commented 5 years ago

You inspired me to get the native app finished so I can post it to the App Store. Thank you! 😄

Here's a little demo video: https://youtu.be/bk5F-ibFFQo

The app is in review now– once it's been approved by Apple and put on the store (it's being released for free) I'll make the code public. 🙂

chrisheninger commented 5 years ago

@julienroulle Just released all the react-native code to this repo. :)

App is available on iOS: https://itunes.apple.com/app/id1348821168 Android: https://play.google.com/store/apps/details?id=com.matchimals

Happy to chat through any of it if you have questions– I'm gonna be rewriting it a bit down the road so I can add pinch-zoom but I think the core bits will remain the same.