Not logged inGosu Forums
Forum www.libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / We need help with Rubystein
- - By stathmk Date 2010-12-03 01:52
Hello.

I’m the webmaster of Wolfensteingoodies.com .  There are over 400 players posting at http://www.wolf3d.darkbb.com and http://diehardwolfers.areyep.com combined.  I want to update http://www.wolfensteingoodies.com/wolfensteingoodies/sp/sp.htm about Wolfenstein 3D in standalone programs. I thought that you’d be interested in helping me with Rubystein 3D from http://www.rubyinside.com/rubystein-wolfenstein-3d-recreated-in-ruby-1751.html because there’s a link to Gosu on that page.

All I know about Ruby is that I’ve heard it’s a coding language like Python and I don’t know Python either.  Can somebody please help me run Rubystein so that I can post help on my web site for other people to run it?

In the meantime, I will be trying to get Ruby working: http://www.ruby-lang.org/en/documentation/quickstart/

I saw a Youtube simulation of a Ruby 3D-game making program at http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?tid=481 and I liked it.

If you happen to find any other 3D game ports, then please tell me about them too.
Parent - By jlnr (dev) Date 2010-12-03 06:50
If you got Rubystein3D downloaded from github, you basically need to run the following two lines in your shell (cmd.exe on Windows, not irb):

gem install gosu
ruby wolf3d.rb

The installers from http://rubyinstaller.org/ make sure that you can access 'gem' and 'ruby' from within your shell, some other packages from ruby-lang.org are a bit less comfortable to use.
Parent - - By lol_o2 Date 2010-12-04 09:39
To run games in Ruby/Gosu:
1.Install Ruby: Version 1.9.2 or Version 1.9.1
2.Open cmd and type: gem install gosu (if not working, add --platform mswin32 at the end)
3.Find a file you want to run and double click it (Windows should use ruby.exe to open it)

And a small thing to somebody on this forum. Ruby 1.9.2 doesn't work like it should. In 'require' it can't find .rb file unless I add 'Dir.getwd'. And I don't know why.
But stathmk, if you want use Ruby 1.9.2 (which should be faster or something), before running Rubystein, replace it's scripts by these. I changed them to work on 1.9.2.
Parent - By Spooner Date 2010-12-04 14:36
1.9.2 doesn't add the working directory to the $LOAD_PATH. You should use "require" only for gems (or other things you manually put on $LOAD_PATH) but you should use 'require_relative "frog.rb"' for loading your own ruby files.

When converting apps, it is probably easier to add the working directory to the path instead, which will make all the old-style requires work again.

  $LOAD_PATH.unshift Dir.getwd

Or better, add the directory based on __FILE__, since working directory is not something you should rely on.
Parent - - By stathmk Date 2010-12-04 16:56
Thank you for being so patient with me.  You’re ahead of me and I still don’t understand it.

I copied the Rubystein files into C:\Program Files\Games\GameProgramming\Ruby192\bin .

I’m running Windows XP with Ruby 1.9.2 and Gosu.  Here’s the error screenshot when I go to the start panel, run, and type in cmd.exe:
http://www.wolfensteingoodies.com/wolfensteingoodies/sp/cmd.jpg

Here’s the error screenshot then I go to the Interactive Ruby shortcut:
http://www.wolfensteingoodies.com/wolfensteingoodies/sp/rubyshortcut.JPG

Something is weird with my web page today and the pictures might not load yet for you.

For anybody who helps me, I’ll thank them on my Wolfenstein 3D page when I type the Rubystein installation and running directions.
Parent - - By stathmk Date 2010-12-04 17:07
The second screenshot isn’t loading for some reason, so I’ll just type the error:

Irb<main>:001:0> gem install gosu
NameError: undefined local variable or method ‘gosu’ for main:Object
  from <irb>:1
  from C:/Program Files/Games/GameProgramming/Ruby192/bin/irb:12:in ‘<main>’
irb<main>:002:0>
Parent - By Spooner Date 2010-12-04 17:46
"gem install gosu" is a DOS command, not something to type in Ruby itself.
Parent - - By lol_o2 Date 2010-12-04 18:01
You don't need to copy game to Ruby main directory. Correctly installed Ruby, works in 'open with' as normal application.
To host images, use Imageshack. It's free and good.
And, I have for you The Final Solution. No Ruby, no Gosu, no problems. Download this file, copy to Rubystein's directory and run. It should work.
Parent - By erisdiscord Date 2010-12-04 19:04
I'd recommend imgur over Image Shack. :)
Parent - - By stathmk Date 2010-12-04 22:09
I'm sorry, but something's not working right.

<<Correctly installed Ruby, works in 'open with' as normal application.

No, it didn't work with me.

<<And, I have for you The Final Solution. No Ruby, no Gosu, no problems. Download this file, copy to Rubystein's directory and run. It should work.

When I clicked on it, it was loading for about a second and then nothing happened.

Am I forgotting something?  Must I install C++?  Then I'm going to look for my C++ cd-roms from about 2003.
Parent - - By lol_o2 Date 2010-12-05 09:09
So I don't know what's wrong. Or you made something not right, or it's not working on Windows XP (I have 7). Did you copy this .exe file to where is the wolf3d.rb?
And you don't need any C++.
Parent - By banister Date 2010-12-05 09:39
i have windows 7 and that .exe file did not work for me either.
Up Topic Gosu / Gosu Exchange / We need help with Rubystein

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill