Hi, I’m relatively new to Java, but can’t get my head round this.
I was creating a 2d game engine, but was noticing very low fps when the applet size was increased. I created an new applet that has size of 1200x800. The applet only fills a black rectangle, draws it onto a bufferedImage, then draws the bufferedimage, using the overriden ‘update()’ method. It gets approx 45-51 fps.
I then created a non-applet version extending JPanel. This does the same, and gets 47-80fps.
These fps ratings go down with larger screen size, but I want a large screensize. The codes are very short; can anyone tell me what I’m missing here? What have I completely missed out on? I refuse to believe this is the best fps I can acheive. Drawing layers from images at fullscreen I got down to 19fps. I also tried drawing several smaller boxes onto the screen at different points, same problem.
The applet version: http://pastie.org/1676959
JPanel: http://pastie.org/1676965