Code Monkey home page Code Monkey logo

form-n-fun's Introduction

Form-N-Fun

Form โ€˜Nโ€™ Fun is an android maze game based on real time computer vision. The uniqueness of this game is that the user can draw his own mazes on a white paper with pen/pencil and play. The game detects the maze and user can play using the accelerometer. This android app uses contours algorithms in OpenCV to detect maze that is drawn on the paper. This app uses JBox2d engine for simulating the rigid bodies.

Download APK

Apk can be found in apk folder, download and install the apk.

Modifications if needed

  1. Resolution: Resolution is fixed to 1280x960 (less than or equal). Resolution can be changed by modifing this line.

  2. Limiting the Pitch and Roll: Pitch and Roll are limited to 3.8, limiting value can be changed by modifing MIN and MAX. Here is the implementation of limiting function.

  3. Force on the ball: Force on the ball can be changed here.

  4. Color of the ball: Color of the ball can be modified here.

Download Android NDK r16b from https://developer.android.com/ndk/downloads/older_releases.html and extract the file, On Mac I extracted to /Users/Name/Documents/Android/android-ndk-r16b

Open the local.properties file and set ndk.dir to the path of Android NDK folder.

on Windows local.properties

sdk.dir = C\:\\android_sdk
ndk.dir = C\:\\android_ndk

on Mac local.properties

sdk.dir = /Users/Name/Library/Android/sdk
ndk.dir = /Users/Name/Documents/Android/android-ndk-r16b

Build Instructions with CV4:

Download OpenCV for Android (I used OpenCV 4.1.0) from http://opencv.org/releases.html and extract the file. I extracted the file to C:\Opencv\OpenCV-android-sdk-4.1.0 (On Windows) or /Users/Name/Documents/Android/OpenCV-android-sdk-4.1.0 (On Mac)

Open the Android.mk file in jni folder, modify the export OPENCV_PACKAGE_DIR to extracted OpenCV Path

on Windows.

export OPENCV_PACKAGE_DIR = C:/Opencv/OpenCV-android-sdk-4.1.0

on Mac.

export OPENCV_PACKAGE_DIR = /Users/Name/Documents/Android/OpenCV-android-sdk-4.1.0

Run the app after making the above changes.

Build Instructions with CV3:

Download OpenCV for Android (I used OpenCV 3.4.1) from http://opencv.org/releases.html and extract the file. I extracted the file to C:\Opencv\OpenCV-android-sdk-3.4.1 (On Windows) or /Users/Name/Documents/Android/OpenCV-android-sdk-3.4.1 (On Mac)

Open the Android.mk file in jni folder, modify the export OPENCV_PACKAGE_DIR to extracted OpenCV Path

on Windows.

export OPENCV_PACKAGE_DIR = C:/Opencv/OpenCV-android-sdk-3.4.1

on Mac.

export OPENCV_PACKAGE_DIR = /Users/Name/Documents/Android/OpenCV-android-sdk-3.4.1

remove LOCAL_CPPFLAGS in line 14 in Android.mk to build with CV3

LOCAL_CPPFLAGS := -DCV4

Run the app after making the above changes.

Note:

I build it on Mac for all the Devices but I tested it on Google PIXEL XL.

APP_ABI := arm64-v8a armeabi-v7a x86 x86_64

If you want to build the App for a particular device then modify APP_ABI to device ABIs in Application.mk in jni folder.

For example, to build App only for Google PIXEL XL then modify APP_ABI to APP_ABI:=arm64-v8a in Application.mk (Pixel XL has ARMv8 based CPU supports AArch64).

APP_ABI := arm64-v8a

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.