TODO   TODO   TODO   TODO   TODO   TODO   TODO   TODO   TODO   TODO   TODO   
--------------------------------------------------------------------------------

**** Sun Aug 15 22:17:14 BST 1999 ****

Need use the application properties to save / reload user defined key
settings ...


**** Tue Aug 10 23:39:26 BST 1999 ****

I am very *frustrated* with the ScreenUpdater bug in JDK1.1.7-v3a. Is this
internal class fixed in JDK 1.2? I know it has something to do
`GameEngine.addWorldObject()'. Any clue to what is really going on behind
the scenes will be appreciated.

Here the thread dump from Control-\ :

Player died - Dropping all humans now (2)
human[0] wx:3032, wy:24
human[1] wx:1020, wy:24
endLevel()
        Human.getInstanceCount()=2
        Pod.getInstanceCount()=-220
        Swarmer.getInstanceCount()=-220
        bomberCounter.getCount()=0
        podCounter.getCount()=0
        swarmerCounter.getCount()=0
human[0] wx:3090, wy:24
human[1] wx:3241, wy:24
human[2] wx:1934, wy:24
human[3] wx:2554, wy:24
human[4] wx:1924, wy:24
human[5] wx:1824, wy:24
human[6] wx:3940, wy:24
human[7] wx:406, wy:24
human[8] wx:1501, wy:24
human[9] wx:1763, wy:24
SIGQUIT   3*   quit
        stackbase=0x414c1000, stackpointer=0x414c0b3c

Full thread dump:
    "Screen Updater" (TID:0x4067deb0, sys_thread_t:0x41502e0c, state:CW) prio=4
        java.lang.Object.wait(Object.java)
        sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:70)
        sun.awt.ScreenUpdater.run(ScreenUpdater.java:90)
     "Thread-4" (TID:0x4067e0d0, sys_thread_t:0x414c0e0c, state:R) prio=5 *current thread*
        xenon.humanoid.HumanoidGameEngine.generateBombers(HumanoidGameEngine.java:1147)
        xenon.humanoid.HumanoidGameEngine.startLevel(HumanoidGameEngine.java:1046)
        xenon.gamekit.GameEngine.gameMainLoop(GameEngine.java:866)
        xenon.gamekit.GameEngine.run(GameEngine.java:1088)
        java.lang.Thread.run(Thread.java)
    "Audio Player" (TID:0x4067f1c8, sys_thread_t:0x4149de0c, state:CW) prio=10
        java.lang.Object.wait(Object.java)
        sun.audio.AudioDevice.waitForData(AudioDevice.java:339)
        sun.audio.AudioDevice.play(AudioDevice.java:355)
        sun.audio.AudioPlayer.run(AudioPlayer.java:113)
    "AWT-Motif" (TID:0x406785f8, sys_thread_t:0x41438e0c, state:CW) prio=5
        java.lang.Thread.run(Thread.java)
    "AWT-Input" (TID:0x40678398, sys_thread_t:0x41417e0c, state:R) prio=5
    "AWT-EventQueue-0" (TID:0x406787e8, sys_thread_t:0x413f6e0c, state:CW) prio=5
        java.lang.Object.wait(Object.java)
        java.awt.EventQueue.getNextEvent(EventQueue.java:118)
        java.awt.EventDispatchThread.run(EventDispatchThread.java:67)
    "Finalizer thread" (TID:0x40678210, sys_thread_t:0x413bce0c, state:CW) prio=1
    "Async Garbage Collector" (TID:0x40678258, sys_thread_t:0x4139be0c, state:R) prio=1
    "Idle thread" (TID:0x406782a0, sys_thread_t:0x4137ae0c, state:R) prio=0
    "Clock" (TID:0x40678088, sys_thread_t:0x41359e0c, state:CW) prio=12
    "main" (TID:0x406780b0, sys_thread_t:0x81c2d18, state:CW) prio=5
Monitor Cache Dump:
    java.awt.EventQueue@1080526440/1080935528: <unowned>
        Waiting to be notified:
            "AWT-EventQueue-0" (0x413f6e0c)
    sun.awt.motif.MToolkit@1080526392/1080935272: <unowned>
        Waiting to be notified:
            "AWT-Motif" (0x41438e0c)
    sun.audio.AudioDevice@1080554048/1081282096: <unowned>
        Waiting to be notified:
            "Audio Player" (0x4149de0c)
    <unknown key> (0x0x4139be0c): owner "Async Garbage Collector" (0x4139be0c, 1 entry)
    sun.awt.ScreenUpdater@1080549040/1081220240: <unowned>
        Waiting to be notified:
            "Screen Updater" (0x41502e0c)
    xenon.humanoid.HumanoidGameEngine@1080543936/1080926296: owner "Thread-4" (0x414c0e0c, 1 entry)
Registered Monitor Dump:
    Thread queue lock: <unowned>
        Waiting to be notified:
            "main" (0x81c2d18)
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
        Waiting to be notified:
            "Finalizer thread" (0x413bce0c)
    Dynamic loading lock: <unowned>
    Monitor IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: owner "AWT-Input" (0x41417e0c, 1 entry)
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x41359e0c)
    Monitor registry: owner "Thread-4" (0x414c0e0c, 1 entry)
Thread Alarm Q:





**** Fri Aug 06 00:18:39 BST 1999 ****

o BUG vanishing humans that are RESCUED by the Starship, where are they
disappearing to?


**** Sun Jul 11 16:03:48 BST 1999 ****

o We display loudspeaker enabled / disable icons (mute)

o Fix iconify


**** Tue Jun 29 22:33:14 BST 1999 ****

o Need to document the `gamekit' and `soundkit'.

o Need a utility class and GUI to allow user to set own user defined keys.

o Need a ScoreBoard object to handle scores.  What to do with Applet, need
  to disable? *ALMOST DONE*


**** Mon Jun 07 00:05:02 BST 1999 ****

Still can't SuSE Linux to dial out Demon ISP because
of ioctl(PPPIOCGUNIT) Operation not permitted?
*Call me some day* THIS HAS BEEN *FIX*


Bug in the Human list because of entities. *DONE*

First graphics for the mini starship, smart bomb for the display. *DONE*


Got most of code working need to fix the human sprites are disappearing
for some reason. Humans has disappeared. *DONE*

Need an ObjectCounter thread safe. Make the `ObjectCounter' in Lander a
separate class part of the gamekit. *DONE*

Put an object counter in the `EnemyObject' to count the number of enemies ,
so we know the sheets (bomber, landers, mutants, baiters ) ended.

Need the baiters (200 pts), bombers (250 pts), pods (1000 pts), and
swarmers(150 pts) all subclasses of EnemyObject. By the way, in case I
forgot to say it, lander (150 pts) and mutant (150 pts).
*DONE*

Need to get rid of inefficient MediaTracker in the WorldImage.loadImage()
and put it as a convenient static method in the `GraphicsUtils' class.
*DONE*

Need to make GameEngine is general Object, instead of subclass of Component
so that it can use a different `DoubleBufferedCanvas' ie Swing.
*UNSURE*

Need to create `CollisionDetector in order register custom custom
collision classes. Two methods to register and unregister the detector.
*DONE*
 
Also need that readers and writers lock utility class.
*UNSURE*

**** Tue Jun 01 03:03:43 BST 1999 ****

Other ideas

*NOT DONE*

Incorporate a dummy world object into positions 0 and 1 in the
sprite array list. DummyObject are always inactive and not visible

In the beginning

   spriteList[0] = new DummyObject(...);
   spriteList[1] = new DummyObject(...);
   
setBackground( WorldObject x )
if ( x == null )
   spriteList[0] = new DummyObject(...);
else
   spriteList[0] = x;
}

getBackground()
{
   if ( spriteList instanceof DummyObject )
      return (null);
   return spriteList[0];
}


Ditto for player object at index 1.

Thus we guarantee background->starship-> rest of world objects  

This could help us code the hyperspace sequence.

Implosion implosion = new Imposion(
	  new Starship( ), ...
	  short_delay );

engine.setPlayerObject( engine. implosion, random()*world_width, random()*world_height );


o    Mutant all lander when all humans are dead *DONE*
o    Add sheet level and difficulties *DONE*
o    Save tiny test game for FreeInstaller *ALMOST*
o    Add Instructions *DONE*
o    Add First Screen *DONE*
o    Create Pods
o    Create Bombers
o    Create Spores (Swarmer)
o    Create Baiter
o    Make an applet version


*** DONE ***

Strange Errors on Solaris JDK Race Conditions

^Cpilgpe@poppy [71] > Humanoid
GameEngine.setBounds(5,25,600,424)
GameEngine.setBounds(5,25,600,424)
GameEngine.setBounds(6,26,601,424)
paint.createDoubleBuffer()
    component size:601,424
    off image:sun.awt.motif.X11OffScreenImage@1dae1288  off GC:sun.awt.motif.X11Graphics[0,0]
    off image size:601,424
Exception occurred during event dispatching:
java.lang.NullPointerException
        at xenon.humanoid.Implosion.drawObject(Implosion.java:185)
        at xenon.gamekit.GameEngine.paintSprites(GameEngine.java:380)
        at xenon.humanoid.HumanoidGameEngine.paintWorld(HumanoidGameEngine.java:104)
        at xenon.gamekit.GameEngine.paint(GameEngine.java:327)
        at xenon.gamekit.GameEngine.update(GameEngine.java:400)
        at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:275)
        at java.awt.Component.dispatchEventImpl(Component.java:1862)
        at java.awt.Component.dispatchEvent(Component.java:1741)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:79)
^Cpilgpe@poppy [72] > Humanoid
GameEngine.setBounds(5,25,600,424)
GameEngine.setBounds(5,25,600,424)
GameEngine.setBounds(6,26,601,424)
paint.createDoubleBuffer()
    component size:601,424
    off image:sun.awt.motif.X11OffScreenImage@1dae12e6  off GC:sun.awt.motif.X11Graphics[0,0]
    off image size:601,424
starshipAndAlien(xenon.humanoid.Starship@1dae0d6f,xenon.humanoid.Bomblet@1dae204f)
lives = 6
starshipAndAlien(xenon.humanoid.Starship@1dae0d6f,xenon.humanoid.Bomblet@1dae39b0)
lives = 5
Exception occurred during event dispatching:
java.lang.NullPointerException
        at xenon.humanoid.Explosion.drawObject(Explosion.java:187)
        at xenon.gamekit.GameEngine.paintSprites(GameEngine.java:380)
        at xenon.humanoid.HumanoidGameEngine.paintWorld(HumanoidGameEngine.java:104)
        at xenon.gamekit.GameEngine.paint(GameEngine.java:327)
        at xenon.gamekit.GameEngine.update(GameEngine.java:400)
        at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:275)
        at java.awt.Component.dispatchEventImpl(Component.java:1862)
        at java.awt.Component.dispatchEvent(Component.java:1741)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:79)
^Cpilgpe@poppy [73] > 






http://developer.java.sun.com/developer/technicalArticles/Interviews/DoubleBuffering/index.html

Image offScreenBuffer;

public void update(Graphics g)
    {
    Graphics gr; 
    // Will hold the graphics context from the offScreenBuffer.
    // We need to make sure we keep our offscreen buffer the same size
    // as the graphics context we're working with.
 if (offScreenBuffer==null ||
                (! (offScreenBuffer.getWidth(this) == this.size().width
                && offScreenBuffer.getHeight(this) == this.size().height)))
        {
        offScreenBuffer = this.createImage(size().width, size().height);
        }

    // We need to use our buffer Image as a Graphics object:
    gr = offScreenBuffer.getGraphics();

    paint(gr); // Passes our off-screen buffer to our paint method, which,
               // unsuspecting, paints on it just as it would on the Graphics
               // passed by the browser or applet viewer.
    g.drawImage(offScreenBuffer, 0, 0, this);
               // And now we transfer the info in the buffer onto the
               // graphics context we got from the browser in one smooth
motion.
    }




**** Tue Apr 20 11:41:41 BST 1999 ****

Peter A. Pilgrim

;;; Emacs File Variables
;;; ------------------------------------------------------------
;;; Local Variables: ***
;;; mode:Indented-Text ***
;;; fill-column:75 ***
;;; End: ***
