A new Irricht/Ruby interface

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

A new Irricht/Ruby interface

Post by jnichols »

I'd like to annonce a new project.
A comprehensive Irrlicht/Ruby interface.
I call it Irr or IrrRuby, I think that means mad ruby, close enouth.
Please visit my page at: http://irr.rubyforge.org

If you haven't used Ruby before you now have reason.

I've converted ALL of the examples in Irricht-0.6 to Ruby and more.
I don't think you'll be disapointed.

Thank you!
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Wow, impressive. Cool! :) I'll link that page immediately :)
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

Post by jnichols »

Uploaded another today "fedora_binary_0.1".
This is a compile I did on my old system. It's an AMD k6-2 running Fedora 1. It may be more generally compatable then the Gentoo binary.

BTW: To install you can just copy the files irr.so & jsw.so to the examples directory
or to whatever directory you have your Ruby programs in. :)
guest1

Post by guest1 »

I'm going to try your project out as soon as I get a gentoo box that gets more than 2fps on the techdemo :) (The Rage 2MB just doesn't cut it for Irrlicht) I looked over the code, and it seems like it's REALLY EASY to use... I have never used Ruby before, but I know PHP and perl pretty good, so Ruby should be nothing to pick up. I think, since it's so simple, I'll probably write the level editor or something in Ruby, cause it'll take half the time, AND I love Gentoo :)

I'm just impressed that you got the techdemo working! Most of us C++ guys can't even get the techdemo working... (in windows of course, cause in Gentoo, it basically does it for us)

BTW, for larger projects, what are the framerate comparisons for C++ and for Ruby? I know that most of the code is done inside of the .so... I'll check it later, if you don't know.

peace out,
Kenny
joorce
Posts: 15
Joined: Tue Oct 14, 2003 9:48 am

Post by joorce »

Hi

First, thank you for your hard work. This ruby interface seems very well done.
But I have some questions.

I tried to compile with mingw in windows and I couldn't. You are using the uSleep function that, I think is unix specific, so it's not posible to build it.

It would be possible to replace this function for something more portable?

Anyway I've comented the calls to usleep, tried to compile it, and failed on linking.

Any tips?.

Thank you.

<EDIT>

Ok, I've managed to compile it using a ruby compiled with mingw.
Now only the thing about usleep remains.

If this function it's not very import, I guess so, I can send a binary and the Makefile I've used.
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

Post by jnichols »

RE: guest1

Cool :D

About all I can say about the comparison for frame rates is it varies greatly
depending on justhow the code is writtin. The difference starts a round zero
and goes up from there. I do some more testing, see if I can come up with a
better answer later.

Thank you!
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

RE :joorce (windows binary)

Post by jnichols »

It's great that you have a working Windows binary. As you guessed
the usleep function is of no great importance. I just put it in as a option
of the getFPS method to slow down the frame rate on very fast machines
and to keep Ruby from hoging the cpu. I'd love to see it and post it on
irr.rubyforge but please don't email it. I'm still learning about Rubyforge,
I think there's a way I can set up the account so you can upload it directly
to the site from your browser. I have to get back to you on that.

Of course it you have web site of your own you can upload it to there,
just let me know the URL and I'll take it from there.

:lol: :roll:

Thank you!
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Nifty.. I was trying to get a Windows compile myself going. I kept blowing up during the make as it was looking to link irr{something}.o that must have failed compiling in an earlier step.

I love the RAD-ability of Ruby. Used it to make a networked 2D "shoot fish in a barrel" game in under 2 hours.

I'd like a copy of that makefile, so if you want to send it to me, I'll put it up on a site so that everyone can get it.

saigumiATsaigumi.net
Crud, how do I do this again?
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

WIndows/mingw binary posted at: irr.rubyforge.org

Post by jnichols »

The is a MSWindows binary. Contrubuted by joorce on irrlicht.sourceforge.net. Questions on this particuler file are best directed to him. I have tested it on my Windows 98 system and it works. Requires mingw version of ruby. I've included a INSTALL file breify explaining how I installed it on my system.
joorce
Posts: 15
Joined: Tue Oct 14, 2003 9:48 am

Post by joorce »

To Saigumi:

I've send you the make file

To jnichols:

You don't need a mingw Ruby version to use it, only for compiling. I'm using myself the binaries with the normal Ruby for windows and it works.
joorce
Posts: 15
Joined: Tue Oct 14, 2003 9:48 am

Post by joorce »

Anyone knows something that could convert a GNU makefile to Microsoft Makefile?. Apart from a person, of course. ;)

Because then I could use the Microsoft Visual c++ Toolkit to compile Irrlicht/Ruby and see if it's faster.
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

repost from irr.rubyforge.org

Post by jnichols »

Can anybody on irrlicht.sourceforg.net help?
:?:
Thanks!
Jerry

By: Nobody
Windows TypeError: wrong argument type Fixnum [ reply ]
2004-05-07 04:01

Hello,

I recompiled the irr sourcecode under Windows 2000 using Dev-cpp and mingw32. The irr dll generates properly. But when I load it into ruby through require "irr" I get the following error message:
irb(main):001:0> require "irr"
require "irr"
TypeError: wrong argument type Fixnum (expected Class)
from ./irr.dll
from (irb):1
irb(main):002:0>

Any idea on what can be the problem? Many thanks for your support.

Jan

PS: here is my Makefile
# Project: irrrubis
# Makefile created by Dev-C++ 4.9.8.7

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = irr.o interface.o $(RES)
LINKOBJ = irr.o interface.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -L"../irrlicht-0.6/lib/DevCpp" -L"C:/ruby/bin" -g --export-all-symbols -lirrlicht -lmsvcrt-ruby18 -lstdc++
INCS = -I"C:/Dev-Cpp/include" -I"C:/ruby/lib/ruby/1.8/i386-mswin32" -I"../irrlicht-0.6/include"
CXXINCS = -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/ruby/lib/ruby/1.8/i386-mswin32" -I"../irrlicht-0.6/include"
BIN = irr.dll
CXXFLAGS = $(CXXINCS)-g -mnop-fun-dllimport
CFLAGS = $(INCS)-g -mnop-fun-dllimport

.PHONY: all all-before all-after clean clean-custom

all: all-before irr.dll all-after


clean: clean-custom
rm -f $(OBJ) $(BIN)

DLLWRAP=dllwrap.exe
DEFFILE=libirr.def
STATICLIB=libirr.a

$(BIN): $(LINKOBJ)
$(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)

irr.o: irr.cpp
$(CC) -c irr.cpp -o irr.o $(CFLAGS)

interface.o: interface.cpp
$(CC) -c interface.cpp -o interface.o $(CFLAGS)
csturm
Posts: 1
Joined: Thu Jun 17, 2004 12:14 pm

Post by csturm »

joorce wrote:To Saigumi:
You don't need a mingw Ruby version to use it, only for compiling. I'm using myself the binaries with the normal Ruby for windows and it works.
i cant get it running. i copied irr.so to \ruby\lib (where all the other .so libs reside), but all demos fail with "require: no such file to load: irr.so"

i am using the newest ruby for windows installer 1.8.1-13
from here: http://rubyforge.org/frs/?group_id=167

tia
chris
jnichols
Posts: 7
Joined: Wed Apr 28, 2004 1:58 am
Contact:

Post by jnichols »

Irr.so goes in the same directory as the examples "examples".
blakeage
Posts: 2
Joined: Sat Nov 25, 2006 4:08 am

Is there an example Ruby source file that uses the engine

Post by blakeage »

I'm looking for an example Ruby file that uses the engine that I can use to test to see if the interface between Ruby and the engine is really working.
Post Reply