• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiled and Sprite and LayerManager

 
Michelle de Beer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking into the GameCanvas-class and would like some pointers on how to use it.

TiledLayer:
I would like to create a custom screen using two small images, like this:

********
*------*
*------*
********
* = frameImage.png
- = fillImage.png

How would I go about creating this screen?


LayerManager:
I really like the idea of having graphical areas in different layers.

Can I put graphics created using the lcdui.Graphics class (like a simple smiley face created with drawArc()) in a layer, or are the layers used exclusively for pixel images?

If so, can I create an image from the lcdui.Graphics class to use in a Sprite-layer?

Finally, can you point me to some good resources explaining the GameCanvas.

Best,
// Michelle
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good questions.

You can draw anything you like since the GameCanvas has a paint(Graphics g) method it inherits from Canvas.

I believe for the Tiles you put then all in one file, and then it gets layed out. The Tiles are always in the background.

Here are a bunch of technical articles at Sun's website, check near the bottom.

This one in the list is specific about the GameCanvas and stuff.

On the Book side Jonathan Knudsen's J2ME book is my favorite. Carol Hamer's J2ME Games book is also a very good reference. Both are published by Apress.

Good Luck

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic