Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

upgrading jme3. using newer jruby. app boots with start screen. still…

… needs transition to start the game
  • Loading branch information...
commit 7ccdbad613f54a45ae24e69f36f55f69d4b9df12 1 parent 9da4264
@jwoertink authored
Showing with 64 additions and 60 deletions.
  1. +1 −1  .rvmrc
  2. +2 −1  lib/maze_craze/controllers/StartScreenController.java
  3. +14 −14 lib/maze_craze/imports.rb
  4. +46 −43 lib/maze_craze/maze.rb
  5. +1 −1  lib/waves.rb
  6. BIN  libbulletjme.jnilib
  7. BIN  liblwjgl.jnilib
  8. BIN  vendor/jme3_2011-11-13.jar
  9. BIN  vendor/jme3_2012-12-20.jar
  10. BIN  vendor/lib/eventbus-1.4.jar
  11. BIN  vendor/lib/jME3-blender.jar
  12. BIN  vendor/lib/jME3-bullet-natives.jar
  13. BIN  vendor/lib/jME3-bullet.jar
  14. BIN  vendor/lib/jME3-core.jar
  15. BIN  vendor/lib/jME3-desktop.jar
  16. BIN  vendor/lib/jME3-jbullet.jar
  17. BIN  vendor/lib/jME3-jogg.jar
  18. BIN  vendor/lib/jME3-lwjgl-natives.jar
  19. BIN  vendor/lib/jME3-lwjgl.jar
  20. BIN  vendor/lib/jME3-niftygui.jar
  21. BIN  vendor/lib/jME3-plugins.jar
  22. BIN  vendor/lib/jME3-terrain.jar
  23. BIN  vendor/lib/jME3-test.jar
  24. BIN  vendor/lib/jME3-testdata.jar
  25. BIN  vendor/lib/jheora-jst-debug-0.6.0.jar
  26. BIN  vendor/lib/lwjgl.jar
  27. BIN  vendor/lib/nifty-1.3.jar
  28. BIN  vendor/lib/nifty-default-controls-1.3.jar
  29. BIN  vendor/lib/nifty-default-controls.jar
  30. BIN  vendor/lib/nifty-examples-1.3.jar
  31. BIN  vendor/lib/nifty-examples.jar
  32. BIN  vendor/lib/nifty-lwjgl-renderer-1.3.jar
  33. BIN  vendor/lib/nifty-openal-soundsystem-1.0.jar
  34. BIN  vendor/lib/nifty-style-black-1.3.jar
  35. BIN  vendor/lib/nifty-style-black.jar
  36. BIN  vendor/lib/nifty-style-grey-1.0.jar
  37. BIN  vendor/lib/nifty.jar
  38. BIN  vendor/lib/noise-0.0.1-SNAPSHOT.jar
  39. BIN  vendor/lib/xmlpull-xpp3-1.1.4c.jar
View
2  .rvmrc
@@ -1 +1 @@
-rvm use jruby-1.6.4@waves
+rvm use jruby-1.6.6@waves
View
3  lib/maze_craze/controllers/StartScreenController.java
@@ -43,9 +43,10 @@ public void update(float tpf) {
}
public void startGame(String nextScreen) {
- System.out.println("\n\n startGame called\n\n");
nifty.gotoScreen(nextScreen); // switch to another screen
// start the game and do some more stuff...
+ // app.setupgame(); // Need to run this method, but it doesn't exist here.
+ System.out.println("\n\n setting up game\n\n");
}
public void quitGame() {
View
28 lib/maze_craze/imports.rb
@@ -1,15 +1,15 @@
-require 'rubygems'
-require 'java'
-require 'jruby/core_ext'
+# require 'rubygems'
+# require 'java'
+# require 'jruby/core_ext'
require 'bundler'
Bundler.require
-GAME_ROOT_PATH = File.expand_path(File.dirname(__FILE__))
-$CLASSPATH << File.join(GAME_ROOT_PATH, "java", "classes")
+# GAME_ROOT_PATH = File.expand_path(File.dirname(__FILE__))
+# $CLASSPATH << File.join(GAME_ROOT_PATH, "java", "classes")
+#
+# $: << File.join(GAME_ROOT_PATH)
-$: << File.join(GAME_ROOT_PATH)
-
-require File.join(GAME_ROOT_PATH, '..', '..', 'vendor', 'jme3_2011-11-13.jar')
+#require File.join(GAME_ROOT_PATH, '..', '..', 'vendor', 'jme3_2012-12-20.jar')
java_import "com.jme3.app.SimpleApplication"
java_import "com.jme3.system.AppSettings"
@@ -46,15 +46,15 @@
java_import "com.jme3.texture.Texture"
java_import "com.jme3.material.RenderState"
java_import "com.jme3.niftygui.NiftyJmeDisplay"
-java_import "de.lessvoid.nifty.Nifty"
-java_import "de.lessvoid.nifty.screen.Screen"
-java_import "de.lessvoid.nifty.screen.ScreenController"
+# java_import "de.lessvoid.nifty.Nifty"
+# java_import "de.lessvoid.nifty.screen.Screen"
+# java_import "de.lessvoid.nifty.screen.ScreenController"
java_import "java.util.logging.Level"
java_import "java.util.logging.Logger"
-java_import "java.awt.DisplayMode"
-java_import "java.awt.GraphicsDevice"
-java_import "java.awt.GraphicsEnvironment"
+# java_import "java.awt.DisplayMode"
+# java_import "java.awt.GraphicsDevice"
+# java_import "java.awt.GraphicsEnvironment"
java_import "StartScreenController"
# java_import "HudScreenController"
View
89 lib/maze_craze/maze.rb
@@ -31,56 +31,19 @@ def initialize
def simpleInitApp
self.timer = NanoTimer.new
- if @game_state.zero?
- display_start_screen
- else
- self.bullet_app_state = BulletAppState.new
- state_manager.attach(bullet_app_state)
-
- capsule_shape = CapsuleCollisionShape.new(1.5, 15.0, 1)
- self.player = CharacterControl.new(capsule_shape, 0.05)
- player.jump_speed = 20
- player.fall_speed = 30
- player.gravity = 30
- player.physics_location = Vector3f.new(-185, 15, -95)
- # This isn't being used yet.
- player_model = asset_manager.load_model(File.join("Models", "Oto", "Oto.mesh.xml"))
- player_model.local_scale = 0.5
- player_model.local_translation = Vector3f.new(-185, 15, -95)
- player_model.add_control(player)
- bullet_app_state.physics_space.add(player_model)
-
-
- sphere = Sphere.new(30, 30, 0.2)
- self.mark = Geometry.new("BOOM!", sphere)
- mark_mat = Material.new(asset_manager, File.join("Common", "MatDefs", "Misc", "Unshaded.j3md"))
- mark_mat.set_color("Color", ColorRGBA::Red)
- mark.material = mark_mat
-
- setup_text!
- setup_camera!
- setup_floor!
- setup_sky!
- setup_keys!
- setup_light!
- setup_audio!
-
- generate_maze #(static_maze)
-
- self.playing = true
- self.playtime = Time.now
- end
+ display_start_screen
end
def display_start_screen
nifty_display = NiftyJmeDisplay.new(asset_manager, input_manager, audio_renderer, gui_view_port)
nifty = nifty_display.nifty
- nifty.from_xml(File.join('lib', 'maze_craze', 'views', 'screen.xml'), 'start', self)
+ controller = StartScreenController.new(self)
+ nifty.from_xml(File.join('lib', 'maze_craze', 'views', 'screen.xml'), 'start', controller)
gui_view_port.add_processor(nifty_display)
- # fly_cam.enabled = false
- # fly_cam.drag_to_rotate = true
+ flyCam.enabled = false
+ flyCam.drag_to_rotate = true
input_manager.cursor_visible = true
- #controller = StartScreenController.new(self)
+
# device = GraphicsEnvironment.local_graphics_environment.default_screen_device
# modes = device.display_modes
# modes.each do |mode|
@@ -89,6 +52,45 @@ def display_start_screen
# self.stop
end
+ def setupgame
+ @game_state = 1
+ self.bullet_app_state = BulletAppState.new
+ state_manager.attach(bullet_app_state)
+
+ capsule_shape = CapsuleCollisionShape.new(1.5, 15.0, 1)
+ self.player = CharacterControl.new(capsule_shape, 0.05)
+ player.jump_speed = 20
+ player.fall_speed = 30
+ player.gravity = 30
+ player.physics_location = Vector3f.new(-185, 15, -95)
+ # This isn't being used yet.
+ player_model = asset_manager.load_model(File.join("Models", "Oto", "Oto.mesh.xml"))
+ player_model.local_scale = 0.5
+ player_model.local_translation = Vector3f.new(-185, 15, -95)
+ player_model.add_control(player)
+ bullet_app_state.physics_space.add(player_model)
+
+
+ sphere = Sphere.new(30, 30, 0.2)
+ self.mark = Geometry.new("BOOM!", sphere)
+ mark_mat = Material.new(asset_manager, File.join("Common", "MatDefs", "Misc", "Unshaded.j3md"))
+ mark_mat.set_color("Color", ColorRGBA::Red)
+ mark.material = mark_mat
+
+ setup_text!
+ setup_camera!
+ setup_floor!
+ setup_sky!
+ setup_keys!
+ setup_light!
+ setup_audio!
+
+ generate_maze #(static_maze)
+
+ self.playing = true
+ self.playtime = Time.now
+ end
+
def static_maze
maze =
<<-MAZE
@@ -140,6 +142,7 @@ def generate_maze(maze = nil)
def setup_camera!
+ flyCam.enabled = true
flyCam.move_speed = 100
cam.look_at_direction(Vector3f.new(10, 0, 0).normalize_local, Vector3f::UNIT_Y)
end
View
2  lib/waves.rb
@@ -6,7 +6,7 @@
$: << File.join(PROJECT_ROOT, "lib")
-require File.join("..", 'vendor', 'jme3_2011-11-13.jar')
+require File.join(PROJECT_ROOT, 'vendor', 'jme3_2012-12-20.jar')
module Waves
VERSION = "0.0.1"
View
BIN  libbulletjme.jnilib
Binary file not shown
View
BIN  liblwjgl.jnilib
Binary file not shown
View
BIN  vendor/jme3_2011-11-13.jar
Binary file not shown
View
BIN  vendor/jme3_2012-12-20.jar
Binary file not shown
View
BIN  vendor/lib/eventbus-1.4.jar
Binary file not shown
View
BIN  vendor/lib/jME3-blender.jar
Binary file not shown
View
BIN  vendor/lib/jME3-bullet-natives.jar
Binary file not shown
View
BIN  vendor/lib/jME3-bullet.jar
Binary file not shown
View
BIN  vendor/lib/jME3-core.jar
Binary file not shown
View
BIN  vendor/lib/jME3-desktop.jar
Binary file not shown
View
BIN  vendor/lib/jME3-jbullet.jar
Binary file not shown
View
BIN  vendor/lib/jME3-jogg.jar
Binary file not shown
View
BIN  vendor/lib/jME3-lwjgl-natives.jar
Binary file not shown
View
BIN  vendor/lib/jME3-lwjgl.jar
Binary file not shown
View
BIN  vendor/lib/jME3-niftygui.jar
Binary file not shown
View
BIN  vendor/lib/jME3-plugins.jar
Binary file not shown
View
BIN  vendor/lib/jME3-terrain.jar
Binary file not shown
View
BIN  vendor/lib/jME3-test.jar
Binary file not shown
View
BIN  vendor/lib/jME3-testdata.jar
Binary file not shown
View
BIN  vendor/lib/jheora-jst-debug-0.6.0.jar
Binary file not shown
View
BIN  vendor/lib/lwjgl.jar
Binary file not shown
View
BIN  vendor/lib/nifty-1.3.jar
Binary file not shown
View
BIN  vendor/lib/nifty-default-controls-1.3.jar
Binary file not shown
View
BIN  vendor/lib/nifty-default-controls.jar
Binary file not shown
View
BIN  vendor/lib/nifty-examples-1.3.jar
Binary file not shown
View
BIN  vendor/lib/nifty-examples.jar
Binary file not shown
View
BIN  vendor/lib/nifty-lwjgl-renderer-1.3.jar
Binary file not shown
View
BIN  vendor/lib/nifty-openal-soundsystem-1.0.jar
Binary file not shown
View
BIN  vendor/lib/nifty-style-black-1.3.jar
Binary file not shown
View
BIN  vendor/lib/nifty-style-black.jar
Binary file not shown
View
BIN  vendor/lib/nifty-style-grey-1.0.jar
Binary file not shown
View
BIN  vendor/lib/nifty.jar
Binary file not shown
View
BIN  vendor/lib/noise-0.0.1-SNAPSHOT.jar
Binary file not shown
View
BIN  vendor/lib/xmlpull-xpp3-1.1.4c.jar
Binary file not shown

0 comments on commit 7ccdbad

Please sign in to comment.
Something went wrong with that request. Please try again.