PacktLib: PlayStation®Mobile Development Cookbook

PlayStationMobile Development Cookbook


About the Author

About the Reviewers


Getting Started


Accessing the PlayStation Mobile portal

Installing the PlayStation Mobile SDK

Creating a simple game loop

Loading, displaying, and translating a textured image

"Hello World" drawing text on an image

Deploying to PlayStation Mobile certified Android devices

Deploying to a PlayStation Vita

Manipulating an image dynamically

Working with the filesystem

Handling system events

Controlling Your PlayStation Mobile Device


Handling the controller's d-pad and buttons

Using the Input2 wrapper class

Using the analog joysticks

Handling touch events

Using the motion sensors

Creating onscreen controls for devices without gamepads

Configuring an Android application to use onscreen controls

Graphics with GameEngine2D


A game loop, GameEngine2D style

Creating scenes

Adding a sprite to a scene

Creating a sprite sheet

Using a sprite sheet in code

Batching a sprite with SpriteLists

Manipulating a texture's pixels

Creating a 2D particle system

Performing Actions with GameEngine2D


Handling updates with Scheduler

Working with the ActionManager object

Using predefined actions

Transitioning between scenes

Simple collision detection

Playing background music

Playing sound effects

Working with Physics2D


Creating a simple simulation with gravity

Switching between dynamic and kinematic

Creating a (physics!) joint

Applying force and picking a physics scene object

Querying if a collision occurred

Rigid body collision shapes

Building and using an external library

Working with GUIs


"Hello World" – HighLevel.UI style

Using the UI library within a GameEngine2D application

Creating and using hierarchies of widgets

Creating a UI visually using UIComposer

Displaying a MessageBox dialog

Handling touch gestures and using UI effects

Handling language localization

Into the Third Dimension


Creating a simple 3D scene

Displaying a textured 3D object

Implementing a simple camera system

A fragment (pixel) shader in action

A vertex shader in action

Adding lighting to your scene

Using an offscreen frame buffer to take a screenshot

Working with the Model Library


Importing a 3D model for use in PlayStation Mobile

Loading and displaying a 3D model

Using BasicProgram to perform texture and shader effects

Controlling lighting using BasicProgram

Animating a model

Handling multiple animations

Using bones to add a sword to our animated model

Finishing Touches


Opening and loading a web browser

Socket-based client and server networking

Accessing (Twitter) data over the network using REST and HttpWebRequest

Copying and pasting using Clipboard

Embedding and retrieving a resource from the application assembly

Configuring your application using PublishingUtility

Creating downloadable content (DLC) for your application

Publishing Your Application

Publishing Your Application