wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes Tiled Layers on MIDP 1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Tiled Layers on MIDP 1.0" Watch "Tiled Layers on MIDP 1.0" New topic
Author

Tiled Layers on MIDP 1.0

bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
Hi!
is there a way to make tiled layers in midp 1.0? also, is it possible to put two overlapping tiled layers on the screen?
thanks guys
David Price
Ranch Hand

Joined: Jan 22, 2003
Posts: 93
There's no way to get the MIDP implementation to draw the indexed tiles for you; instead, you'll need to either draw all the tiles yourself in a loop using drawImage, or more likely do that once to an offscreen Image and then draw that Image each time paint is called. I've used that trick successfully myself.
You can use this trick twice to have two overlapping tiled layers, however with standard MIDP 1.0 there's no way to make the offscreen Images transparent so the overlap may look wrong. On Nokia phones you can use the proprietary Nokia UI API, and call DirectUtils.createImage(width, height, 0) to get a transparent offscreen Image to draw into.
If you create two large offscreen 'tiled layer' Images, on some phones you may be pushing the limits of the available heap memory.
bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
tnx david
urarom sogard
Greenhorn

Joined: Sep 10, 2002
Posts: 21
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=J2ME;action=display;num=1053093860
Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
Originally posted by bab javier:
Hi!
is there a way to make tiled layers in midp 1.0? also, is it possible to put two overlapping tiled layers on the screen?
thanks guys

depends upon what LWT or Lightwieght UI library you are using..
synclast UI allows you do tiling of background image in UI widgets..


MobileBytes blog - Sharing Technology - My Programming Knols
bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
tnx guys! i finally got it
 
GeeCON Prague 2014
 
subject: Tiled Layers on MIDP 1.0