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.

Scene_Map#update loop

I've been trying to figure out what this loop is for but nothing has come to mind. I removed it any everything SEEMS to work fine, so I just want to make sure that it is not important. Thanks in advance:

Code:
# Loop

    loop do

      # Update map, interpreter, and player order

      # (this update order is important for when conditions are fulfilled 

      # to run any event, and the player isn't provided the opportunity to

      # move in an instant)

      $game_map.update

      $game_system.map_interpreter.update

      $game_player.update

      # Update system (timer), screen

      $game_system.update

      $game_screen.update

      # Abort loop if player isn't place moving

      unless $game_temp.player_transferring

        break

      end

      # Run place move

      transfer_player

      # Abort loop if transition processing

      if $game_temp.transition_processing

        break

      end

    end
 
well yes it is there, but it has to to update the map scene all the time, not only once, cause you need the character input all the time, when walking around, opening the menu etc. it always is looking if a key is hit to do something and this 40 times per second to run smooth, admmit just try you idiot try to walk or move anything, it won't work, dammit i shouldn't have answered to this stupidity
 
That loop makes sure that player transfer is complete before processing the rest of the update loop (in main & the rest of update). (Including the first transfer to the starting map)
You should get an error if remove the loop

The question should be: Why do want to remove the loop?
 

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