Book Details

ISBN 139781849694186

Paperback322 pages

Book Description

With the PlayStation®Mobile SDK you can create stunning games for the PlayStation®Vita and PlayStation™Certified devices (PS Certified devices). It includes everything you need to get started, including an IDE for developing your code and even an emulator to test your creations.

"PlayStation®Mobile Development Cookbook"| is an exciting and practical collection of recipes that help you make the most of this exciting new platform. It provides you with everything you need to create complete 2D or 3D games and applications that fully unlock the potential of the SDK.

After quickly covering the basics, you'll learn how to utilize input sources like touch, gamepads, and motion controls, and then move on to more advanced content like creating and animating 2D graphics, networking, playing sound effects and music, adding physics, and then finally jumping into the world of 3D.

Table of Contents

Chapter 1: Getting Started

Introduction

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

Chapter 2: Controlling Your PlayStation Mobile Device

Introduction

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

Chapter 3: Graphics with GameEngine2D

Introduction

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

Chapter 4: Performing Actions with GameEngine2D

Introduction

Handling updates with Scheduler

Working with the ActionManager object

Using predefined actions

Transitioning between scenes

Simple collision detection

Playing background music

Playing sound effects

Chapter 5: Working with Physics2D

Introduction

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

Chapter 6: Working with GUIs

Introduction

"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

Chapter 7: Into the Third Dimension

Introduction

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

Chapter 8: Working with the Model Library

Introduction

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

Chapter 9: Finishing Touches

Introduction

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

What You Will Learn

Discover how to handle multiple sources of input to really help you create something unique

Load and animate sprites within your own 2D game to get up and running quickly with the SDK

Harness the power of the GameEngine 2D library to make your workflow easier

Add engaging physics to your game projects with amazing ease

Learn how to play a variety of sound effects and music and increase player immersion

Authors

Michael Fleischauer

Michael Fleischauer has spent the last 16 years working as a programmer in a number of different industries from 3D tools creation to automotive and banking. Most recently he launched the internet start-up Flexamail. In his spare time he writes for and runs the game development site GameFromScratch.com, a popular destination for game development tutorials and news. Michael was recently made the first PlayStation Mobile MVP by Sony. Michael lives in Toronto, Canada with his wife and daughter.

Table of Contents

Chapter 1: Getting Started

Introduction

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

Chapter 2: Controlling Your PlayStation Mobile Device

Introduction

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

Chapter 3: Graphics with GameEngine2D

Introduction

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

Chapter 4: Performing Actions with GameEngine2D

Introduction

Handling updates with Scheduler

Working with the ActionManager object

Using predefined actions

Transitioning between scenes

Simple collision detection

Playing background music

Playing sound effects

Chapter 5: Working with Physics2D

Introduction

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

Chapter 6: Working with GUIs

Introduction

"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

Chapter 7: Into the Third Dimension

Introduction

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

Chapter 8: Working with the Model Library

Introduction

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

Chapter 9: Finishing Touches

Introduction

Opening and loading a web browser

Socket-based client and server networking

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

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.