|
|
Technical Details:
Minimum Requirements: B/W version: CLDC-1.0; MIDP-1.0; 52k available program space; 256k heap size.
Recommended Environments: B/W version: Optimized for the Motorola i85, i50 and i90 phones. Color version for the Motorola i95cl.
Network Requirements: None -- Gravity Monkey™ does not currently use a network connection.
Data Storage Requirements: B/W version: 9k data storage space for the application (note, however, Gravity Monkey does not currently store user data).
Information and Limited Technical Support: contact us!
|
How Does It Work?
Gravity Monkey is built in Java™, specifically on the Java 2 Micro-Edition (J2ME) with the Connected Limited Device Configuration (CLDC). Download the J2ME Toolkit from Sun if you're interested in finding out detailed information about the API. Gravity Monkey ™ was built using the toolkit and Sun One for Java, which was once Forte for Java, which integrates everything nicely. And, of course, you'll need a device to test it with -- and Gravity Monkey has been extensively tested with the Motorola i85 and i50, available through Nextel.
As if there wasn't enough AO (acronym overload) at this point, Gravity Monkey utilizes the Java Mobile Information Device Profile (MIDP), and the primary Java class that runs the application gmonkey.GMonkey is a subclass of the class javax.microedition.midlet.MIDlet. The MIDlet returns an instance of the class javax.microedition.lcdui.Display, which we set to subclasses of javax.microedition.lcdui.Canvas: our gmonkey.MSplash (which handles the splash screen and the final score screen) or gmonkey.MCanvas (which handles the actual game). The help screen is handled within gmonkey.GMonkey itself, although it could have warranted a separate subclass of Canvas.
Click below to see a simplistic UML Class Diagram of all the classes involved in Gravity Monkey:
The gmonkey.MCanvas class that manages all the game functionality contains instances of other classes that make the game go:
gmonkey.Monkey, which manages the movement and animation of Gravity Monkey himself. Gravity Monkey is animated from images (PNG) that are imported.
gmonkey.Bananas, which manages randomizing the animation and location of all the bananas. The bananas are drawn onto the screen from the Graphics object, using the drawArc() method.
gmonkey.Flock, which manages the overall behaviour of all the birds, including
gmonkey.Bird and it's subclasses:
gmonkey.LeadBird, which serves as the leader of the flock.
gmonkey.ChildBird, which follow the location and actions of the lead bird.
- Note, the birds are also drawn from the
Graphics object. Drawing a vaguely realistic looking bird, and realistic looking flocking mechanisms were the most enjoyable part of the project!
gmonkey.Rock, which manages the animation of the rocks that the monkey throws, including collision tracking (also drawn from the Graphics object).
gmonkey.Chest, which animates the chests that fly across the screen. The chest are animated from images that are imported.
That's a high level survey of what makes Gravity Monkey go. There is a pretty liberal use of objects, and I haven't had to do a high degree of optimization for performance reasons. Of course, there are limits to the total numbers of things: only one rock flying at a time, only a dozen bananas or so in the air, a total of six possible birds in the flock -- but beyond those limits, I'm quite impressed with the way Java performs on the Motorola phones. It's just as reliable as initial web browser support of Java 1.0 back in 1995/96, and seemingly a much better performer than the KVM classes released for the Palm OS (I have no facts to back up the claims, of course, just what I remember of performance and stability).
If you want greater detail to the UML diagram, then check out the diagram below. This includes attributes per class, and gives you a slightly greater chance of figuring out how it all fits together.
If this much data doesn't satisfy your curiousity (after all, what good monkey isn't curious), please let us know, and we'll try to answer your questions. At this point there are no plans to release the source code for Gravity Monkey ™, but if there is sufficient support for GMonk and other planned releases, then a source release is certainly plausible -- the goal isn't to protect any proprietary code: we just want to keep our Easter Eggs hidden from plain site.
|
|