The OhHeckYeah video games, written with Java & Procesing, built on top of Haxademic.
===
- If you're on OS X, it's helpful to see hidden files. Run this command in Terminal:
defaults write com.apple.finder AppleShowAllFiles YES
- Download the standard Eclipse IDE for Java development, and the Java Development Kit itself:
- Eclipse (standard 32-bit)
- Java for OS X and or JDK for Windows and other platforms
- You'll also need Java 7 or Java 8 if you want to use the Leap Motion. After installing these later JDK libraries, click Eclipse -> Preferences then Java -> Installed JREs, and click Search... to have Eclipse find the newly-installed library.
- Clone or download the
ohheckyeah-games-java
project - Open Eclipse and: File -> Import -> General / Existing Projects into Workspace
- Choose the
ohheckyeah-games-java
directory that you cloned/downloaded, press Finish, and the project should be ready to use, albeit with some errors.
- Choose the
- Download and install the Processing 2.x core libraries (they're too big to include in this project). Add the jars to your build path, as well as the libraries that come with Processing (video, minim, etc.):
- Download Processing and right-click the application. Select Show Package Contents
- Within the package, navigate to
Contents/Java/core/library
- Copy the contents of this directory to
ohheckyeah-games-java/lib/processing-2/core
(create this directory if it doesn't exist)
- Copy the contents of this directory to
- Within the application package again, navigate to
Contents/Java/modes/java/libraries
, and again copy the contents. Paste them intoohheckyeah-games-java/lib/processing-2/libraries
- Download and install the latest SimpleOpenNI (Kinect) drivers with the instructions for your particular platform.
- Unzip and copy the
SimpleOpenNI
directory into your project'slib
folder - This is most likely to work with the 1st-gen Kinect model 1414
- If you have a model 1473 Kinect camera, you might try this build of the SimpleOpenNI library, but this isn't guaranteed to work
- Unzip and copy the
- Download and install the latest Leap Motion for Processing library.
- Unzip and copy the
leap-motion-processing
directory into your project'slib
folder - This directory should be renamed to
LeapMotionForProcessing
- Right-click the project root folder and click Properties
- Click the Java Build Path section, and click the Libraries tab
- Click the accordion arrow next to
LeapJava.jar
andLeapMotionForProcessing.jar
- For each, select
Native Library Location
, then theEdit...
buttons to the right - Click
External Folder...
and find the directory with the c++ libraries for your platform. For OS X, it would look something like:ohheckyeah-games-java/lib/LeapMotionForProcessing/library/macosx
- For each, select
- Make sure you've installed the latest Leap Motion software from the system control panel and turn on auto-updates
- Also make sure to install the latest Leap Motion SDK
- Run the Leap Motion app, calibrate your Leap, and make sure that the red Infrared lights are turned on and that the unit is running
- Unzip and copy the
- In the Package Explorer in Eclipse, right-click the
lib
directory and select Refresh. This will let Eclipse know that you've added the appropriate libraries on your file system. - Make sure you're compiling with at least Java SE 6 (1.6):
- Right-click the
ohheckyeah-games-java
project in the Package Explorer or Navigator window and click Properties - Click the Java Compiler section and check the Enable project specific settings box on the right
- Select 1.6 as your Compiler compliance level, if possible
- If "Configure the Installed JREs" is shown at the bottom of this window, click that, make sure the 1.6 item is checked, then click OK.
- Right-click the
- If you're using a Leap Motion controller, make sure you're compiling with Java SE 7 (1.7) or Java SE 8 (1.8):
- In Run Configurations for your application, click the JRE tab and select Alternate JRE, then select Java SE 7 or Java SE 8 from the dropdown
- Right-click on any of the games' main .java files within
src/org/ohheckyeah/games
(Catchy.java, for example) and choose Run As -> Java Application from the menu. This will create a run configuration for the game, but you'll likely crash due to running out of memory. - In Run -> Run Configurations, select your app and add the following VM Arguments when running the Java Application to increase memory allocated to your app. This is a minimum of 1gb and a maximum of 2gb of RAM:
-Xms1G
-Xmx2G
- Run the application again, and you should hopefully have a game running, with mock controls.
- Find the game's .properties file in
data/properties
to turn on a hardware controller by settingkinect_active
orleap_active
to true
OhHeckYeah uses the following Java & Processing libraries, which I've included in this repository unless they're too big:
- Processing (view the Processing for Eclipse instructions)
- ESS
- simple-openni
- toxiclibs
- OBJLoader
- oscP5
- minim
- Geomerative
- UDP Processing Library
- ControlP5
- Leap Motion for Processing
General Use / Tips
- If you want to wipe your
bin/
directory, you'll have to do a Project -> Clean… in Eclipse afterwards.