Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved some stuff around. game is sorta playable
- Loading branch information
Showing
20 changed files
with
157 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,51 @@ | ||
= MazeCraze | ||
# MazeCraze | ||
dynamic maze game built with [jMonkeyEngine](http://jmonkeyengine.org) and [JRuby](http://jruby.org) | ||
|
||
== Installation & Requirements | ||
## Installation & Requirements | ||
Currently only tested on Mac OSX 10.6+ | ||
* Open up your terminal on OSX | ||
* Install JRuby (1.7+) | ||
|
||
rvm install jruby-head | ||
```rvm install jruby-head``` | ||
|
||
* Download MazeCraze | ||
|
||
git clone git://github.com/jwoertink/maze_craze.git | ||
```git clone git://github.com/jwoertink/maze_craze.git``` | ||
|
||
* cd into the directory | ||
|
||
cd maze_craze | ||
```cd maze_craze``` | ||
|
||
* Install bundler | ||
|
||
gem install bundler | ||
```gem install bundler``` | ||
|
||
* Bundle the gems | ||
|
||
bundle | ||
```bundle``` | ||
|
||
You should be good at this point. | ||
|
||
== Running MazeCraze | ||
## Running MazeCraze | ||
Just run this command from the terminal | ||
jruby bin/maze_craze | ||
```jruby bin/maze_craze``` | ||
|
||
== Game Play | ||
## Game Play | ||
The object of the game is to find your way through the maze. There are some targets hidden within the maze. You must find them all, and destroy them before completing the maze. | ||
|
||
== Road Map | ||
## Road Map | ||
* Add a working timer | ||
* Add more levels | ||
* Add a better generated maze | ||
* Add Monsters | ||
* Add a HUD GUI | ||
|
||
== Copyright | ||
## Structure (WIP) | ||
*Actors* - The objects that interact within the game. Could be characters and props | ||
*Scenes* - The views and layouts. | ||
*Controllers* - The logic behind the views and layouts | ||
*App* - Structure for the stage | ||
|
||
|
||
## Copyright | ||
Copyright (c) 2012 Jeremy Woertink. You can download the game, and change the source code all you want. If you sell it, and make money, you have to give me credit :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'app/movable' | ||
|
||
class Player < PhysicalObject | ||
include Movable | ||
|
||
def initialize(app_state) | ||
super | ||
# This isn't being used yet. | ||
@model = $asset_manager.load_model(File.join("Models", "Oto", "Oto.mesh.xml")) | ||
@model.local_scale = 0.5 | ||
@model.local_translation = Vector3f.new(-185, 15, -95) | ||
@model.add_control(object) | ||
app_state.physics_space.add(@model) | ||
end | ||
|
||
|
||
|
||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Graphics | ||
|
||
def self.included(base) | ||
java_import "java.awt.DisplayMode" | ||
java_import "java.awt.GraphicsDevice" | ||
java_import "java.awt.GraphicsEnvironment" | ||
end | ||
|
||
def graphics_device | ||
@device ||= GraphicsEnvironment.local_graphics_environment.default_screen_device | ||
end | ||
|
||
## | ||
# display_modes.each do |mode| | ||
# puts "#{mode.width}x#{mode.height} #{mode.bit_depth}bit" | ||
# end | ||
def display_modes | ||
graphics_device.display_modes | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module Movable | ||
|
||
def direction | ||
@direction ||= Vector3f.new | ||
end | ||
|
||
def left? | ||
@left | ||
end | ||
|
||
def left=(moving_left = false) | ||
@left = moving_left | ||
end | ||
|
||
def right? | ||
@right | ||
end | ||
|
||
def right=(moving_right = false) | ||
@right = moving_right | ||
end | ||
|
||
def forward? | ||
@forward | ||
end | ||
|
||
def forward=(moving_forward = false) | ||
@forward = moving_forward | ||
end | ||
|
||
def backward? | ||
@backward | ||
end | ||
|
||
def backward=(moving_backward = false) | ||
@backward = moving_backward | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
class PhysicalObject | ||
attr_accessor :object, :model | ||
|
||
def initialize(app_state) | ||
capsule_shape = CapsuleCollisionShape.new(1.5, 15.0, 1) | ||
@object = CharacterControl.new(capsule_shape, 0.05) | ||
@object.jump_speed = 20 | ||
@object.fall_speed = 30 | ||
@object.gravity = 30 | ||
@object.physics_location = Vector3f.new(-185, 15, -95) | ||
end | ||
|
||
def move_direction=(direction) | ||
@object.walk_direction = direction | ||
end | ||
|
||
def move_direction | ||
@object.walk_direction | ||
end | ||
|
||
def location | ||
@object.physics_location | ||
end | ||
|
||
def jump_speed | ||
@object.jump_speed | ||
end | ||
|
||
def fall_speed | ||
@object.fall_speed | ||
end | ||
|
||
def gravity | ||
@object.gravity | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.