[gameprogrammer] Re: Java Advice - 2D RTS Graphics


If you're going that way, this short article might point you at a couple of useful resources


http://javaboutique.internet.com/reviews/gameutil/

T.

----- Original Message ----- From: "Mike Gillissie" <Niyoto@xxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Monday, October 24, 2005 11:51 AM
Subject: [gameprogrammer] Re: Java Advice - 2D RTS Graphics



----- Original Message ----- From: "Matthew Weigel" <unique@xxxxxxxxxxx>

Are you doing any analysis of your memory usage, the impact of garbage
collection, or the rate at which you're creating new objects and letting
them fall out of scope? Java makes it very easy to generate a lot of
memory churn, which taxes GC and in turn sucks CPU cycles away from
everything you're doing. Performant Java requires about as much knowledge
of memory management in C, in my opinion.

A few weeks ago, I ran a profile on my code and saw exactly that - I was creating objects at an alarming rate, and my poor garbage collector was working overtime - spent a bunch of time optimizing the code to reuse objects where possible, to use a more efficient scope for other object variables, etc - still needs work... :)


Also, you are definitely using a slow, naive graphics strategy.  Using
OpenGL should net you serious gains, even with 2D, by letting you play
with the Z-buffer so that redrawing your map graphic doesn't draw over
your units.

Sounds like a good reason to learn something new... :)

Thanks, Matthew!
-Mike



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html





---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: