• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Camera movement working! Profiling

Sign in to follow this  


All right, with a new eye today I got the camera movement working. And I've finally got a java profiler. So after I did some profiling I was pretty shocked on what came up as far as the most objects and cpu times. Before the profiling every image created a new Rectangle object for bounds every draw. I didn't do this on purpose, and quickly saw why it happened, but I would have never caught it without profiling.

When looking at cpu usage I also found more interesting results. I would have thought that the rendering method was taking the most cpu, but I found out that it wasn't. Instead finding the in order to draw the graphic. On more examination of the code I found out that I should instead include two int values inside of the Tile object instead of calculating it every frame for every object drawn.

So anyway, profiling is rather informative!
Sign in to follow this  


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement