Enigmo

Villager
Member
Joined
Jul 5, 2019
Messages
13
Reaction score
0
First Language
Bulgarian
Primarily Uses
RMVX
Hello! A quick question I'd like to ask.

Does anyone know how RGSS handles Windows messages along with updating the screen graphics?


Thanks!~
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,268
Reaction score
5,445
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Learning RGSSx. Please be sure to post your threads in the correct forum next time. Thank you.



Please add a meaningful title to your thread next time.
 

orochi2k

The Mad King of Neolithic
Veteran
Joined
Jan 2, 2021
Messages
79
Reaction score
81
First Language
Chinese
Primarily Uses
RMXP
I don't think RGSS handles Windows messages.
I think Windows messages are mostly handled by the RPG maker's exe file(A.K.A "RGSS_Player") itself.
Likely in a standard message loop.
But, as reverse-engineering the exe file is forbidden, I don't know many details.
 
Last edited:

Enigmo

Villager
Member
Joined
Jul 5, 2019
Messages
13
Reaction score
0
First Language
Bulgarian
Primarily Uses
RMVX
I don't think RGSS handles Windows messages.
I think Windows messages are mostly handled by the RPG maker's exe file(A.K.A "RGSS_Player") itself.
Likely in a standard message loop.
But, as reverse-engineering the exe file is forbidden, I don't know many details.
If that's true, then how are they (RGSS Player and Ruby) not interfering with each other?
 

orochi2k

The Mad King of Neolithic
Veteran
Joined
Jan 2, 2021
Messages
79
Reaction score
81
First Language
Chinese
Primarily Uses
RMXP
There are 3 components in a normal RPG MAKER game:
A The exe (RGSS_Player)
B, The DLL( All the dark secrets are here)
C, The Ruby Scripts.

The flow is:
First, exe loads functions from DLL while exe itself has very limited knowledge about how to do things about the game.
After DLL is loaded, the exe loads the Script.
But, exe itself does not know how to handle scripts. Thus, exe ask dll to handle the scripts.
DLL contains a Ruby language interpolater which can understand Script and transform them into actual machine language to execute.

But, the exe does have a message loop to handle windows messages just like many common win32 exe. Thus, the exe can, in theory, handle all the windows messages by itself. Thus, when handling those windows messages, the exe does not need to interfere with the script.
(But, from the script side, you can use "WIN32API" to interfere....)

The exe is also responsible to draw everything in its window. But, the flow is a bit backward...
Script says "a = Bitmap.new(....)"
Exe have no idea what that means, so exe asks dll to help exe to understand.
DLL explain to exe what exactly exe needs to do.(Because, DLL has an interpolator )
Exe then knows what to do with the screen.
Thus, exe and script does not directly interfere with each other, the function from DLL is the bridge.

We can do an experiment (Which is totally not reverse engineering)
1, delete dll -> exe will tell you can't find RGSSXXXX.dll
2, delete script -> exe will tell you can't find script (But, it's after it can find dll)
Thus, we know the basic flow...
 

Latest Threads

Latest Posts

Latest Profile Posts


Livestreaming again.
I managed to review my previous lessons on Learn MV and fixed a lot of things. Yay! :kaopride:
I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Yay. I turned 39 today. Another year older, another year closer to the grave.

Forum statistics

Threads
110,409
Messages
1,053,074
Members
143,470
Latest member
AttilaHU1990
Top