• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tiled and Sprite and LayerManager

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic