The structure of a basic RM game
RPG Maker (RM) is a tool for making games.
I only have experience in using RPG Maker XP, RPG Maker VX, RPG Maker VX Ace, and RPG Maker MV.
Games made by using RM are based on
XP | VX | VA | MV |
---|---|---|---|
RGSS | RGSS2 | RGSS3 | rpg_core.js |
In most cases, when I say RGSS, I mean RGSS, RGSS2, and RGSS3. RGSS is in Ruby and rpg_core.js is in Javascript.
The scripts of a basic RGSS game look like
1 2 3 4 5 6 7 8 9 10 11 12 13 |
def start
# some codes
end
def update
# some codes
end
start
loop do
update
Input.update
Graphics.update
end
|
The scripts of a basic rpg_core.js game look like
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
function start() {
// some codes
}
function update() {
// some codes
}
Graphics.initialize(816, 624, 'webgl');
Graphics.boxWidth = 816;
Graphics.boxHeight = 624;
WebAudio.initialize(false);
Input.initialize();
TouchInput.initialize();
var deltaTime = 1.0 / 60.0;
var accumulator = 0.0;
var currentTime;
window.scene = new Stage();
start();
function performUpdate() {
Graphics.tickStart();
var newTime = performance.now();
if (currentTime === undefined) currentTime = newTime;
var fTime = ((newTime - currentTime) / 1000).clamp(0, 0.25);
currentTime = newTime;
accumulator += fTime;
while (accumulator >= deltaTime) {
Input.update();
TouchInput.update();
update();
accumulator -= deltaTime;
}
Graphics.render(window.scene);
requestAnimationFrame(performUpdate);
Graphics.tickEnd();
}
performUpdate();
|
There is a simple rpg_core.js game written by me which can be accessed here. You can look at its source code by using your browser.
RM also provides a lot of scripts serving as making RPG. There is a simple RPG built by me which can be accessed here.
The source codes of RGSS are secret, but those of rpg_core.js are not a secret and can be seen at its GitHub repo.