Most likely all your entities are referring to the same rectangle making it show at one place only. Do the following in your entities:
1 2 3 4
| public Rectangle getRectangle(){ rectangle.setRect(getX(),getY(),getWidth(),getHeight()); return rectangle; } |
Less likely, quite obvious so you probably thought about it, the rectangles are off-screen. Eg you are drawing using the coordinates of the entities but remember while the worldmap may be large (2000x2000 pixels) the gamescreen might only be 512x512 in which case rendering with x,y values outside 512x512 will not show the rectangles, here is a very easy fix:
1 2 3
| public Rectangle getRectangle(){ rectangle.setRect(getX()%512, getY()%512, getWidth(), getHeight()); return rectangle; |
This again assumes you have screensize 512x512, just change with your actual widths and heights.
This will at least update the rectangle even if there is only one for all of the entities, assuming you have those getters in your class
