Subscribe to web2feel.com
Subscribe to web2feel.com

Welcome to My Website

ShaTechs... Technology at your reach...

How to create a cocos2d app in android SDK

Posted by shajir Friday, June 17, 2011 3 comments

We can create a simple cocos2d helloWorld app in android sdk simply by follow the steps below. Before that you need eclipse in your system with android sdk.

1. Open eclips and select File-->New-->Android Project,    then you got a window like this


 2. You just name the project and other fields like in the image and hit the finish button. Now your project is in workspace


3. Open your project --> src --> com.shatechs.firstcocos2d and double click on the java file. Now your java file appears on the code window as below.


4.  After that you right click on project folder -->new-->folder and named as libs. Then you download cocos2d-android.jar   and copy to the libs folder.

5.  Then right click on cocos2d-android.jar --> Build Path-->Add to Build Path. Now the jar file is added.

6. Now replace the Activity class with the following code

    CCGLSurfaceView mGLSurfaceView;
   
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
     // Hiding the app's title from the screen
        requestWindowFeature(Window.FEATURE_NO_TITLE);
       
        // set the screen flag to full screen
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
       
        // Keeps screen active
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
                WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

        mGLSurfaceView = new CCGLSurfaceView(this);
       
        // set the view as mGLSurfaceView
        setContentView(mGLSurfaceView);
    }
    @Override
    public void onStart() {
       
        super.onStart();

        // attach the OpenGL view to a window
        CCDirector.sharedDirector().attachInView(mGLSurfaceView);
       
        //Change the device orientation to Portrait
        CCDirector.sharedDirector().setDeviceOrientation(CCDirector.kCCDeviceOrientationLandscapeLeft);
       
        // set false to disable FPS display, but don't forget to put fps_images.png in the assets folder
        CCDirector.sharedDirector().setDisplayFPS(true);
       
        // set frame rate
        CCDirector.sharedDirector().setAnimationInterval(1.0f / 60);
       
        // Create an instance of scene from HelloWorldLayer class
        CCScene scene = HelloWorldLayer.scene();
       
        // Make the Scene active
        CCDirector.sharedDirector().runWithScene(scene);
       
    }

    @Override
    public void onPause() {
        super.onPause();
        CCDirector.sharedDirector().pause();
    }

    @Override
    public void onResume() {
        super.onResume();
        CCDirector.sharedDirector().resume();
    }

    @Override
    public void onStop() {
        super.onStop();
        CCDirector.sharedDirector().end();
    }

 5. After closing the Activity class add the following class by just copy pasting

class HelloWorldLayer extends CCLayer  {
   
    //Gets screen size of the android device
    CGSize s = CCDirector.sharedDirector().winSize();
   
    public static CCScene scene() {
       
        //Creates scene
        CCScene scene = CCScene.node();
       
        //creates an instance of HelloWorldLayer
        CCLayer layer = new HelloWorldLayer();
       
        //adds layer to scene
        scene.addChild(layer);
       
        return scene;
       
    }

    protected HelloWorldLayer() {
       
        CCLabel lab = CCLabel.makeLabel("Hello World", "serif", 40);
        lab.setPosition(240, 160);
        addChild(lab);

    }
}


6. Download the following image and copy to the asset folder

7. You completed your first android cocos2d project just now. Now you can build and run the project


Note: For getting the emulator in landscape mode press Ctrl+F12/F11 .

At first you download and install the cocos2D library to your mac. The instructions for downloading and installations are available from here.
Now you can create cocos2D iphone application in your xcode simply by following the steps given below,

  1. Start xcode and select cocos2d
 
       2. then name your project and push okey


   3. you can see your helloworld scene from the class folder now


   4. Now build and run.  Wow you created your first cocos2d app..


 Now the time for adding sprites, buttons etc and make a good looking iphone app.

Cocos2D-iPhone-Extensions is a collection of quality 3rd party extensions and additions for the Cocos2D-iPhone Engine.
Many Cocos2D developers love to share code on their blogs & cocos2d forum. With this approach it is difficult to find the code or know if the code is compatible with latest cocos2d source. Many developers are forced to reinvent the wheel, and this leads to multiple duplicates of the same functionality, sometimes even with exact the same class names (good example – CCSlider, there are at least 3 absolute independent versions of it )
Cocos2D-iPhone-Extensions were created to stop such things and combine all cool extensions in one place, so it will be easy to find, use and maintain them.

Everything that doesn’t modify Cocos2D itself, while bringing new functionality can become a part of Cocos2D-iPhone-Extensions Repo: alternative versions of existing classes, additional categories, new nodes, actions, etc…
All extensions are well documented,shipped with testcases and are compatible with latest stable Cocos2D-iPhone version. With rare exceptions, they are designed for both Mac & iOS.
Build & Runtime Requirements are the same as for cocos2d-iphone engine ( Mac OS X 10.6+, Xcode 3.2.3+, iOS 3.0+  )
As well as Cocos2D, Cocos2D Extensions are licensed under the MIT License.
Extensions available in this release (v0.1.1):
  • [iOS/Mac] CCMenuAdvanced – CCMenu subclass with additional features: relativeAnchor, more align options, priority property, scrolling with swipe/trackpad/mousewheel
  • [iOS/Mac] CCMenuItemSpriteIndependent – CCMenuItemSprite Subclass, that doesn’t add normal/selected/disabled images (sprites) as children. It retains them and delegates rect & convertToNodeSpace: methods to normalImage_. So it’s possible to use CCSpriteBatchNode & add position sprites of menuItem anyway you want.
  • [iOS/Mac] CCVideoPlayer – Simple Video Player for Cocos2D apps.
  • [iOS/Mac] CCBigImage – Dynamic Tiled Node for holding Large Images.
  • [iOS/Mac] CCSlider – Little Slider Control to allow the user to set the music/sfx/etc level in the range of 0.0f to 1.0f.
  • [iOS/Mac] CCSendMessages – CCActionInstant subclass, that is more flexible than other CCActions that run functions. Can be used in many cases as blocks replacement.
  • [iOS] CCScrollLayer – CCLayer subclass that lets you pass-in an array of layers and it will then create a smooth scroller. Complete with the “snapping” effect.
  • [iOS/Mac] FilesDownloader – Downloader for a group of files with shared source path.
Cocos2D-iPhone-Extensions isn’t one man project – it’s a centralized repo of different developers extensions. So i wanted to ask all of you: please take a look at the extensions repo and help us to expand it!
To use any extension from the cocos2d-iphone-extensions repo – just import the extension folder (i.e. Extensions/CCMenuAdvanced) to your project. If there will be any additional dependencies – they will be mentioned in the extension README file in the same folder.

For More

Follow steps below
1) In GameConfig.h
       change to  
       #define GAME_AUTOROTATION kGameAutorotationNone

2) InRootViewController.m commenting the following lines as
/*
#elif GAME_AUTOROTATION==kGameAutorotationCCDirector
    //
    // EAGLView will be rotated by cocos2d
    //
    // Sample: Autorotate only in landscape mode
    //
    if( interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) {
        [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeRight];
    } else if( interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
        [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeLeft];
    }
   
    // Since this method should return YES in at least 1 orientation,
    // we return YES only in the Portrait orientation
    return ( interfaceOrientation == UIInterfaceOrientationPortrait );
*/
3) In AppDelegate.m commenting these lines 
/*
#if GAME_AUTOROTATION == kGameAutorotationUIViewController
    [director setDeviceOrientation:kCCDeviceOrientationPortrait];
#else
    [director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
#endif
*/
and add the following line of code
  [director setDeviceOrientation:kCCDeviceOrientationPortrait];
Done!!!! Now your app is on portrait mode..

What is Web feed

Posted by shajir 0 comments

A web feed (or news feed) is a data format used for providing users with frequently updated content. Content distributors syndicate a web feed, thereby allowing users to subscribe to it. Making a collection of web feeds accessible in one spot is known as aggregation, which is performed by an aggregator. A web feed is also sometimes referred to as a syndicated feed.



A typical scenario of web feed use is: a content provider publishes a feed link on their site which end users can register with an aggregator program (also called a feed reader or a news reader) running on their own machines; doing this is usually as simple as dragging the link from the web browser to the aggregator. When instructed, the aggregator asks all the servers in its feed list if they have new content; if so, the aggregator either makes a note of the new content or downloads it. Aggregators can be scheduled to check for new content periodically. Web feeds are an example of pull technology, although they may appear to push content to the user.
The kinds of content delivered by a web feed are typically HTML (webpage content) or links to webpages and other kinds of digital media. Often when websites provide web feeds to notify users of content updates, they only include summaries in the web feed rather than the full content itself.
Web feeds are operated by many news websites, weblogs, schools, and podcasters.

What is RSS

Posted by shajir 0 comments

        RSS is a technology that is being used by millions of web users around the world to keep track of their favorite websites. RSS (most commonly expanded as Really Simple Syndication) is a family of web feed formats used to publish frequently updated works—such as blog entries, news headlines, audio, and video—in a standardized format.

In the ‘old days’ of the web to keep track of updates on a website you had to ‘bookmark’ websites in your browser and manually return to them on a regular basis to see what had been added.
There is some problems regarding with bookmarking such as
  • You as the web surfer had to do all the work
  • It can get complicated when you are trying to track many websites at once
  • You miss information when you forget to check your bookmarks
  • You end up seeing the same information over and over again on sites that don’t update very often
What if you could tell a website to let you know every time that they update? In a sense, this is what RSS does for you.
An RSS document (which is called a "feed", "web feed", or "channel") includes full or summarized text, plus metadata such as publishing dates and authorship. 

Web feeds benefit publishers by letting them syndicate content automatically. They benefit readers who want to subscribe to timely updates from favored websites or to aggregate feeds from many sites into one place. RSS feeds can be read using software called an "RSS reader", "feed reader", or "aggregator", which can be web-based, desktop-based, or mobile-device-based. A standardized XML file format allows the information to be published once and viewed by many different programs. The user subscribes to a feed by entering into the reader the feed's URI or by clicking a feed icon in a web browser that initiates the subscription process. The RSS reader checks the user's subscribed feeds regularly for new work, downloads any updates that it finds, and provides a user interface to monitor and read the feeds. RSS allows users to avoid manually inspecting all of the websites they are interested in, and instead subscribe to websites such that all new content is pushed onto their browsers when it becomes available. 

GPS iPhone Module

Posted by shajir 0 comments

Connected the SiRF III EM-408 GPS module to a thin PCB and an iPhone connector. The RX and TX lines of the GPS module are connected to the corresponding signals of the iPod connector to allow communication between the two devices and power is taken from the iPhone connector. This could be used with a custom application on the iPod Touch or the iPhone (without on-board GPS) to receive location information.



This is not a plug-and-play GPS solution for the iPhone. A custom application which communicates with the GPS module through the hardware interface must be used to receive location information.

This serial modem brought to you by Switch Science allows you to interface an Arduino board with your iPhone or Android smart phone through the audio jack. Now you can integrate your smart phone into your next embedded project. Some software is required on the phone side, and of course there is an Arduino library.




Because the modem and supporting software exploits a connection originally intended for audio, some corruption of the serial data is to be expected from time to time. It's recommended that you keep this in mind when writing your code. See the links below for more information on the board, the Arduino library, and how to implement it.
A standard 3.5mm stereo headphone cable will not work correctly with this board. You must use the special 4-pole cable such as you would find on a wired headset. The audio jack shown does come with the board, but is not soldered to the board.
More Details..

Cocos 2D

Posted by shajir Friday, June 10, 2011 0 comments

Cocos2D is the leading, open-source, royalty-free smartphone game engine. It’s easy to use, community-supported, reliable, mature, and over 1500 mobile iOS games have been published using it! And now, thanks to Cocos2D-X, it’s possible to release games for Android with the same codebase.
You can play a sound effect, animate a flipping sprite, flash some rad custom font, all with just a couple lines of simple, pure Objective C code. No knowledge of OpenGL is required! Rotating, mirroring, parallaxing, scaling, tinting, sliding, jumping, and a Halloween-sackful of other effects are quickly at your fingertips.
Simply cocos2d is a framework for building 2D games, demos, and other graphical/interactive applications. 

main features

  • Flow control: Manage the flow control between different scenes in an easy way
  • Sprites: Fast and easy sprites
  • Actions: Just tell sprites what you want them to do. Composable actions like move, rotate, scale and much more
  • Effects: Effects like waves, twirl, lens and much more
  • Tiled Maps: Support for rectangular and hexagonal tiled maps
  • Transitions: Move from scene to scene with style
  • Menus: Built in classes to create menus
  • Text Rendering: Label and HTMLLabel with action support
  • Documentation: Programming Guide + API Reference + Video Tutorials + Lots of simple tests showing how to use it
  • Built-in Python Interpreter: For debugging purposes
  • BSD License: Just use it
  • Pyglet Based: No external dependencies
  • OpenGL Based: Hardware Acceleration

The following diagram shows the major components of the Android operating system. Each section is described in more detail below.


What is android SDK

Posted by shajir 0 comments

Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
 
It is a software development kit that enables developers to create applications for the Android platform. The Android SDK includes sample projects with source code, development tools, an emulator, and required libraries to build Android applications. Applications are written using the Java programming language and run on Dalvik, a custom virtual machine designed for embedded use which runs on top of a Linux kernel.

Features

  • Application framework enabling reuse and replacement of components
  • Dalvik virtual machine optimized for mobile devices
  • Integrated browser based on the open source WebKit engine
  • Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
  • SQLite for structured data storage
  • Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  • GSM Telephony (hardware dependent)
  • Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  • Camera, GPS, compass, and accelerometer (hardware dependent)
  • Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

For this we can use vertically and crosswise method.
This can be explain using a simple example 9 x 7
For this subtract 9 from 10 and write the result as 9   1
Then same is doing for 7 ie: 7   3

After that write them on two rows a apply crosswise subtraction

ie:    9    1
           \  |
        7    3  
    (7-1) (1x3)  =  63 that is it.
       or
   (9 -3)
    ie:you get first digit by crosswise and 2nd digit by vertical multiplication of the right side


eg:   6 x 7     is       6   4
                                  \
                               7   3 
                               3  (12)    ie 42

Similar way you can do this method for numbers greater than 50 x 50 as shown below

eg:  84 x 96
                For this   84      (100-84)
                               96       (100-96)  

                     ie:       84    16
                                96      4 
                          (84-4)    4x16            ie:  8064
                             or
                        (96-16)   

Similar way you can do the higher numbers also.

A driver development kit (DDK) is a set of programs and related files that are used to develop a new software or hardware driver or to update an existing legacy application driver for an operating system. (A driver is a relatively small program that addresses the unique requirements of a kind of hardware or a special software application.) Typically, DDKs are used by device manufacturers and software application developers. Some DDKs can be downloaded from the maker of the operating system. Others can be purchased from a third party. A DDK typically includes sample drivers, source code, a debugging utility, a compiler, testing tools, other utilities, and documentation.
In addition to the kit, a driver developer needs to be familiar with the operating system or application the driver is for. Building a driver is typically a complicated process. Testing and debugging should be thorough so that the driver is released with as few errors as possible. There are several steps in building a driver:
  • Writing the driver code. Common programming languages for writing drivers are C and C++.
  • Testing and debugging the driver on a checked build. A checked build is an operating system and kernel-mode driver that has extra error checking and debugging information in the code to aid testing and debugging of the driver. Running with a checked build is slower and uses more memory. A checked build is done in a separate computer from the free build.
  • Testing and debugging the driver on a free build. A free build or retail build is the end user version of the operating system built with full optimization and all debugging information removed. A free build is faster and uses less memory. It also shows driver problems that a user might encounter such as error messages or a computer freeze.
  • Fine-tuning and performance checking of the driver on the free build.
  • Additional testing and debugging as necessary, using both the checked and free builds of the driver.
  • Final testing using the free build. A driver needs testing on a multiprocessor computer as well as on a single processor computer.

Subtracting numbers using vedic maths

Posted by shajir Thursday, June 9, 2011 0 comments


We can easily subtract a big number from powers of 10 using vedic maths by following the steps given below.
We use all from 9 and last from 10 method for this.
For example 
1) 1000 - 639 is as follows

    1000 - 639  =   9-   9-   10-
                             6     3     9   
                             3     6     1
     ie: 1000 - 639  = 361

2) 10000 - 4529  =  9-  9-  9-  10-
                                4   5    2     9   
                                5   4    7     1
     ie: 10000 - 4529  =  5471

3)  1000 - 69     =  9-   9-  10-
                              0    6     9   
                              9    3     1
     ie: 1000  -  69  =  931

Vedic Mathematics

Posted by shajir Wednesday, June 8, 2011 1 comments


 According to Sri Bharati Krsna Tirthaji's research all of mathematics is based on sixteen Sutras, or word-formulae. For example, 'Vertically and Crosswise` is one of these Sutras. These formulae describe the way the mind naturally works and are therefore a great help in directing the student to the appropriate method of solution.

Perhaps the most striking feature of the Vedic system is its coherence. Instead of a hotch-potch of unrelated techniques the whole system is beautifully interrelated and unified: the general multiplication method, for example, is easily reversed to allow one-line divisions and the simple squaring method can be reversed to give one-line square roots. And these are all easily understood. This unifying quality is very satisfying, it makes mathematics easy and enjoyable and encourages innovation.

In the Vedic system 'difficult' problems or huge sums can often be solved immediately by the Vedic method. These striking and beautiful methods are just a part of a complete system of mathematics which is far more systematic than the modern 'system'. Vedic Mathematics manifests the coherent and unified structure of mathematics and the methods are complementary, direct and easy.
The simplicity of Vedic Mathematics means that calculations can be carried out mentally (though the methods can also be written down). There are many advantages in using a flexible, mental system. Pupils can invent their own methods, they are not limited to the one 'correct' method. This leads to more creative, interested and intelligent pupils.

Interest in the Vedic system is growing in education where mathematics teachers are looking for something better and finding the Vedic system is the answer. Research is being carried out in many areas including the effects of learning Vedic Maths on children; developing new, powerful but easy applications of the Vedic Sutras in geometry, calculus, computing etc.
But the real beauty and effectiveness of Vedic Mathematics cannot be fully appreciated without actually practising the system. One can then see that it is perhaps the most refined and efficient mathematical system possible.

In existing half mirror 3D camera systems with separate lenses for the left and right eyes, the parallax range is adjustable, enabling the depth of the 3D images to be modified . However, when operating the zoom and focus functions of such systems, the sensitivity of the human eye, in particular to differences in the size and rotational movement of dual images, as well as any vertical misalignment or difference in image quality has meant that complex technology has been required to ensure that each camera lens is closely coordinated, and there are no discrepancies in the optical axis, image size, and focus. The introduction of a single lens system resolves any issues that may occur as a result of having different optical characteristics for each eye. Furthermore, by using mirrors in place of shutters, incoming light can now be simultaneously separated into left and right images and recorded as it reaches the parallel light area (the area where diverging light from the point of focus on the subject matter becomes parallel) of the relay lens. The separated left and right images are then processed and recorded with the respective left and right image sensors. As there is no difference in time between when the left and right eye images are captured, it is possible for natural and smooth 3D images to be captured, even of scenes involving rapid movement.
Optical system for single lens 3D camera




You can put admob on your android app successfully by following the steps

step1: Register your app in admob and get the publisher id.
step2: Change the AndroidManifest.xml by adding the following lines of code after closing activity
<meta-data android:value="a14d4b7f95df21d" android:name="ADMOB_PUBLISHER_ID" />
                 
         <receiver android:name="com.admob.android.ads.analytics.InstallReceiver" android:exported="true">
                 <intent-filter>
                         <action android:name="com.android.vending.INSTALL_REFERRER" />
                 </intent-filter>
         </receiver>
       
    <meta-data android:value="true" android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" />

step3: Change the publisher id with yours
step4: Add the following lines of code in main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res/com.test"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/layout"
    >
  <com.admob.android.ads.AdView
       android:id="@+id/ad"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"     
       app:backgroundColor="#000000"
       app:primaryTextColor="#FFFFFF"
       app:secondaryTextColor="#CCCCCC"
       app:keywords="Android Game"
    />
</LinearLayout>
step5: create a new xml file and named as attr.xml and place in values folder and change it to
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="com.admob.android.ads.AdView">
        <attr name="backgroundColor" format="color" />
        <attr name="primaryTextColor" format="color" />
        <attr name="secondaryTextColor" format="color" />
        <attr name="keywords" format="string" />
        <attr name="refreshInterval" format="integer" />
    </declare-styleable>
</resources>

step6: Download admob-sdk-android.jar and pasted in libs folder and add to build path
step7: Done!!!
step8: For testing add the following lines code into your java file and run...
AdManager.setTestDevices( new String[] {
AdManager.TEST_EMULATOR, // Android emulator
"E83D20734F72FB3108F104ABC0FFC738", // My T-Mobile G1 Test Phone
} );

iOS 5 Released

Posted by shajir 0 comments

Recently Apple Released iOS 5 at WWDC 2011. Steve Jobs announced iOS 5. iOS 5 has Push Notification, Widget and Left to right flip options are available. iOS 5 is totally different from iOS 4.3.3 and it’s developed very advanced.
iOS 5 can jailbreak iPad 2,because iOS 4.3.3 didn’t support iPad 2 and iPad 2 users complained about that. So iPhone Dev Team, Chronic Dev Team as well as Geohot waiting fro iOS 5 and today it’s announced that means iPad 2 can get jailbreak with in 1-2 days.
iOS 5 also supports future release iPhone 4s/5 as per Rumor Report.

Features
  • “Incredible for developers and customers.”
  • 1500 new API’s
  • 200 new features.
  • Walking us through 10
  • . Notifications.
  • Pushed more than 100b push notifications so far.
  • Scaled beautifully”
  • Better UI incoming.
  • Current notifications interrupt you.
  • Also, nonsensical in the lock screen.
  • When you unlock, the list isn’t persistent if you have a ton of notifications.
  • New solution: Notification Center
  • Single place which combines all notifications.
  • Can get to it anytime from anywhere by swiping down from the top.
  • UI looks rad, crowd clapping.
  • Even shows stocks and weather.
  • Lock screen improved, much more information shown.

Mac OS X Lion is set to be the eighth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Lion is set to be released in July of 2011.

New or changed features   

Some new features were announced at the "Back to the Mac" keynote in October 2010, and the Apple website was updated in February 2011 with more details. Other features were announced at the WWDC 2011 keynote or on Apple's Mac OS X Lion Web site after the keynote.
  • Address Book now uses an iPad-like user interface
  • AirDrop – Mac-to-Mac file sharing.
  • Address space layout randomization – Address space layout randomization (ASLR), a security technique that puts important data in unpredictable locations, making it harder to target known weaknesses, is available for 32-bit applications, and "has been improved for all applications", in Lion.
  • Auto-correction now behaves much like on iOS devices, displaying an iOS-like popup box.
  • Auto Save – As in iOS, documents in applications written to use Auto Save will be saved automatically so users don't have to worry about manually managing their documents.
  • Emoji support – Apple has added a new Emoji font commonly used in chat to express ideograms.
  • FaceTime comes bundled with Lion.
  • FileVault now offers full disk encryption added security with XTS-AES 128 data encryption. Support for FileVault on external hard drives has also been added.
  • Finder improvements – Finder search offers suggestions, files can be grouped by various attributes, and one can now merge files under two folders with the same name – a prompt will appear asking whether one wants to replace or keep both files.
  • Font Book 3—Font Book 3 now provides more flexible displays of character glyphs supplied by a particular font face. Duplicate font files are now flagged with a warning icon, and can be fixed automatically or resolved manually.
  • Full-screen apps – Native, system-wide support for full-screen applications. Supporting applications display a new button at the top right of application window, this button opens applications in full-screen mode.
  • High-quality multilingual speech voices – Apple allows you to download new high-quality voices in more than forty languages and dialects.
  • iCal has an updated user interface, an annual view, and support for a full-screen view.
  • iChat now has support for logging into Yahoo! Messenger. Users can audio- and video-chat with other iChat users using their Yahoo! accounts.
  • Languages - Arabic, Czech, Turkish and Hungarian are added as full system languages, to make the total number of twenty-two languages available in Mac OS X.
  • Launchpad – An application launcher that displays an iOS-like icon grid of installed applications. It features the ability to make multiple pages and group apps into folders that function the same as folders in iOS.
  • Mac App Store – An application store built in the image of the iOS App Store. Like in iOS, it will provide ways for shoppers to discover apps, one-click installation of apps, and one-click updates of all or selected installed applications. Despite being announced as a future feature of Lion, the Mac App Store was released for Mac OS X Snow Leopard on January 6, 2011 as it was bundled with the Mac OS X 10.6.6 update.
  • Mail 5 – Uses an iPad-like user interface, has a fullscreen-optimized view, uses chronological "Conversations" to organize messages, and supports Exchange 2010.
  • Mission Control replaces the "All windows" Exposé feature. It gives an overview of all running applications just like "All windows" but groups windows from the same application. At the top of the screen it gives quick access to the Dashboard, Spaces, and running full screen applications.
  • Multi-touch gestures – Similar to iOS, additional gestures performed using a multi-touch input device (e.g. Magic Mouse, Magic Trackpad) will allow the user to scroll, swipe to different pages, and enter Mission Control. While this is not the first official multi-touch support for Mac OS X, it has been expanded; other frameworks, such as Lux, have already created multi-touch support.
  • Multi-User Screen Sharing—The built-in Screen Sharing feature now allows remote users to log into a separate user account from the one that is currently logged in. That means that while one user is logged into a machine, a second user can login to the same machine remotely, seeing their own desktop and user environment.
  • Preview gains several features, including full-screen support and the ability to sign a document just by holding a signed piece of paper up to the camera.
  • QuickTime re-incorporates some features from QuickTime Pro. New features cited include Copy/Paste, Insert Clip, Crop Video, Rotate Video, Resize, Trim, and more Export options.
  • Recovery Partition – Apple has introduced a recovery partition that includes utilities generally found on the OS X discs. This partition will allow the user to restore their computer to its original factory state.
  • Resume – Applications resume in the same state when re-opened as already seen in iOS. Because of this, the Dock no longer visually indicates whether an app is currently running or not by default – the original behavior can be restored in the Dock section of System Preferences.
  • Safari – With full-screen mode and the new WebKit2 layout engine.
  • System Information – This feature is a re-design of "About This Mac" and has been completely altered with new views which display graphical information on displays, storage devices, memory usage along with other hardware information.
  • TextEdit gains a new graphical menu bar with font selection and text highlighting. The new TextEdit also supports Apple's new automatic file saving and versions technologies.
  • VersionsTime Machine-like saving and browsing of past versions of documents for applications written to use Versions.
  • Vertical text – Lion supports vertical layouts for East Asian languages.

Server features

  • Wiki Server 3 – Making it easier to collaborate, share, and exchange information. Users can quickly switch between a server’s home page, My Page, Updates, Wikis, People, and Podcasts. File sharing is simpler, and a new Page Editor is added for easy customization.
  • File Sharing for iPad – Lion Server delivers wireless file sharing for iPad. Enabling WebDAV in Lion Server gives iPad users the ability to access, copy, and share documents on the server from applications such as Keynote, Numbers, and Pages.
  • Profile Manager – Profile Manager delivers simple, profile-based setup and management for Mac OS X Lion, iPhone, iPad, and iPod touch devices. It also integrates with existing directory services and delivers automatic over-the-air profile updates using the Apple Push Notification service.

Refinements to the user interface

  • Redesigned Aqua user interface elements, button, tabs are now "sliding switches", progress bar. The red, yellow, and green close, minimize, and maximize buttons in the window decorations have been made smaller.
  • Flexible window resizing from any corner or edge of the window.
  • The metal finish has also been slightly altered. It is now a lighter shade of grey than before and features a speckled texture.
  • By default, the dock no longer displays active application indicators.
  • Autohiding scroll bars now disappear similar to iOS when they are not being used by default.
  • Scrolling is reversed by default, to act more like a touch screen computer. (Content moves in the direction of finger movement on touch-pad or mouse)
  • When resizing a window by clicking on the green button (left-top), a transform-effect animates the enlargement.
  • New windows fly to the front (like opening a program in iOS).

Dropped features

 

Sprites in cocos2D

Posted by shajir Tuesday, June 7, 2011 0 comments

A cocos2d' sprite is like any other computer sprite. It is a 2D image that can be moved, rotated, scaled, animated, etc. 
Sprites (implemented using the CCSprite class) can have other sprites as children. When a parent is transformed, all its children are transformed as well.

Since sprites are subclass of CCNode, they can be transformed manually or by using actions. See Actions for more detail about actions.

Layers in cocos2D

Posted by shajir 0 comments

A CCLayer has a size of the whole drawable area, and knows how to draw itself. It can be semi transparent (having holes and/or partial transparency in some/all places), allowing to see other layers behind it. Layers are the ones defining appearance and behavior, so most of your programming time will be spent coding CCLayer subclasses that do what you need.

The CCLayer is where you define event handlers. Events are propagated to layers (from front to back) until some layer catches the event and accepts it. 
Although some serious apps will require you to define custom CCLayer classes, cocos2d provides a library of useful predefined layers (a simple menu layer: CCMenu, a color layer: CCColorLayer, a multiplexor between other layers: CCMultiplexLayer, and more ).
Layers can contain CCSprite objects, CCLabel objects and even other CCLayer objects as children.
Since layers are subclass of CCNode, they can be transformed manually or by using actions. See Actions for more detail about actions.

Director in cocos2D

Posted by shajir 0 comments

The CCDirector is the component which takes care of going back and forth between scenes.
The CCDirector is a shared (singleton) object. It knows which scene is currently active, and it handles a stack of scenes to allow things like “scene calls” (pausing a Scene and putting it on hold while another enters, and then returning to the original). The CCDirector is the one who will actually change the CCScene, after a CCLayer has asked for push, replacement or end of the current scene. 

The CCDirector is also responsible for initializing OpenGL ES.

Scenes in cocos2D

Posted by shajir 0 comments

A scene (implemented with the CCScene object) is more or less an independent piece of the app workflow. Some people may call them “screens” or “stages”. Your app can have many scenes, but only one of them is active at a given time.
For example, you could have a game with the following scenes: Intro, Menu, Level 1, Cutscene 1, Level 2, Winning cutscene, losing cutscene, High scores screen.
You can define every one of these scenes more or less as separate apps; there is a bit of glue between them containing the logic for connecting scenes (the intro goes to the menu when interrupted or finishing, Level 1 can lead you to the cutscene 1 if finished or to the losing cutscene if you lose, etc.).
A cocos2d CCScene is composed of one or more layers (implemented with the CCLayer object), all of them piled up. Layers give the scene an appearance and behavior; the normal use case is to just make instances of Scene with the layers that you want.
There is also a family of CCScene classes called transitions (implemented with the CCTransitionScene object) which allow you to make transitions between two scenes (fade out/in, slide from a side, etc).
Since scenes are subclasses of CCNode, they can be transformed manually or by using actions. See Actions for more detail about actions.

Search This Blog