BASIC

Author Topic: Gradients on iPhone problem?  (Read 2308 times)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Gradients on iPhone problem?
« on: 2010-Mar-26 »
Hi there,

I have some problems when using gradients on iPhone. On emulator all looks great, but when i build to iPhone i get somewhat gradient effect like using low bit depth.
If i move the image to iPhone directly, i can see the gradient effect perfectly clear.
I dunno if it normal (if iPhone get low bit depth when gaming), or if it is anything related to GLBasic.

Anyone has experimented some similar?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: Gradients on iPhone problem?
« Reply #1 on: 2010-Mar-26 »
Hello Francisco,

Yes, I saw the same thing, in our game "FastBall". It seems IPhone has 16 bit depth and the images you create in 32 bit appears to have less colors on IPhone thus a more noticable color changes, especially with gradient effects.

Özden

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Gradients on iPhone problem?
« Reply #2 on: 2010-Mar-27 »
Hi Ozden,

Yep, it's seems to be something related to bits depth; but is extrange that if you sync the same image on iPhone, the gradient seems to work well. (So it's seems to be only related to games).

Anyway, thanks for repply! ^_^

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4142
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Gradients on iPhone problem?
« Reply #3 on: 2010-Mar-27 »
The reason is indeed due to bit-colour depth. The Wiz has the same problem.

According to Wiki, the iPhone is -
Quote
18-bit (262,144-color) LCD with 163 pixels per inch (ppi)

So anything over 16bit colour depth will look different and it's not GLBasic or only games. So don't bother wasting memory on anything above 24bit colour.
I came. I saw. I played.

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Gradients on iPhone problem?
« Reply #4 on: 2010-Mar-28 »
Hi Ian,

Thanks for your help, but the problem here, is that when I sync the image with my iPhone, its look kinda different that when i code as 'game background'. That why i am a bit confusing :S. Maybe they use different algorythm to compress?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3356
  • Integrated Brain
    • View Profile
Re: Gradients on iPhone problem?
« Reply #5 on: 2010-Mar-28 »
Hi Fj, try to make the gradient whit another soft, in my case the gradients make in photoshop don´t works well, but makes in 3ds max in .png 16bits works well for me.

The photoshop make in some cases things wrong, another example is the efects, if you make a glow whit PS, don´t have transparency on Iphone, but make on max or another soft 3d, the glow works well, the output format it the same, but I thin kevery aplicatión have his own behaviors about the outputs formats.

Best Regards,
Iván J.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1766
    • View Profile
    • Homepage
Re: Gradients on iPhone problem?
« Reply #6 on: 2010-Mar-28 »
If you want transparency with PhotoShop you need to "Save for web..." and choose one of the PNG presets and make sure the checkbox "Transparency" is set.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3356
  • Integrated Brain
    • View Profile
Re: Gradients on iPhone problem?
« Reply #7 on: 2010-Mar-28 »
Ok, Moru thanks for the reply.

I don´t probe this what you comment.

Best regards

Iván J

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Gradients on iPhone problem?
« Reply #8 on: 2010-Mar-29 »
Hi,

Thanks for your reply.

I think the problem is anything related to bit depth finally.

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com