I am trying to build an RPG tile-map based game. Currently I am going to set enemy sprites that will be repeating their motion in fixed path. Suppose that I have a level map, which has got width 3 times greater than actual applet visible to user.
Now my question is that how should I handle creation of enemy sprites? I have got two options in my mind:
1) Create all enemies at a time on level load (I don't want to follow this approach as it will take up extra memory).
2) Create enemies till the level map is visible to user. Load new enemies as user goes further. I want to follow this one but I don't have any idea.
Can someone give me hints to follow this step and tell me approach usually followed by game developers?