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.

How are the scripts run in rpgmaker xp?

Yes, at least the "main" or "update" method of the current scene is run every frame.

If you look at the Main script, you'll see a 'while' loop that runs $scene.main

Above that, $scene gets set to Scene_Title (Which creates an object of that class, and assigns it to $scene)

In the main method of Scene_Title, it reads in all of the rxdata, sets up the menu, then runs a loop containing:

Graphics.update # refresh screen & advance 1 frame
Input.update # check to see if there is any input from the keyboard
update # If the Action key is pressed, execute the command currently chosen

When you select New Game, the $game_* data is set up, and the $scene is changed to Scene_Map.new, so the Scene_Title object disappears (is disposed), and a new object (Scene_Map) is created, and now it's main method runs.

Why do you ask?
 
I am just trying to learn how things work(and trying to learn what the equivalent variables and functions are for this program compared to game maker or flash), thank you for your help
 

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