2d rpg random encounters?
-
I've been working on this rpg for a while and I think I've gotten alot done but I haven't got a clue how to do random enemy encounters by just walking on the ground and ideas perhaps as simple as possible and thank you.
-
You could generate a random number each step then check if it was less than a predefined probability to enter a battle. Something like:
battle = random(100) if battle < 5 then startBattleFunction() endifThis would give an encounter every 20 steps on average. You could play with the numbers until you got an encounter rate that was right for your game.
-
Thank you I'll give it a try.