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,319
Reaction score
5,488
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
82
Reaction score
101
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
82
Reaction score
101
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

Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)
It can be frustrating that so many commercial games have used up titles that might otherwise be great for a project.
Light up explosions with QABS and Community Lighting.
qcPQHt9.gif

Forum statistics

Threads
110,655
Messages
1,054,985
Members
143,779
Latest member
Epitaph78
Top