Skip to content

farbod-s/Form-N-Fun

 
 

Repository files navigation

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.

Build Instructions

Download OpenCV for Android (I used OpenCV 3.0.0) from http://opencv.org/releases.html and extract the file. I extracted the file to C:\opencv\OpenCV-3.0-android-sdk (I am using Windows Machine)

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

For example on Windows local.properties look like this.

sdk.dir = C:\android_sdk

ndk.dir = C:\android_ndk

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

For example on Windows.

export OPENCV_PACKAGE_DIR = C:/opencv/OpenCV-3.0-android-sdk

Run the app after making the above changes.

Note:

I build it for all the Devices but I tested it on NEXUS 5X and Google PIXEL XL.

APP_ABI := arm64-v8a armeabi armeabi-v7a mips mips64 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 Nexus 5x then modify APP_ABI to APP_ABI:=arm64-v8a in Application.mk (NEXUS 5X has ARMv8 based CPU supports AArch64).

APP_ABI := arm64-v8a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.2%
  • C++ 1.6%
  • Other 0.2%