Any movements, actions, animation that needs to be run infinitely should be wrapped in the loop and endloop statements. The statements written within the loop will be run one after the other forever. loop is the ideal place to write business logic for a game.

For example, to continuously move the word "Hello" to the right you can put the move statement in the loop as shown below

shape greeting(text):
  .text = "Hello"
  .color = RED
  .position = (100, 100)


Revine Command Example

Notice any errors or typos? Please let us know or feel free to edit loop.md and issue a pull request.

Follow us on twitter @RevineLang

Built by Arpit Bhayani