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.

Bitmap of Map and Screen in RGSS

Is there a bitmap object representing the entire map accessible to a script? What about for the contents of the screen? I want to pass it out to a dll I'm writing, but can't seem to find one anywhere - it has been a very long time since I've picked up RMXP. If there isn't one readily available, is there a way to access it elsewise? Thank you for any help:)
 
Join the club, I'd also love to know where these hidden classes are!

I've looked for ages, they are inside an internal class for sure.

It could be that the screen is composed to a GDI bitmap on it's rendering path so there is actually no access to the screen bitmap at all, as for the map bitmap I haven't actually checked for that one.
 
I was fairly sure the screen wouldn't be accessible in any easy manner - I was hoping, though, that the map might be, it seems reasonable to assume. If the map isn't, I'm sure I can do some contrived work around by looking at what tile is where, then getting the pixel from the tileset, then overlay with a pic for effects, etc...but that's just horrible for a bunch of reasons, and I would love not to have to do things that way.

Thank you for the response:)
 
Perhaps you can attempt to grab the screen direct from GDI? It's something I started looking into but didn't pursue when I found my experiments ran too slowly on Intel chips and failed entirely with NVidia cards.

What I did with VX is use the inbuilt screenshot and uploaded the bitmap to my DLL, it was fast with AMD but incredibly slow on all other vendors so I gave up the experiment.
http://www.youtube.com/watch?v=UcctK2bYu0g

It would be super fantastic if you get anywhere with this.
 
I think it's a DirectDraw app so you have to find something that use the first argument of the RGSSGameMain function and return something (DDrawInitialize(hwnd,width,height,8)).
If you find the DirectDraw device you can do what you want with the screen without using GDI that is very slow.
 
Nuri Yuri":35vlzjhl said:
I think it's a DirectDraw app so you have to find something that use the first argument of the RGSSGameMain function and return something (DDrawInitialize(hwnd,width,height,8)).
If you find the DirectDraw device you can do what you want with the screen without using GDI that is very slow.
Are you sure it's direct draw? With a tracer I can only see Direct Audio being initialised and used, nothing on direct draw
 
Coming to programming from a mathematics background, I don't have the experience to really take the above any further (I wish I did).

However, as for the original question, there is no image of the map belonging to the Bitmap class in rgss. Though, you can use ObjectSpace to pass all bitmaps; if you aren't using something based upon screen position, you can get the desired effect; though, that does leave a lot to be desired. Of course, you could, if you don't mind the tediousness, set something up that would capture all of the position data and pass that to; or do it incrementally. I don't think it would be difficult, just annoying, so probably not really worth it.

Obviously, if you're planning on replacing the screen with your own stuff, or something along those lines, that's not really all that helpful.
 
@Xilef : I'm not really sure but it's the most obvious scenario. To see if it uses DirectDraw
IDirectDraw7* g_DDrawInterface = NULL;
HRESULT hr = DirectDrawCreateEx(NULL, &g_DDrawInterface, IID_IDirectDraw7, NULL);
if(hr==DDERR_DIRECTDRAWALREADYCREATED) //The RGSS uses Direct Draw
{}
else if(hr==DD_OK) //The RGSS dosen't use Direct Draw
{}
else // The RGSS uses an older version of Direct Draw or there's another error.
{}

I watched how the RGSS was doing it's Graphics initializations and it was using allocated functions (that wasn't referenced by a module name) so that can be a Static Direct Draw implementation (like the Ruby implementation) or something we don't know '^'

Edit : The RGSS1 doesn't seem to use DirectDraw or something like that. (DD_OK)
 

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