Jump to content
  • Advertisement

Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65870

Camera movement working! Profiling

Sign in to follow this  
H_o_p_s

220 views

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  


2 Comments


Recommended Comments

Neat, what profiler did you use? There's one built-in to the JVM right? Was it hard to set up?

Share this comment


Link to comment

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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!