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.

Compiling extensions to RGSS

I was hoping to get some information on compiling an extension to RGSS. I am already fairly expert with C/C++ and Ruby programming; I'm just not familiar with the interface and don't know where to start looking. I am interested specifically in building a graphical component that can be integrated into the rest of the game, such as with new Mode 7.
 
rey meustrus":1k8dd5u2 said:
I was hoping to get some information on compiling an extension to RGSS. I am already fairly expert with C/C++ and Ruby programming; I'm just not familiar with the interface and don't know where to start looking. I am interested specifically in building a graphical component that can be integrated into the rest of the game, such as with new Mode 7.

All right. You'll have to actually compile this kind of stuff as .dll files, and use the Win32API class to access them. I have a few posts on the subject, (mostly just clones of each other), so if you want to learn a bit more about Win32API, just put my name into the author field of the search function and put Win32API in the actual search field. Try to constrain it to the script support forum, too, if you want fewer results.
 
Thanks. How would you suggest I build a graphical component? Can I interact with the RGSS classes or should I interact directly with GDI? Or could I use some other graphical system like OpenGL?
 
rey meustrus":py9d2851 said:
Thanks. How would you suggest I build a graphical component? Can I interact with the RGSS classes or should I interact directly with GDI? Or could I use some other graphical system like OpenGL?

You can actually interact directly with the graphical components of the game. I've posted the source code of a .dll I was working a few times, that would edit bitmaps the game had loaded, much faster than the game itself could.
 
Could you link me to one of those posts? I saw nothing like that when I searched for your posts before, and perhaps I had bad search terms but there wasn't a lot of relevant stuff in the search.
 
That's excellent! Do you have any examples dealing with Sprites instead of Bitmaps? I think it would be more efficient to modify the sprite as it displays than to modify the bitmap; for example, the zoom_x and zoom_y effects in RGSS are faster than stretch_blt. It may or may not be possible to implement effects at that level, though.
 
rey meustrus":3v7ea3j4 said:
That's excellent! Do you have any examples dealing with Sprites instead of Bitmaps? I think it would be more efficient to modify the sprite as it displays than to modify the bitmap; for example, the zoom_x and zoom_y effects in RGSS are faster than stretch_blt. It may or may not be possible to implement effects at that level, though.

I know it's possible, but I'm not actually sure how to do that. The first step would be figuring out how the sprite was stored in memory, what equals what, etc. However, I'm not quite sure how to go about doing that.
 
So basically, a hacking project? Sounds like it might be fun. I did that for the Table class once, to figure out how to read and write to the Marshal'd data for Table, so as to create a more portable pure-Ruby Table class that could read RMXP data. That didn't involve any compiled memory management, though, so I would appreciate any explanation of the techniques you used to manipulate Bitmaps in memory.
 
rey meustrus":1t9rgwi6 said:
So basically, a hacking project? Sounds like it might be fun. I did that for the Table class once, to figure out how to read and write to the Marshal'd data for Table, so as to create a more portable pure-Ruby Table class that could read RMXP data. That didn't involve any compiled memory management, though, so I would appreciate any explanation of the techniques you used to manipulate Bitmaps in memory.

Well, the basics involve trying to load the data stored in memory, and creating a log in the process. For example, the bitmap class was mostly guessed at. I really have no idea what those other variables are. I just know that I have to load them before I can get to the ones I need.
 

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