• 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 Layers on MIDP 1.0

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tnx david
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=J2ME;action=display;num=1053093860
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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..
 
bab javier
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tnx guys! i finally got it
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic