gamebox
gamebox copied to clipboard
all examples need to be updated to work with the new Gosu subsystems or be deleted
all examples need to be updated to work with the new Gamebox API
None of the examples work for me, is this part of this bug? Is it going to be addressed? This is what I get for just about every example (with or without doing a bundle install first, many times bundle install gives me errors too):
C:\Users\Scott\Documents\code\gamebox\gamebox\examples\mjr_ruby>rake --trace
rake aborted!
the method alive already exists
C:/Ruby193/lib/ruby/gems/1.9.1/gems/kvo-0.0.3/lib/kvo.rb:7:in `block in kvo_attr_accessor'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/kvo-0.0.3/lib/kvo.rb:5:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/kvo-0.0.3/lib/kvo.rb:5:in `kvo_attr_accessor'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamebox-0.3.4/lib/gamebox/actor.rb:13:in `<class:Actor>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamebox-0.3.4/lib/gamebox/actor.rb:4:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/require_all-1.2.1/lib/require_all.rb:109:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/require_all-1.2.1/lib/require_all.rb:109:in `block in require_all'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/require_all-1.2.1/lib/require_all.rb:107:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/require_all-1.2.1/lib/require_all.rb:107:in `require_all'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamebox-0.3.4/lib/gamebox.rb:23:in `<top (required)>'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
C:/Users/Scott/Documents/code/gamebox/gamebox/examples/mjr_ruby/config/environment.rb:10:in `<top (required)>'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Users/Scott/Documents/code/gamebox/gamebox/examples/mjr_ruby/Rakefile:6:in `<top (required)>'
C:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load'
C:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:501:in `raw_load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:82:in `block in load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:81:in `load_rakefile'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:65:in `block in run'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
C:/Ruby193/bin/rake:32:in `<main>'
Scott, I've recently just overhauled the entire API on HEAD; the examples have not been updated. An incomplete example using the new API can be found at https://github.com/shawn42/foxy I'll update this ticket as more examples come back online. I'll be posting a simple tutorial shortly as well. Let me know if you have specific questions.
Shawn, I build the gamebox gem from the latest source and have used kvo 0.0.2 due to the issue reported in #71. I then could create a new game but when I try to run it by rake, I get an error:
rake ~/Projects/gosugames/gamebox/zapper
bundle exec ruby src/app.rb
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:51:in rescue in block in build': (RuntimeError) demo not found: #<RuntimeError: Could not find class or module named MyRenderer within Object> /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/class_finder.rb:26:in
get_constant'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/class_finder.rb:14:in dig_for_class' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/class_finder.rb:7:in
find_class'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_factory.rb:32:in type_1_constructor' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_factory.rb:20:in
construct_new'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_context.rb:29:in get' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:25:in
block (2 levels) in build'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:6:in `block in build'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_context.rb:58:in `in_subcontext'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:5:in `build'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:96:in `create_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:80:in `activate_new_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:59:in `switch_to_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/game.rb:8:in `configure'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:29:in `setup'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:22:in `start'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:14:in `run'
from src/app.rb:6:in `<main>'
rake aborted! Command failed with status (1): [bundle exec ruby src/app.rb...]
Tasks: TOP => default => run (See full trace by running task with --trace)
Can you help?
This should be fixed if you pull from HEAD. I had some code committed but not yet pushed. >.<
Also, you can usually find me idling on IRC in #gamebox on freenode
@shawn42 thanks. The new boilerplate new game works now. But, none of the examples i.e. nario or roids works. The example roids still give the following errors:
bundle exec ruby src/app.rb
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:51:in rescue in block in build': (RuntimeError) intro not found: #<RuntimeError: intro not found in Stage.definitions> /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:10:in
block (2 levels) in build'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:7:in tap' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:7:in
block in build'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_context.rb:58:in in_subcontext' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:5:in
build'
/Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:96:in create_stage' /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:80:in
activate_new_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:6:in `block in build'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/conject-0.0.7/lib/conject/object_context.rb:58:in `in_subcontext'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_factory.rb:5:in `build'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:96:in `create_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:80:in `activate_new_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/stage_manager.rb:59:in `switch_to_stage'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/core/game.rb:8:in `configure'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:29:in `setup'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:22:in `start'
from /Users/wixmac/.rvm/gems/ruby-1.9.2-p180@gosugames/gems/gamebox-0.4.0.rc9/lib/gamebox/gamebox_application.rb:14:in `run'
from src/app.rb:6:in `<main>'
rake aborted! Command failed with status (1): [bundle exec ruby src/app.rb...]
@rupakg correct, I pushed a fix for the generated game. I have not yet updated the examples. Take a look at the foxy repo I posted for an example of how to work with actors, behaviors, and stages. I'll comment here when I get the example games updated.
@samueller @rupakg The roids example now runs with the HEAD Gamebox.
@shawn42 I just did a git pull
and I get the same "the method alive already exists" error. I confirmed my code has the same changes you made yesterday.
@samueller the examples do not use the repo gamebox, they use whatever has been installed in the system. Did you do a rake install
in gamebox to install the latest, and then a bundle update gamebox
in the roids
directory? The thing to check is that the gamebox version in the backtrace is 0.4.0.rc10
@tanema has fixed / updated the roids and netris examples to work with the new API.