So I'm wracking my brain on trying to figure out how to do random encounters on my world map. Everywhere else on the game has visible enemies, but I want it to be random on the world map, but not to the extent it is detrimental to the player. Although my world map is split into many areas because it's parallax, I'm trying to limit the amount of events on the screen for performance issues.
The goal:
Have certain areas have certain level random encounters. If you are in one of these areas above a level limit, you will have a much lower encounter rate.
Proposed solution, but not implimented:
Have event on map, player touch. Change variable to = character level. Check level variable, if less than or equal to 4, set random encounter variable 1-5. If 1, random encounter. This will give players in this area (starting area, where they should be levels 1-4) a 1 in 5 chance per tile to get a random encounter. ELSE if check level variable is 5 or above, set encounter variable 1-10. This will give players in this area only a 1 in 10 chance to encounter these enemies. Seeing as it would be more of a nuisance as they are over leveled.
Each area would have different level monsters this way, and going through lower level areas when you are a higher level would be less annoying as you would encounter lower level enemies.
The problem with doing this, is that every tile that is passable on the world map will need this event on it, which will lower performance. Would making a common event, and calling it from each tile be less resource heavy? What are any solutions that you can think of to solve this problem, or make it so that it doesn't need events on every passable tile?
The goal:
Have certain areas have certain level random encounters. If you are in one of these areas above a level limit, you will have a much lower encounter rate.
Proposed solution, but not implimented:
Have event on map, player touch. Change variable to = character level. Check level variable, if less than or equal to 4, set random encounter variable 1-5. If 1, random encounter. This will give players in this area (starting area, where they should be levels 1-4) a 1 in 5 chance per tile to get a random encounter. ELSE if check level variable is 5 or above, set encounter variable 1-10. This will give players in this area only a 1 in 10 chance to encounter these enemies. Seeing as it would be more of a nuisance as they are over leveled.
Each area would have different level monsters this way, and going through lower level areas when you are a higher level would be less annoying as you would encounter lower level enemies.
The problem with doing this, is that every tile that is passable on the world map will need this event on it, which will lower performance. Would making a common event, and calling it from each tile be less resource heavy? What are any solutions that you can think of to solve this problem, or make it so that it doesn't need events on every passable tile?