Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 77 lines (56 sloc) 2.212 kB
571788d @blaix Initial commit
authored
1 # jMonkeyEngine 3 with JRuby
2
3 This is an example/template for game programming using [jMonkeyEngine 3][1]
4 with [JRuby][2]. Including multi-platform packaging using [Rawr][3].
5
6 [1]: http://jmonkeyengine.com/
7 [2]: http://www.jruby.org/
8 [3]: http://rawr.rubyforge.org/
9
4266f19 @blaix Update README
authored
10 ## Getting started:
11
3b94132 @blaix Update README
authored
12 Take a look at `src/ruby/main.rb`. It's a port of
2f50eb2 @blaix Simplify example code and docs.
authored
13 [the "Hello SimpleApplication" tutorial on the jme wiki](http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_simpleapplication)
14 with additional code to illustrate using your own ruby and java classes alongside each other.
4266f19 @blaix Update README
authored
15
16 ### Running the sample code:
17
2f50eb2 @blaix Simplify example code and docs.
authored
18 The sample code draws a blue box, lets you walk around with the wasd keys,
19 look around with the mouse, and hit `ESC` to exit. It also prints some
20 messages to the console to illustrate calling your own custom ruby and java
21 classes.
22
23 Make sure you have [JRuby][1] and [Rawr][3]. I'll leave the specifics up to you,
24 but I highly recommend using [rvm](https://rvm.beginrescueend.com/).
4266f19 @blaix Update README
authored
25
26 To run the code directly with jruby:
27
28 rake rawr:compile
29 jruby src/ruby/main.rb
30
b3f812a @blaix Update README
authored
31 *You only need the compile step if you have java code under `src/java` (which we do).*
4266f19 @blaix Update README
authored
32
b3f812a @blaix Update README
authored
33 Or to package and run the app as a jar:
4266f19 @blaix Update README
authored
34
35 rake rawr:jar
36 java -jar package/jar/jme3-jruby-template.jar
37
b3f812a @blaix Update README
authored
38 Or to package and run the app as an OS X .app:
4266f19 @blaix Update README
authored
39
40 rake rawr:bundle:app
41 open package/osx/jme3-jruby-template.app
42
b3f812a @blaix Update README
authored
43 Or to package and run the app as a Windows .exe:
4266f19 @blaix Update README
authored
44
45 rake rawr:bundle:exe
2f50eb2 @blaix Simplify example code and docs.
authored
46 package/windows/jme3-jruby-template.exe
571788d @blaix Initial commit
authored
47
8e42d66 @blaix Bugfixes and better documentation.
authored
48 ## Important files/directories:
571788d @blaix Initial commit
authored
49
50 jme3-jruby-template
51 |
52 |__lib
53 | |
8e42d66 @blaix Bugfixes and better documentation.
authored
54 | |__java # => Third-party java libraries (jars)
55 | |
56 | |__ruby # => Third-party ruby libraries (unpacked gems)
571788d @blaix Initial commit
authored
57 |
58 |__package
59 | |
60 | |__classes
61 | |
2f50eb2 @blaix Simplify example code and docs.
authored
62 | |__java # => *.class files compiled from the *.java files under src/java
8e42d66 @blaix Bugfixes and better documentation.
authored
63 | |
2f50eb2 @blaix Simplify example code and docs.
authored
64 | |__ruby # => *.class files compiled from the *.rb files under src/ruby
571788d @blaix Initial commit
authored
65 |
66 |__src
67 |
2f50eb2 @blaix Simplify example code and docs.
authored
68 |__java # => Your own java source code lives here
571788d @blaix Initial commit
authored
69 |
2f50eb2 @blaix Simplify example code and docs.
authored
70 |__ruby # => Your own ruby source code lives here
71 |
72 |__main.rb # => The file that gets executed on startup
8e42d66 @blaix Bugfixes and better documentation.
authored
73
571788d @blaix Initial commit
authored
74 ## TODO:
75
8e42d66 @blaix Bugfixes and better documentation.
authored
76 * using gems...
Something went wrong with that request. Please try again.