Thursday, 28 November 2013

XNA 2D game tutorial - animated sprite

1. Initialize state and time (continue from the XNA 2D games static sprite tutorial)

GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Texture2D character;
Vector2 position = new Vector2(200, 200);
Point frameSize = new Point(28, 41);
Point currentFrame = new Point(1, 0);
Point sheetSize = new Point(12, 8);
int state = 1; // 1 = walking state
TimeSpan nextFrameInterval = TimeSpan.FromSeconds((float)1 / 16);
public Game1()
{
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
           TargetElapsedTime = new TimeSpan(0, 0, 0 , 0, 100);
            // means, frame will be updated every 100ms.
  }

Sunday, 17 November 2013

Example of using PopupWindow

android.widget.PopupWindow can be used to display an arbitrary view. The popup windows is a floating container that appears on top of the current activity.

Example of PopupWindow

Tuesday, 15 October 2013

XNA 4.0 installation tutorial

1. VS 2010 installation
    - Download and install visual studio 2010 (skip this step if you already install visual studio 2010)
    - For students, you can easily download vs 2010 from https://www.dreamspark.com/ - use your student
       email or hotmail email to create dreamspark’s student account. You will be able to download many
       windows software for free. You can download vs 2010 from this website

2. XNA installation
    - Download and install xna 4.0 from this site http://www.microsoft.com/download/en/details.aspx?id=23714
    - After the installation, start visual studio 2010
    - Make sure your XNA is linked with vs 2010 File>>New>>Project..>>Other Languages>> Visual
       C#>>XNA Game Studio 4.0.



3. Now you can start developing your own game... Good Luck~!

Android NDK tutorial (JNI)

JNI stands for Java native interface that enable Java to use Native application or library such as C/C++ or assembly in Java application.

Android OCR tutorial - image to text

This tutorial will show how to use and implement OCR library (tesseract) in android application. Tesseract is open source library for OCR originally developed by HP.

Monday, 7 October 2013

Getting start with Android Development

Getting start with PHP

1) Software that you might need
    a. XAMPP
        -you can easily download XAMPP through this link.
        -choose installer file.
    b. Notepad++ (optional)
        -you can download notepad++ through this link
2) Start the XAMPP control panel
    a. start the apache