This gem will just include the latest stable build source of jMonkeyEngine. That way your project won't need to include it because it's huge, and doing a git push with over 80mb of jar files takes a while when sitting at the airport.
Add this line to your application's Gemfile:
gem 'jmonkeyengine'And then execute:
$ bundle
Or install it yourself as:
$ gem install jmonkeyengine
- Install the gem
- View some jruby examples or the hello world tutorial
Basic usage (for now)
require 'jmonkeyengine'
# Load JME AppSettings for setting things like resolution, fullscreen, and title
java_import "com.jme3.system.AppSettings"
app_settings = AppSettings.new(true)
app_settings.title = "My game"
app_settings.fullscreen = true
app_settings.set_resolution(1024, 768) #old school resolution
MyGame.settings = app_settings
# Add in some colors
java_import "com.jme3.math.ColorRGBA"
view_port.background_color = ColorRGBA.new(ColorRGBA.random_color)- Add aliases to help aide ruby style programming for methods like
SimpleApplication#simpleInitApp - Add Ruby module namespaces with group requires like
require "jmonkeyengine/scene"forNode,Spatial,Geometry, etc... - Also adding individual requires so your code has
requireinstead ofjava_importall over the place. - Possibly add some sort of
rake scaffoldtype task to generate a basic folder structure for starting a game. - Add development rake task to check jmonkeyengine site for latest stable build and unpack
# Just include all 450,000 classes... Probably not a good idea?
require 'jmonkeyengine/all'
# Require all classes scoped to com.jme3.bullet.*
require 'jmonkeyengine/bullet'
JMonkeyEngine::BulletAppState
# Should this be...
JMonkeyEngine::CapsuleCollisionShape || JMonkeyEngine::Collision::Shapes::CapsuleCollisionShape
# I like the first way because it's shorter, but not sure if that will conflict with other classes.
# SimpleApplication that should boot a default blank window
require 'jmonkeyengine/app/simple_application'
SimpleApplication.new.start- Fork it ( https://github.com/[my-github-username]/jmonkeyengine/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request