The Games API:
The game screen is the core of the user's experience - after all, the game is why they are running our application in the first place!
To understand how the game screen is programmed we begin by outlining the Games API and how its classes are used. Then we will move on to see how games are constructed in general and how our own particular game works.
The API classes:
The MIDP 2.0 Games API provides the following new classes in the package javax. microedition.lcdui.game:
- TiledLayer, which lets us define game backgrounds as a series of layers;
- Sprite class, which lets us program animated sprites;
- GameCanvas, which acts a container for the game objects, displays all the graphics and handles user input;
- LayerManager, which deals with the management of tiled layers and sprites.
TiledLayer and Sprite inherit from an abstract class Layer. GameCanvas inherits from the low-level interface Canvas.
The following very rough analogy may help show how these classes fit in. Think of a game canvas as a puppet theatre, which provides the stage where the action takes place and supplies all the lighting effects. Tiled layers are scenery backdrops that can be shifted and moved. Sprites are actors and props. The layer manager is a stage manager coordinating the actors and scenery.
Before we can describe our game program we need to look at how these classes are used. When you read the following sections, concentrate at first on trying to get the broad picture: what each class does and what its main methods are. Don't try to remember all the technical details for now; you can come back to them later.
Java Assignment Help - Java Homework Help
Struggling with java programming language? Are you not finding solution for your The Games API homework and assignments? Live The Games API experts are working for students by solving their doubts & questions during their course studies and training program. We at Expertsmind.com offer The Games API homework help, java assignment help and The Games API projects help anytime from anywhere for 24x7 hours. Computer science programming assignments help making life easy for students.
Why Expertsmind for assignment help
- Higher degree holder and experienced experts network
- Punctuality and responsibility of work
- Quality solution with 100% plagiarism free answers
- Time on Delivery
- Privacy of information and details
- Excellence in solving java programming language queries in excels and word format.
- Best tutoring assistance 24x7 hours