Giter Club home page Giter Club logo

igravitystudios / matchimals.fun Goto Github PK

View Code? Open in Web Editor NEW
160.0 6.0 31.0 192.81 MB

🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web

Home Page: https://www.matchimals.com

License: MIT License

HTML 1.12% JavaScript 86.44% Java 5.62% Ruby 1.03% Objective-C 0.15% Starlark 0.70% Makefile 0.56% C++ 2.56% Objective-C++ 1.63% Shell 0.18%
react reactjs boardgame boardgame-io turn-based puzzle puzzle-game card-game card-games javascript

matchimals.fun's Introduction

Matchimals icon

Matchimals logo

Matchimals.fun

an animal matching puzzle card game 🦁 🃏

screenshot of matchimals.fun game

How to play

  1. 1-4 players take turns connecting the top card from the deck to the existing cards on the table.
  2. If there isn't a valid connection to be made, then the player must pass.
  3. The game ends when all the cards from the deck have been connected on the board.

About

Matchimals.fun was built as a proof-of-concept by Chris Heninger (@chrisheninger) and Hannah Heninger (@mshannahnv). The gameplay is inspired by a 1959 card game called Busy Bee. 🐝 🃏

Matchimals.fun is made for kids of all ages. It aims to provide entertainment and improve pattern recognition skills through fun visuals of animals, colors, and numbers.

This project is sponsored by iGravity Studios– a custom software shop with an emphasis on UI/UX development– based in Phoenix, Arizona. 🏜 ❤️

Want to contribute?

This game has been made open source to help others looking to learn more about JavaScript, BoardGame.io, and React-Native applications.

Find a bug or have a question? Feel free to open an issue or submit a pull request!

Development

React-Native development requires a number of tools to be installed and configured on your machine for the bundler and simulators to run properly.

If you have never worked on a native app before- you'll need to follow the directions for setting up a project using the React-Native CLI Quickstart.

Once you've configured your machine for React-Native development- getting the Matchimals.fun app to build should only require a few steps:

  1. Fork the repo
  2. Install dependencies (yarn or npm i)
  3. Run the metro bundler: yarn start
  4. In a separate terminal- run the emulator: yarn run ios

Special thanks

Nicolo Davis and collaborators for the turn-based game engine boardgame.io.

Facebook and collaborators for the wonderful libraries React and React-Native.

iGravity Studios for publishing the game to the Apple App Store and Google Play Store.

matchimals.fun's People

Contributors

chrisheninger avatar danieldiaz14 avatar dependabot[bot] avatar mshannahnv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

matchimals.fun's Issues

Scroll window to center card

On initial game load, the window should scroll to put the center card in the middle of the viewport.

This will be a temporary/simple fix to #9 and other viewport/zooming related issues.

Who won?

Need to add a screen to the confetti at the end that says "Player 1 Wins" or whatever. 🤷‍♂

Split deck between two players

Let's initially split the deck between two players. We'll eventually update the UI to have a game set up step that prompts for number of players before kicking things off.

Pinch-zoom / UI scaling 🔍

Game is hard to play on a phone– could benefit from some UI scaling– along with pinch-zoom to adjust the scale.

Started some work here:

// Zoom
// if (gestureState.numberActiveTouches === 2) {
// // WIP: Requires significant updates to the way we're handling card drop
// let dx = Math.abs(
// e.nativeEvent.touches[0].pageX - e.nativeEvent.touches[1].pageX
// );
// let dy = Math.abs(
// e.nativeEvent.touches[0].pageY - e.nativeEvent.touches[1].pageY
// );
// let distance = Math.sqrt(dx * dx + dy * dy);
// let scale = (distance / this.distance) * this._previousScale;
// // minScale to maxScale
// if (scale > 0.5 && scale < 2) {
// // this.setState({ scale, lastMovePinch: true });
// this._tableStyles.style.transform = [{ scale }];
// }
// }

I think I want to rewrite it using translate instead of top/left for positioning the viewport– this will require changing a bit of the card drop logic.

Colors 🎨

A few of the animals are missing background colors.

I'd also like to explore a different palette– the cards are vintage but the logo is pastel. Need to figure something out. 🤔

Points

Each animal on the card has a point value– successful connections should add points to a player's total.

Cannot read property 'top' of undefined

I am getting the error "Cannot read property 'top' of undefined" I checked the file "snapshots.js" found the value is null, can you tell me the solution to this?
Screenshot 2023-02-14 at 13 19 45
Simulator Screen Shot - iPhone 14 - 2023-02-14 at 13 19 04

The application crashes when I try to open the application

Project Information

Expected behavior

When I try to open the application, then the application should be opened. So that the user can easily play the game

Actual behavior

The application crashes when I try to open the application

How to reproduce

  • Download the application

  • After installing the application, try opening it

  • Note the BUG

  • Browser/App version: Current Version 0.1.0

  • Operating system: 6.0

Recording Of The Bug

20190529_032408

Logcat

E/AndroidRuntime( 7954): FATAL EXCEPTION: create_react_context

E/AndroidRuntime( 7954): Process: com.matchimals, PID: 7954

E/AndroidRuntime( 7954): java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so

E/AndroidRuntime( 7954): 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)

E/AndroidRuntime( 7954): 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)

E/AndroidRuntime( 7954): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)

E/AndroidRuntime( 7954): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)

E/AndroidRuntime( 7954): 	at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:31)

E/AndroidRuntime( 7954): 	at com.facebook.react.bridge.NativeMap.(NativeMap.java:19)

E/AndroidRuntime( 7954): 	at com.facebook.react.jscexecutor.JSCExecutorFactory.create(JSCExecutorFactory.java:25)

E/AndroidRuntime( 7954): 	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:944)

E/AndroidRuntime( 7954): 	at java.lang.Thread.run(Thread.java:818)

Deck design update

Per matt's recommendation– the back of the deck probably shouldn't have an animal on it– it's a bit distracting and unnecessary. Would be nice to experiment with a subtle pattern + the logo.

Additionally– in order to make the "active" vs "inactive" player stick out a bit more– try implementing a scale transform on the inactive deck along with a smooth transition.

Sidebar responsive styling

Need to make the sidebar design and styling properly responsive and scaled.

If the device is landscape– the user should have a sidebar with the logo / deck / pass
If the device is portrait– the user sidebar should be rotated to be along the bottom of the viewport.

Needs to be tested on all the devices with all the viewports.

Native App – iOS, Android, and Web

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

Cards can be stacked 🐛

Logic is allowing cards to be stacked if valid. 🙈

Update: While it doesn't appear to be adding points– it is leading to the turn being ended. Whether or not the card is removed from the player's deck or if the turn just ends will need to be debugged.

Optimize background image

The wood background image is pretty big (~380kb). Could take the resolution down a bit, and serve up different images based on device.

Tests

Would be nice to have some unit tests to make sure when we push changes we don't break functionality.

Will need to think through how/what to implement– open to suggestions/recommendations/pull-requests/etc.

Victory logic

When all players' decks are empty– we should end the game and throw a message on the sidebar.

We'll eventually have a proper UI, scoring (#5), and a "play again?" button (#13).

Nameplate: Choose your animal 📛 🐯

  • Update "Player 1, Player 2, etc." to just read from the animal name
  • Update Nameplate component to trigger an animal select screen when pressed
  • Update game state with new animal on save - don't clear any existing game progress

Reset Game

Should have a button / the ability to reset the game (we'll need it for the "Play again?" button #4), current method is just to page refresh.

First card for each player should be connectable

Sometimes it requires a few passes before the game gets moving.

In order to help users understand the game better (and to speed up the game), the first card for each player should be able to connect to the center card. (semi-related: #6)

Music / Sound Effects 🎶

Need to find some good open-source background music and sound effects.

Background music

  • Option 1

Sound effects

  • Cards matched
  • Cards mismatched
  • Pass button

Web version

Want to replace the legacy https://www.matchimals.fun/ with a react-native-web version of the app itself.

I had this working but I think it broke when I included react-native-animatable– might need to do some babel magic to get it to properly import and use react-native-web.

Game has a chance to be unwinnable

Since we introduced the 3-card intro rather than a single card– it is possible to get to the end of the game with 1-2 cards left and not be able to place them.

We need to update the initial game logic to draw the starter cards from the deck rather than using predetermined starters like we do currently. (constants/cards.js)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.