The Source for Java Technology Collaboration
User: Password:



Chet Haase

Chet Haase's Blog

Java Gaming Part 2

Posted by chet on November 16, 2004 at 08:29 AM | Comments (2)

I know everyone was on the edge of their seats waiting for Part 2 of the game development article that Dmitri Trembovetski and I wrote. Well, you can stop biting your nails and check out the second and last installment at the Java Developers Journal site.

Part 1 of the article focused on general game framework issues. This second part dives into 2D rendering and performance details.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Hi Chet, thanks for the article and here are 2 quick questions from reading it:
    1. Does BufferStrategy.show() block till the vertical retrace is over or does it return immediately? It isn't clear from the API reference. This sounds like the good'ol loop in DOS days:
    in al,dx
    test al,08h
    jnz WAIT
    Is that what's happening beneath the hood? :-)
    2. GraphicsDevice.getAvailableAcceleratedMemory() gave me 178MB free on my laptop that has a Mobility Radeon 9000 64MB. That's not good... BTW, I'm using JDK1.5.

    Posted by: rexguo on November 22, 2004 at 12:42 AM


  • Hi,


    1) BS.show() only waits for vertical retrace in the case of a FlipBufferStrategy (which will only be in effect if you are fu nning in fullscreen/exclusive mode). Otherwise, BS.show() will simply be calling drawImage() from the back buffer to the screen, asynchronous to the vertical retrace.


    2) I suspect that we are checking for all local and nonlocal video memory. That is, your card may have 64 MB of onboard video memory, but may also have some larger number assigned to AGP memory from your system heap. We currently allow offscreen surface creation (ala VolatileImages) in AGP memory, so we are probably treating all AGP and local VRAM as the same pool.
    We may want to tighten that up eventually (for example, allow a flag to discriminate between the two pools), but that's the way it works today.


    Hope that helps.


    Chet.


    Posted by: chet on November 22, 2004 at 06:31 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds