Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RGSS202E.dll interface

Hello,
I have en idea in my mind; but for that, I need to easily invoke RUBY. One of the easize I know is calling dlls. The RGSS202E dll already interpretes TUBY code.
Does anyone know the interface of this library (function names, arguments a returns) ?

Thanks
 
ForeverZer0":1nxxnkpg said:
Why not just use actual compiled Ruby?

And what kind of things do you have in mind ?
I perhaps forgot to say that I'd like to avoid huge libraries like .NET and other. All I want is a simple dll.


ForeverZer0":1nxxnkpg said:
Have either of you looked into SWIG? It will add another build dependency, but it makes it easier.

Err... if I understand what I read, SWIG is an interface generator to call dll from scripting language.
What I want to do is simply call the dll from a compiled language. My old Delphi knows how to do that naturally.


Also, what I want to do is to include new pseudo-native RUBY classes (like the Sprite class) that will be managed by my own libraries.
Does anyone know how such a thing is done ?
 
Ruby.h isn't .NET based.
You compile everything into a single DLL. You compile the Ruby binaries into your own DLL and that's really it. you don't need a bunch of external libraries or anything.
 
ForeverZer0":2r8saxt5 said:
Why not just use actual compiled Ruby?

Ok.. after a quick investigation, I think I am understanding. Also it answers my last request (creating th new classes in the RUBY sources, managing them with some native C or external dll calls, and compiling the new RUBY source.

Alas, it seems that all of this is only donr through C, and I don't think my C fluency is enough tor that kind of things. Moreover, I do not want to bother with such such a messy development environment.

Think I'll have to find something else :cry:
 
Mmmm.....
After some thoughts, I think ed is a basic RUBY execution dll, like the RGSS202E dll, but not cecessarily including the RGSS classes will be enough for my needs. The extra classes should be dynamically created at initialization time.
Do you know where is such a -- documented -- thing to be found ?
 
I don't really understand how exactly you plan on using/creating a Ruby DLL, but without using C/C++. What language are you interfacing it with, and how exactly do you plan to use it?
 
ForeverZer0":3ohnu75a said:
I don't really understand how exactly you plan on using/creating a Ruby DLL, but without using C/C++. What language are you interfacing it with, and how exactly do you plan to use it?

The language is Delphi, a evolution of Pascal, a language I used for more than 30 yrears. It can interface, as well as create DLLs as easily as C.
What I want to do is not really write a DLL, but write an RM-like program (editor + run-time), also using RUBY as the scripting language; but keeping the best of both XP and VX, as well as adding new features.
And as I'd like to avoid heavy mandatory packages like .NET (which includes a RUBY execution library), the best way I can think of is a DLL. Perhaps this thing does exist in the 'official' RUBY package; but I am not a pro in RUBY development and the docs are a little .... fuzzy (mainly written for people who already know...). Thqt's why I am requireing help.

Easy project, no ??
 
The fact that you're using Delphi is a pretty significant detail to leave out. Delphi and Ruby do not mix very well, although I believe there was some project ongoing that interfaced the two (I think it was Apollo...?). I believe it only offered support for Ruby 1.8.x, not Ruby 1.9.x.

Another alternative would be to compile a Ruby DLL in C/C++, and then use shell execute through Delphi to make the calls.
 
ForeverZer0":1895ra6x said:
Another alternative would be to compile a Ruby DLL in C/C++, and then use shell execute through Delphi to make the calls.
THIS is exactly what I was talking about.
It is just that I do not know how to get, compile and/or use (i.e. know the exported functions) of such a DLL. The calling mechanisms are very simple from Delphi... once you know the exports.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top