I also got the error about the mesh on win32 machines which is noted
in the tutorial..
But the downloaded source of the dirty ruby tutorial seemed to give me
an ogre window with all blank values...
I tried to copy the mesh file over but it was to no avail..
Any ideas for me here ?
yes... just installed last night!
> Does the screen freeze before putting the mesh on the screen?
I believe it did but I will get back to you on that one...
> Does pressing escape close the pink window?
Will get back to you...
--------
What about the fact that the downloaded source of the tutorial gave me
an ogre window that didn't offer any selection values ?
As I said the screen is frozen.
If I add the mesh then I get the mesh error and no screen ever shows up...
> Does pressing escape close the pink window?
Yes it closes...
def initialize
# The different types of scene managers provided by Ogre are:
# :general
# :terrain
# :nature
# :paging
# :indoor
scene_manager = create_scene_manager :general
camera = scene_manager.create_camera("camera")
camera.position = v(0,0,-200)
camera.look_at v(0,0,0)
viewport = create_viewport(camera)
viewport.set_background_colour Ogre::ColourValue.new(0.8, 0.5, 0.5)
# @ruby = DirtyRuby.new
end
end
C:\shattered_apps\dirty_ruby>ruby script/runner
c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered_view/base.rb
:211:in `translate': No matching function for overloaded
'Node_translate' (Argum
entError)
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_view/base.rb:211:in `translate'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_model/base.rb:106:in `send'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_model/base.rb:106:in `method_missing'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_pack/keyboard_input/keyboard_input.rb:88:in `send'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_pack/keyboard_input/keyboard_input.rb:88:in `key_action'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_pack/keyboard_input/keyboard_input.rb:98:in `update_input'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_pack/keyboard_input/keyboard_input.rb:97:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.0.2/lib/
shattered
_pack/keyboard_input/keyboard_input.rb:97:in `update_input'
... 15 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_ruby-0.5.0.2/lib/
game_load
er.rb:81:in `start_game'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_ruby-0.5.0.2/lib/
game_load
er.rb:32:in `run'
from ./script/runner.rb:4:in `start_game'
from script/runner:8
My model does contain
class DirtyRuby < ShatteredModel::Base
key :pressed => :left, :action => { :translate => :left }
key :pressed => :right, :action => { :translate => :right }
end
Any ideas?
~Jeremy
I wanted to get in on this post as well. I am also having a bit of
trouble with the tutorial. I can get all the way to the spinning ruby,
but when I press left or right I get an error:
C:\shattered_apps\dirty_ruby>ruby script/runner
_pack/keyboard_input/keyboard_input.rb:88:in `key_action'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack- 0.5.0.2/lib/
shattered
C:\rails_apps\dirty_ruby>ruby script/runner
Warning:c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
importenv
is deprecated after Ruby 1.8.1 (no replacement)
c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/shattered_view/
base.rb:2
13:in `translate': No matching function for overloaded
'Node_translate' (Argumen
tError)
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_v
iew/base.rb:213:in `translate'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_m
odel/base.rb:106:in `send'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_m
odel/base.rb:106:in `method_missing'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_p
ack/keyboard_input/keyboard_input.rb:88:in `send'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_p
ack/keyboard_input/keyboard_input.rb:88:in `key_action'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_p
ack/keyboard_input/keyboard_input.rb:98:in `update_input'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_p
ack/keyboard_input/keyboard_input.rb:97:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack-0.5.1/lib/
shattered_p
ack/keyboard_input/keyboard_input.rb:97:in `update_input'
... 15 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_ruby-0.5.1/lib/
game_loader
.rb:81:in `start_game'
from c:/ruby/lib/ruby/gems/1.8/gems/shattered_ruby-0.5.1/lib/
game_loader
.rb:32:in `run'
from ./script/runner.rb:4:in `start_game'
from script/runner:8
it's just when I press the left or right key when this happens.
thanks for the help with this.
~Jeremy
On Aug 27, 8:03 pm, "Mikkel Garcia" <lekkim.gar...@gmail.com> wrote:
> Daniel and Jeremy: gem update shattered_ruby
>
> Version 0.5.1 should address these issues.
>
> Let me know if it does,
>
> -Mikkel
>
> On 8/27/07, Jason Roelofs <jameskil...@gmail.com> wrote:
>
>
>
> > Yeah, the tutorials are quite out of date and what it looks like here is
> > an artifact of trying to use old Shattered Ogre code with the new Ogre.rbbackend.
>
> > Unless Mikkel and Martyn changed views on keybindings, that code should
> > work, so I would mark that down as a bug. I currently don't have time to
> > look into it myself, but I might be able to later.
>
> > Jason
>
> > On 8/25/07, JeremyWoert...@gmail.com <JeremyWoert...@gmail.com > wrote:
>
> > > I wanted to get in on this post as well. I am also having a bit of
> > > trouble with the tutorial. I can get all the way to the spinning ruby,
> > > but when I press left or right I get an error:
>
> > > C:\shattered_apps\dirty_ruby>ruby script/runner
> > > c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack- 0.5.0.2/lib/
> > > shattered_view/base.rb
> > > :211:in `translate': No matching function for overloaded
> > > 'Node_translate' (Argum
> > > entError)
> > > from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack- 0.5.0.2/lib/
> > > shattered
> > > _view/base.rb:211:in `translate'
> > > _pack/keyboard_input/keyboard_input.rb:88:in `key_action'
> > > from c:/ruby/lib/ruby/gems/1.8/gems/shattered_pack- 0.5.0.2/lib/
> > > shattered
> > > _pack/keyboard_input/keyboard_input.rb:98:in `update_input'
So, now that I can get it to work, I want to know what it is i'm
doing. You said adding the method to the DirtyRuby model was a
temporary fix, so what does the .to_v method do exactly? Or I guess,
what does the "v" stand for, since I already know that it's converting
the object in a fashionable ruby manor :)
~Jeremy
On Aug 28, 4:42 pm, "Mikkel Garcia" <lekkim.gar...@gmail.com> wrote:
> Heh, I seriously thought I fixed this - ah well, another bug for trac.
>
> You may want to regenerate the state(s). The generated code has been
> cleaned up drastically.
> After that, changing the position of the camera to be closer to the ruby
> should work:
>
> From:
> camera :position => :z*300, :look_at => :zero
> To:
> camera :position => :z*50, :look_at => :zero
>
> also, to (temporarily) fix your error with the translate:
>
> class DirtyRuby < ShatteredModel::Base
> key :pressed => :left, :action => { :move => :left }
> key :pressed => :right, :action => { :move => :right }
>
> def move(direction)
> translate(direction.to_v)
> end
> end
>
> Thanks for pointing out the error!
> -Mikkel
>
~Jeremy
On Aug 28, 7:09 pm, "Mikkel Garcia" <lekkim.gar...@gmail.com> wrote:
> zero.to_v == Ogre::Vector3.new(0,0,0) == v(0,0,0)
>
> Just different ways to display the same things.
>
> It's a temporary fix, because translate(:left) should work fine.
>
> -Mikkel
>
> def insert_favorite_noun_here
> "*** censored***"
> end
>