Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor pillar's Avatar
    Join Date
    Feb 2006
    Posts
    112
    Hello,

    I need to optimize my code a little bit and I'm wondering how to do it.

    I am making this game where I need to create this 9x9 grid. I can do it by Graphics drawLine or then by having an image and drawing it with drawImage. My question is, which way is faster and preferred?

  2. #2
    Registered User simonhayles's Avatar
    Join Date
    Aug 2005
    Posts
    29
    Images are always faster - the drawLine/fillRect &c commands are very slow on some phones...

  3. #3
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    drawImage() will be faster but will consume more memory (for the Image obviously).

    If the game is heavy on heap use then the extra memory consumption might mean that the garbage collector start kicking in all the time and that will put a dent in performance. But this will only happen in extreme cases.

    shmoove

Similar Threads

  1. Draw lines into EDWIN like in SMS app
    By stenlik in forum Symbian User Interface
    Replies: 6
    Last Post: 2006-11-30, 09:04
  2. S80: How to draw bitmap without drawing the whole view
    By craitane in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2005-09-12, 13:37
  3. Draw CEikEdwin somewhere else...
    By nimbus_cloud in forum Symbian C++
    Replies: 2
    Last Post: 2005-09-01, 08:51
  4. Replies: 0
    Last Post: 2004-08-06, 04:56
  5. sprite draw: drawImage vs. fillArc ?
    By ionutianasi in forum Mobile Java General
    Replies: 2
    Last Post: 2004-03-11, 12:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved