How to Make an RPG Overworld
An RPG overworld is the map or background of an RPG project. It can often scroll with the main character's movement to allow the viewer to travel among a rather large world. Other objects such as enemies in the world need to therefore have positions relative to the scroll of the background. The player's perspective is looking down at the character, rather than the player looking at the character from the side. Шаблон:Note
Main Idea
In the RPG, the player figuratively moves but remains with a static x and y position. The world that is visually behind the character moves opposite the character due to the limitations of the stage's size compared to the world's.
Main Character Movement
Assuming scrolling is utilized for the gameplay, the following script can be placed in the main character sprite to scroll the background:
Making Boundaries
Boundaries set limits on how far the world can be scrolled. The player sprite, who controls all scrolling, can have a modified script shown below to set boundaries of the world:
Enemy Movement
Enemies in an RPG often move to bring more excitement and challenge to the game. An enemy who remains still may not be as difficult to defeat as one who moves. Enemies must scroll with the over world because only the main character remains in a static position. When the world scrolls due to the player's movement, the enemy has to scroll with the background to justify the movement properly. The first step is to create the enemy sprites, which can be drawn in the paint editor or imported. Enemies may have movement that differs from one another. To generate random movement in the over world, the following script can be used or relate to one's needs:
Create a variable named "battle". When the battle starts, this will keep the battle from repeating over and over again. Lastly, use these scripts: