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,291
Reaction score
5,461
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
80
Reaction score
82
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
80
Reaction score
82
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

Sorry everyone. Covid rules made me a laptop potatoe and I would need more exercise and past 2nd invasion I am still fighting for space also here. So I am not enough often here and... well I answer even less to my e-mails. DC is saying a huge HI to everyone with her heavy wet purrings.

You all take care in here ^^
traficaccidence.jpg
"It's time to add cars into the city!"
--- Famous last word of the developer's character before hit by a car :kaoswt2:
Yay, our new game, Causality is finally released on Steam!
A good way to practice writing is to write "flash fiction"; very short stories. Link

Forum statistics

Threads
110,488
Messages
1,053,681
Members
143,582
Latest member
beru
Top