Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  JVM memory usage for a small game?  (Read 1008 times)
0 Members and 1 Guest are viewing this topic.
Offline 20thCenturyBoy

Full Member
**

Posts: 118


Ooh my head hurts...


« on: 2004-04-25 05:10:14 »

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
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #1 on: 2004-04-25 06:42:27 »

If this is the tutorial SpaceInvaders 101 I'm afraid I can explain it Smiley

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

Offline 20thCenturyBoy

Full Member
**

Posts: 118


Ooh my head hurts...


« Reply #2 on: 2004-04-25 07:00:52 »

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
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.087 seconds with 20 queries.