Pooka SDK Developer Guide
Pooka SDK® Sample Projects

Samples_-_Beginner


SDK_Essentials

Debug_Support

Shows how to print debug message in the console window or IDE's debug pane; How to display error / warning message to application user.

Platform_Detection

Shows how to detect the targeting platform at the build time by preprocessor or at the run time by RealDevice class. Also demonstrates retrieving certain platform information.

Misc_Utility

Demonstrates miscellaneous functions such as Base64 codec, ZLib compression and decompression and SGML entity codec.

Application_Life_Cycle

This sample demonstrates a basic application life cycle with message printed in the console window upon each life cycle events.

Application_Assets

Shows hot to query, access and consume application assets, the raw application resources can only be understood and processed by application.

Console_App_Essentials

Demonstrates the essential concept and functions of a console-like application powered by ConsoleApplication class. This sample is composed of numbers of sub-demos that demonstrate certain particular features of ConsoleApplication.

Data_and_Type

Array_List_Sample

Demonstrates Pooka SDK's data structure class ArrayList.

Attributes_Sample

Demonstrates Pooka SDK's data structure class Attributes.

HashMap_Sample

Demonstrates Pooka SDK's data structure class HashMap.

Properties_Sample

Demonstrates Pooka SDK's data structure class Properties.

StrBuf_Sample

Demonstrates Pooka SDK's text buffer class StrBuf.

String_Sample

Demonstrates Pooka SDK's data type class String.

Tree_Sample

Demonstrates Pooka SDK's data structure class Tree.

Type_and_Type_Util

Demonstrates Pooka SDK's primitive type classes and complex type classes, as well as a TypeUtil class helps doing type conversion.

Xml_Demo

Shows how to parse or construct XML document by classes XMLParser and XMLNode.

UI_-_Essentials

Bitmap_Cursor

Shows how to use a custom Bitmap to display mouse cursor, mostly used for a game or media oriented application.

Multiple_Windows

Shows how to use multiple windows display side-by-side inside application to organize the content of each own.

Triple_Layouts

Demonstrates how to use dedicated content layout templates (OmniG Template files) for different screen orientations: landscape, portrait and square and archive the best layout for all possible application screen orientations.

Animation

Demonstrates various animation solutions provided by Pooka SDK.

Desktop_App_Menu

Shows how to add native application menu in a desktop application.

Scheduled_Task

This sample introduces the usage of Pooka SDK's scheduled task (Application::Schedulable) to create and execute an asynchronous task without using Thread, or to force a UI-sensitive task being executed on application's main UI thread.

Rendering_Cycle

Demonstrates the concept of Pooka SDK's rendering cycle and helps developers understand the animation control mechanism when creating an animated Pooka SDK application.

UI_-_User_Input

High_Level_User_Input

Demonstrates various high-level user input handling, such as mouse hover event, long-press event, multi-touch gestures.

Low_Level_User_Input

Demonstrates various low-level user input handling, such as pointing device events (mouse, touch, track-pad), multi-touch events, keyboard event, accelerometer events.

Interactive_Sprite

Demonstrates various types of interactive Sprite and how they are used in application to construct interactive UI elements, such as buttons, check-boxes, radio buttons, edit-boxes, hyper links and so on.

UI_-_Sprite

Sprite_Size_and_Position

Shows various ways to set a Sprite's size and position by OGTemplate.

Scene_Size_and_Position

Shows various ways to set a Scene's size and position by OGTemplate.

Background_and_Frame

Demonstrates various Sprite's attributes to control the Sprite's background and frame.

Text_Attributes

Demonstrates various Sprite's attributes to control the Sprite's text.

Texture_Attributes

Demonstrates various Sprite's attributes to control the Sprite's texture.

Z_Order

This sample uses a small "Fish Tank" application to demonstrates Sprite's Z-order attribute that cab be used to control the rendering order of the Sprite inside the container Scene.

Themed_Sprite

Demonstrates how to apply a SpriteTheme on Sprites to make application UI have consistent and branding look and feel.

Application_Data

Record_Store_Sample

This is a dedicated sample shows how to use RecordStore class to persist application data across application sessions.

Access_Local_StorageDir

This sample uses a simple application "Text Notes" to demonstrate how to access the application's local data directory through the API function Application::getApplicationLocalStorageDir().

Application_Data_Demo

This sample demonstrate different ways to persist application data across application sessions: by RecordStore class, by Properties class, or by ScoreBoard class.

Samples_-_Intermediate


_2D_Content

Direct_Drawing_in_OGCanvas

Demonstrates how to draw 2D graphics directly inside the OGCanvas by the GraphicsEngine class.

Scientific_Drawing_in_OGCanvas

A simple application shows using Pooka SDK to draw scientific graphics, such as a mathematic function curve.

Shape_Sprite

Shows how to fully customize the Sprite's appearance by registering a rendering listener (Sprite::RenderListener). The sample draws numbers of Sprites by different custom geometrical shape.

Custom_Sprite_Rendering

Shows how to fully customize the Sprite's appearance by registering a rendering listener (Sprite::RenderListener). The sample customizes Sprite's appearance by mixing custom rendering and default rendering.

FruitMania

A small application demonstrates most of Sprite's attributes together to simulate a realistic slot machine.

Statistical_Graph

A simple application shows using Pooka SDK to draw statistical graphics, such as pie chart and line chart.

_3D_Content

Spinning_Cube

A simple 3D sample with a spinning colored cube shows the basic concept of creating 3D animation in Pooka SDK application.

_3D_Data_Visualization

This sample shows how to visualize 3D data by a Scene3D and a 3D model dynamically generated by the data at run-time.

_3D_Graphics_Showcase

This is a comprehensive showcase of 3D graphics functions provided by Pooka SDK. The showcase is composed of numbers of small demos and each covers one or few particular features of 3D graphics rendering effect, such as material, texture map, alpha blending, lighting, camera, view clipping, fog and so on.

Ray_Casting

This sample demonstrates numbers of techniques needed for developing a full-fledged 3D game, such as ray-casting used for hit detection, spatial analysis for collision detection, as well as some common 3D graphics algorithms like 3D object transformation.

UI_-_LWComponent

Designing_LWComponent

This sample demonstrates how to design a custom light weight component and use it in application. The sample demonstrates creating several light-weight components like a calculator component, a pie-chart component, an accordion pane component and so on.

LWComponent_Showcase

This is a comprehensive showcase of built-in light-weight components in Pooka SDK. The showcase is composed of numbers of small demos and each demonstrates one built-in light-weight component.

ThemedSprite_vs_LWComponent

A side-by-side comparison between themed Sprite and light-weight component, shows pros and cons of each technical approach when construct complex user interface.

UI_-_User_Input_Intermediate

Access_Accelerometer

Shows how to access the real-time raw data of target platform's accelerometer. The sample retrieves the accelerations along X, Y and Z axes when user tilts the device and keeps a gyro platform level.

Use_Virtual_D-Pad

Demonstrate how to use Pooka SDK's virtual d-pad (VirtualDPad class), which emulates a virtual direction-pad by touch screen, swipe gesture or device tilting.

UI_-_OGCanvas

Loading_User_Defined_Type

Shows how to load a user-defined element that can not be understood and parsed by OGTemplate. The user-defined element (a text call-out Sprite in this sample) is parsed and created by the overridden function OGCanvas::handleUnknownPropertyType().

OGCanvas_DIY

Shows how to implement a do-it-yourself scene graph structure to host application content. This DIY solution bypass the default scene graph and rendering pipeline provided by OGCanvas.

Bitmap_and_Texture

Bitmap_vs_Texture

Shows a side-by-side comparison between Bitmap and Texture classes.

Drawable_Bitmap

Shows how to draw graphics (shapes, text, images) inside a drawable Bitmap and use the resulted Bitmap as texture map of a 3D model.

Miscellaneous_Intermediate

Sound_of_Jungle

Demonstrates how to play sound effect and music by Speaker and Sound class.

Dpi-aware_App

Shows how to make an application aware of the DPI (dot per inch) attribute of the physical display and display some elements by the size specified by inches. A butterfly Sprite is rendered in this application has identical physical size measured by inch regardless of the device that the application runs on.

Internationalization

Demonstrates the efficient way to develop a multilingual application with localized text.

Samples_-_Advanced


LWComponent

Address_Book

A nearly functional sample application demonstrates creating a "address book" application by Pooka SDK's light-weight component.

E-Book_Sample

A nearly functional sample application demonstrates creating a "electronic book" application by Pooka SDK's light-weight component.

Picture_Dictionary

A nearly functional sample application demonstrate creating a children's "picture dictionary" application by Pooka SDK's light-weight component.

Sticky_Notes

A nearly functional sample application demonstrates creating a "sticky notes" application by Pooka SDK's light-weight component.

Wizard_Sample

Shows how to create a wizard-like UI element by Pooka SDK's light-weight component LWTabbedPane or LWSlidingPane.

Concurrency_Programming

AsyncTask_Test

Shows how to create a asynchronous task by Pooka SDK's AsyncTask class, which provide a convenient way to pack and execute a task on a application thread.

Concurrent_Data_Structure

Shows how to use Pooka SDK's common data structure classes (ArrayList, HashMap, Tree, etc.) in concurrency environment and make the data access thread safe. The sample is composed of several demos, each demonstrates the concurrent data access on one Pooka SDK's data structure class.

Fish_Tank

A comprehensive sample features with a "Fish Tank" that demonstrates various concurrency programming techniaues provided by Pooka SDK.

Multiple_AsyncTask_Test

Shows how to manage multiple asynchronous task by Pooka SDK's AsyncTaskManager class, which make it efficient if an application needs to create and execute large number of asynchronous tasks.

Multi-threading_Basics

Shows the basic concept of multi-thread programming through Pooka SDK's Thread class. The concept is demonstrated by a "hot dog stand" model, which is a typical "producer-consumer model" commonly used in mutli-thread programming tutorials.

Thread_Synced_with_GUI

Shows how to make a thread safely synchronized with UI thread if this thread is doing some UI sensitive job (modify UI, delete some UI elements). Without this synchronization, the UI sensitive task executed on application thread can easily demage the UI consistency and may cause application crash.

Monetization

In-app_Ad

Shows how to display an in-app advertising pane in application to increase application's revenue opportunities.

In-app_Buy

Shows how to add an in-app purchase function in application to increase application's revenue opportunities. Note that this sample is not ready until the next major version update for Pooka SDK.

Miscellaneous_Advanced

My_Location

Shows how to access platform geolocation service through Pooka SDK'a class Geolocation. The sample retrieves the user's current geographical position and mark it on a 3D model of earth.

Use_Native_Component

Demonstrates how to embed the platform native component or widget (like button, slider, spinner, list-box) in application content.

Samples_-_Comprehensive


Game

Tic_Tac_Toe

The classic board game "Tic-Tac-Toe". Three versions are provided: 2D sprite version, a light-weight component version and console-like text version.

Chopper_Fight

A 3D action game features RC Toy chopper air combat. The game play is set in each room of a cartoon style suburban house. The game player controls a team consists of two RC helicopters and try to shoot down the opponent helicopters controlled by the computer.

Side_Scroller_Game

A 2D Sprite based game prototype demonstrates how to efficiently create a side-scrolling game by Pooka SDK and achieves features like Sprite animation and parallax scrolling Effect commonly needed for creating a 2D side-scrolling game.

Space_Defender

A 2D Sprite based game prototype demonstrates how to efficiently create a space shoot'em up game by Pooka SDK

SmartBunny_Game_Series

A SmartBunny game series bundled with 8 board games. Demonstrates how to efficiently create turn-based or time-trail 2D board game by Pooka SDK.

Graphics

Doodle_Pad

A comprehensive sample application demonstrates creating a pixel based painting application by Pooka SDK.

Drawing_Board

A comprehensive sample application demonstrates creating a vector based drawing application by Pooka SDK.

Miscellaneous

Mini-File_Explorer

A miniature cross-platform file explorer demonstrates how to use Pooka SDK's OsStorageUtil class to access platform's storage directories such as images (DCIM, camera roll), sounds, videos and documents.

Clock

Demonstrates creating an alarm clock or a wall clock by Pooka SDK's Sprite class.

Samples_-_Network_Extension


Http_Client

Hello_Web

A basic "hello world" style application demonstrates how to create a simple Http client application.

Web_Image

A Http client application that demonstrates simultaneous image downloading.

Account_Creator

A Http client application that simulate an account creation procedure.

Http_Cookie_Demo

A Http client application that simulate a tiny online bookstore that demonstrates how to use Http cookie to persist client's state across Http sessions.

Http_Multiplier

A Http client application that remotely calculate the product of two numbers by a Http server.

Socket

Socket_Chat_by_TCP_Client_Server

A sample demonstrates creating a real-time communication application by socket programming with TCP protocol in client-server architecture.

Socket_Chat_by_TCP_P-to-P

A sample demonstrates creating a real-time communication application by socket programming with TCP protocol in peer-to-peer architecture.

Socket_Chat_by_UDP

A sample demonstrates creating a real-time communication application by socket programming with UDP protocol in client-server architecture.

SSL_Client

Shows how to create a secure networking client application by secure socket layer.

Web_Service

Currency_Exchange

A Web service client application demonstrates retrieving currency exchange rate from a XML based web service.

IP_Locator

A Web service client application demonstrates retrieving the geographical location of a IP address by a XML based web service.

Weather_App

A Web service client application demonstrates retrieving weather forecast from a XML based web service.

Multiplayer_Game

Mini-Dogfight_MP_edition

A 3D air combat game features famous World War II fighters. The game demonstrates how to create a real-time MMOG (massively multilayer online game) by Pooka SDK. The sample can run as both the MMOG server or client.

Ping_Pong

A 2D classic ping-pong game demonstrates how to create a real-time two-Player game which allows two players play the game head-to-head over Internet.

Roshambo

A 2D classic Rock-paper-scissors game demonstrates how to create a turn-based two-Player game which allows two players play the game head-to-head over Internet.

Web_Pane

Web_Pane_Demo

Demonstrates the Pooka SDK's light-weight Web view component - LWWebPane. The sample uses numbers of Html documents to show LWWebPane's' HTML content presentation capability.