Batching a sprite with SpriteLists

In this recipe we are going to look at the benefits of using SpriteLists to accelerate 2D rendering of similar objects.

Getting ready

Create a new project and add a reference to GameEngine2D. Add a sprite to your project. I am going to reuse our trusty FA-18H sprite from prior recipes. You can download the complete source at Ch3_Example5.

How to do it...

  1. In AppMain.cs enter the following code:
    using System; using System.Collections.Generic; using Sce.PlayStation.Core; using Sce.PlayStation.Core.Graphics; using Sce.PlayStation.HighLevel.GameEngine2D; using Sce.PlayStation.HighLevel.GameEngine2D.Base; namespace Ch3_Example5 { public class AppMain { public static void Main (string[] args) { Director.Initialize(); Scene ...

Get PlayStation®Mobile Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.