JVM memory usage for a small game?

At http://grexengine.com/sections/externalgames/
there’s a nice little example of accelerated 2D graphics. Nothing fancy, just a simple Space Invaders clone. No sound, no sprite animation. The thing is, when I run it, the memory usage on my WinXP machine increases by 145MB! I assume most of this is taken up by the JVM (I’m using JRE 1.4.2) as the game really is very simple with minimal graphics. My question is, is this the norm for simple Java apps and should we assume all users have 512MB RAM these days? Or am I missing something ?

20thCB

If this is the tutorial SpaceInvaders 101 I’m afraid I can explain it :slight_smile:

When I wrote the JNLP for the tutorial I just ripped a JNLP file from an old game. It has max-heap and min-heap system properties set to 128MB (since the game it came from loaded rather alot of data).

I’ve rectified this now and you should find the current version runs <20MB.

Good find! Cheers.

Kev

Yay - that fixed it! Cheers Kev.

Phew, for a minute there I thought I was going to have to ditch Java and go back to C (please God no…)

20thCB