Iotagames / Untitled

Cyber game
2 stars 0 forks source link

Optimizations #14

Open lolwat999 opened 12 years ago

lolwat999 commented 12 years ago

We should not be doing any draw calls for things not on screen (on the camera).

Same goes for the TiledMap, there's actually a function for this too: public void render(int x, int y, int sx, int sy, int width, int height); The latter four parameters are the ones it uses to draw.

We will need to pass the GameState's Camera as a parameter so we know the right values here.

Entity should also have a void isOnScreen(Camera camera); function for the same purpose.