Iwgame Game Engine SDK Programming by Pocketeers Limited Iwgame Game Engine SDK Programming V0.29
Total Page:16
File Type:pdf, Size:1020Kb
IwGame Game Engine SDK Programming by Pocketeers Limited IwGame Game Engine SDK Programming v0.29 Developed and maintained by Mat Hopwood of Pocketeers Limited (http://www.pocketeers.co.uk). For support please visit http://www.drmop.com This document is protected under copyright to Pocketeers Limited @2011. Page 1 of 140 IwGame Game Engine SDK Programming by Pocketeers Limited Table of Contents 1.0 IwGame............................................................................................................................................ 1.1 What is IwGame?......................................................................................................................... 1.2 Installing IwGame........................................................................................................................ 1.3 Usage Rights and Warranties....................................................................................................... 1.4 Brief How To on Using IwGame................................................................................................. 1.5 IwGame Concepts........................................................................................................................ 1.5.1 Standard Class Definitions................................................................................................... 1.5.2 Getters and Setters............................................................................................................... 1.5.3 Init / Release......................................................................................................................... 1.5.4 Singletons............................................................................................................................. 1.5.5 Event Notification................................................................................................................ 1.5.6 XOML Mark-up Language.................................................................................................. 1.5.7 Local and Global Resources................................................................................................ 1.6 Example Code and Tutorials........................................................................................................ 2.0 CIwGame Object – The Eye in the Sky........................................................................................... 2.1 Introduction.................................................................................................................................. 2.2 Implementing our own CIwGame............................................................................................... 3.0 CIwGameScene Object – A Place for Actors to Play....................................................................... 3.1 Introduction.................................................................................................................................. 3.2 Creating a Scene.......................................................................................................................... 3.3 Virtual Canvas.............................................................................................................................. 3.4 Scene Object Management.......................................................................................................... 3.5 Scene Extents and Clipping......................................................................................................... 3.6 Scene Camera.............................................................................................................................. 3.7 Potential Colliders and Collision Handling................................................................................. 3.8 Current Scene Concept................................................................................................................ 3.9 Actor Management....................................................................................................................... 3.10 Scene Naming and Finding Scenes............................................................................................ 3.11 Scene Layers.............................................................................................................................. 3.12 Scene Origin.............................................................................................................................. 3.13 Scene Visibility and Active State............................................................................................... 3.14 Scene Transitions....................................................................................................................... 3.15 Creating a Scene from XOML................................................................................................... 3.16 Animating Scene Components................................................................................................... 3.17 Creating a Custom Scene........................................................................................................... 4.0 CIwGameActor Object – Sprites With Brains.................................................................................. 4.1 Introduction.................................................................................................................................. 4.2 Creating Actors............................................................................................................................ 4.3 Creating a CIwGameActorImage................................................................................................ 4.4 Actor Lifetimes............................................................................................................................ 4.5 Actor Naming and Finding Actors............................................................................................... 4.6 Actor Types.................................................................................................................................. 4.7 Moving, Rotating and Spinning Actors....................................................................................... 4.8 Attaching a Visual and an Animation Timeline........................................................................... 4.9 Changing an Actors Colour.......................................................................................................... 4.10 Obeying Scene Extents.............................................................................................................. Page 2 of 140 IwGame Game Engine SDK Programming by Pocketeers Limited 4.11 Actor Layering........................................................................................................................... 4.12 Scene Visibility and Active State............................................................................................... 4.13 Resetting Actors......................................................................................................................... 4.14 Collision Checking.................................................................................................................... 4.15 Creating an Actor from XOML................................................................................................. 4.16 Animating Actor Components................................................................................................... 4.17 Creating a Custom Actor............................................................................................................ 5.0 CIwGameString – String Building Without Fragmentation............................................................. 5.1 Introduction.................................................................................................................................. 5.2 Basic String Building................................................................................................................... 5.3 Comparing Strings....................................................................................................................... 5.4 Stream Style Searching................................................................................................................ 5.5 Getting Strings Values................................................................................................................. 5.5 Other Useful String Tools............................................................................................................ 6.0 CIwGameFile – File System Access................................................................................................ 6.1 Introduction.................................................................................................................................. 6.2 Loading a Local File.................................................................................................................... 6.3 Saving a Local File ..................................................................................................................... 6.4 Loading a Memory Based File..................................................................................................... 6.5 Loading a Remote File................................................................................................................. 6.6 Other Useful File Tools...............................................................................................................