Hello,
I have recently started to develop my own game in Java and am just starting to get the hang of it. I've watched various tutorials on making an engine etc and have picked up quite a lot.
I am struggling with one problem though, I have a world and two entities (The player and a Rat). The player is controlled using the keyboard which was easy to setup. But, how can I randomly get the Rat to move in a random direction with random intervals all by itself?
I've tried a few different ways but I'm getting quite a few problems with it. I'm not looking for any specific source code since it will be different for mine anyway but I'm just looking for any logic/ideas if anyone has any.
Thanks!