Archive for 'Iphone 4'

enabling retina display mode in corona sdk

for enabling retina display in corona add the following lines in config.lua

and include images with twice and 1.5 larger than the original and named as image-x2.png and image-x15.png in the project folder

Incoming search terms:

  • corona sdk forums retina display

Enabling Retina Display mode

You should enable RetinaDisplay mode ONLY if you want to use HighRes images on an iPhone4. Remember that an iPhone4 also works in “low res” mode.

// Add this code in your Application Delegate, right after initializing the director

then keep both normal and hd images (with extension image-hd.png).

Initializing the EAGLView in cocos2d

For Initializing the EAGLView the followings are required

Color Buffer

The default color buffer is RGB565. It is a 16-bit buffer, without alpha. In order to use an RGBA8 color buffer, you need to create initialize the EAGLView with:

EAGLView *glView = [EAGLView viewWithFrame:[window bounds] pixelFormat:kEAGLColorFormatRGBA8];

    kEAGLColorFormatRGBA8: Creates an RGBA8 color buffer (32-bit)
    kEAGLColorFormatRGB565: Creates an RGB565 color buffer (16-bit). Faster, but without alpha (default)

Depth Buffer

By default, cocos2d doesn’t use a depth buffer, but you can create one when you initialize the EAGLView with a 16-bit or 24-bit depth buffer. eg:

EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGBA8
depthFormat:GL_DEPTH_COMPONENT24_OES];

    GL_DEPTH_COMPONENT24_OES: 24-bit depth buffer
    GL_DEPTH_COMPONENT16_OES: 16-bit depth buffer
    0: No depth buffer will be created

High Res

Since v0.99.4, the Director can set the color render buffer in High Res mode:

eg:

// Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
if ([UIScreen instancesRespondToSelector:@selector(scale)])
[director setContentScaleFactor:[[UIScreen mainScreen] scale]];

Since v0.99.5, the suggested way to enable Retina display is:

// Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
if( ! [director enableRetinaDisplay:YES] )
CCLOG(@”Retina Display Not supported”);

How does it work:

If you have an iPhone4, the screen resolution will be 960×640

MultiSampling, or Full Screen Anti-Aliasing

Multi sampling works on all devices, but on MBX devices the performance impact is severe.

How to enable it:

Don’t use the CC_DIRECTOR_INIT() macro, but use the code from the sample below.

Incoming search terms:

  • cocos2d-x anti aliasing

Android leads market ahead of Apple

According to research data for Q1 2011, Android is leading the smart phone market for the second quarter running. Google’s OS has 35.7 million units shipped in Q1 2011 increasing its market share to 35%.

Nokia remains numero-uno in 28 countries. Despite the lukewarm success of their latest Symbian smartphones, the adoption of Windows Phone 7 and the death of MeeGo, Nokia has grown 79% in China with 8.9 million units shipped. However, they has lost the global number one spot to Android.

Android also saw a 200% growth in the largest smartphone market – USA, where it dominated with 49% market share. Apple’s share grew to 31%, a growth of over 150% year-on-year. This growth can be credited significantly to the launch of the iPhone 4 on the Verizon Wireless network, which helped boost sales.

BlackBerry maker RIM, however, saw a dip in its market share in Q1 2011. Hopefully, the arrival of the PlayBook tablet and a refreshed smartphone lineup will help BlackBerry back on its feet.

The data comes from Canalys, a research organisation with a focus on technology vendors.

Quality products provided by vendors supported Androids success. “HTC, Samsung, LG, Motorola and Sony Ericsson drove Android shipments in the first quarter, with each vendor shipping well over 3 million devices,” said Peter Cunningham, principal analyst, Canalys. “Samsung also shipped nearly 3.5 million bada operating system-based smart phones, outperforming total shipments of Windows Phone devices by more than a million units.”

“Samsung’s own operating system development, combined with the branding and investment in its Wave smart phones at mid-tier prices, has led to good uptake in developed markets, such as France, the UK and Germany”, continued Cunningham. “This achievement shows that there is still room for multiple operating systems, and that vendors can benefit from maintaining control of device development to hit the right markets and price points.”

Canalys has also confirmed that Asia Pacific is the largest growing smartphone market with a year-on-year growth of 93%. 37.3 million units were shipped, making Asia Pacific a larger market than Europe, the Middle East and Africa for the first time since 2007. The biggest growth has come from India, China and South Korea.

source: here

High resolution display is one of the important feature in iPhone 4.It’s resolution is double than that of the standard iPhone resolution.To implement this you don’t need to change any line of code in your project, the only thing you have to do to create two resolutions of resource images i.e the standard and high resolution and append @2x to the name of the high resolution image name and iOS 4 will automatically use the high resolution version if on an iPhone 4 and the low resolution version on the 3G .

iPad 2 Draw Backs

Apple’s second-generation iPad mostly impresses, but Apple still managed to leave some key technologies out.

Apple failed to deliver on a few vital differentiators in iPad2..

No 4G:
The iPad 2 will be sold in three wireless configurations: Wi-Fi, Wi-Fi + 3G (AT&T), and Wi-Fi + 3G (Verizon Wireless). Looking at the spec sheet, it indicates that the AT&T variant of the iPad 2 supports quad-band GSM/EDGE and quad-band UMTS/HSDPA/HSUPA. The Verizon Wireless variant uses EVDO Rev. A. These are 3G technologies. The iPad 2 doesn’t have HSPA+, nor does it have LTE.

No NFC:
Apple failed to add near-field communications (NFC) capabilities to the iPad 2.Google’s Android platform (at least the 2.3 Gingerbread version) supports NFC, though only one phone is properly equipped.Getting the chips into mobile devices of any shape/size will help drive the NFC and mobile payment ecosystem forward. Sadly, not with this generation.

No Accessory Improvements:

Apple didn’t change a darned things about the iPad’s accessory support.That Apple didn’t move (or at least duplicate) the 30-pin connector to the side of the device for better landscape compatibility. The iPad 2 also doesn’t have an SD card slot for expandable memory.

No Display Improvements:

The iPad 2 uses the exact same display as the original iPad. It measures 9.7-inches across the diagonal, and has 1024 x 768 pixels, giving it a disappointing 132 pixels per inch. By way of comparison, the iPhone 4′s Retina Display has a pixel density of 326ppi. Perhaps we’ll see a better display on next year’s model.

iPhone Market in U.S. and EU5

A recently released report by business analytics firm says that Apple iPhone 3GS and iPhone 4 topped the list of top acquired phones in United States and EU5. For both the regions, Apple iPhone 3GS and iPhone 4 ranked 1st and 2nd respectively.
In United States, BlackBerry Curve 8530 ranked 3rd top acquired phone followed by LG – Cosmos and Motorola – Droid respectively.
In EU5, Nokia devices, Nokia – 5800 XpressMusic and Nokia – 5230 stood 3rd and 4th in the list of top acquired phones followed by BlackBerry Curve 8520.
The report reveals the growing popularity of smartphones as in the U.S., 4 of the top 5 acquired devices were smartphones, while 3 of the top 5 in Europe are smartphones.