Questions about scaling -- libgdx

Hey guys,

I’m in the middle of making my game that takes on the general structure of a 2d overhead MMORPG. I am at the point where I need to be coding with larger scale in mind. The thing is, I’m not really sure if what I am doing is considered efficient. Here is where I am at, and here are my questions:

Currently I have a small test environment I made with Tiled. Within the environment I make a player controlled object, and an enemy object that roams randomly while in dosile state, and chases the player if the player approaches within range.

  1. At the moment I have the enemy object constantly calculating the distance between enemy and player. If the player comes within range, the enemy attacks. Is this how a MMORPG is typically built? My concern is that if I have over 5000 enemy’s on one very large instance of a MMORPG map which constantly calculates it’s distance to each player object, won’t that slow down efficiency and put strain on each players computer?

  2. If a player is within the game, is their computer effectively trying to account memory for each monster on the entire map, even if it’s outside of the players visible range?

  3. When generating player and enemy objects with libgdx, I’m simply creating the objects and calling batch.draw on them. Is this an effective way of generating players and monsters?

Best,
Void