Side scroll platformer - enemy control
Hi All
I've got a side scroll platform game underway and have animated main player walking all round the map and I thought I should look at enemies next.
I'm stuck on the logic of how to handle them. Each level is around 8 screens wide in landscape and will have at least 1 enemy per full screen.
I'm unsure if I should update the position and render them all even if they are not in active view? I guess that is the easiest way as I don't need to calculate where I am in the map to decide which ones to update, but I'm unsure if that is the best way ?
Any help / sample code would be appreciated.
I'm scrolling the tileMap when the player is in the middle of the screen.
Thanks
FP
|