Porting the Angry Birds game from PC to Xbox presented several technical challenges. Implementing audio required switching from the FMOD library used on PC to the XACT library for Xbox due to platform differences. Porting the OpenGL graphics to DirectX required adjustments for the opposite y-axis and differences in screen resolution and texture rotation between the platforms. Adapting the Box2D and TinyXML libraries involved replacing Windows functions with Xbox equivalents and bypassing file I/O to work with character streams instead. Specific challenges involved implementing varied bird abilities, the slingshot mechanic, damage states, and balancing the level design and physics parameters.
3. Implementing Audio on XBOX
• Used FMOD on the PC version, really simple and easy-to-use library
• FMOD didn’t port to XBOX so had to switch to XACT
• “Building” the sound bank
• Limited documentation about XACT lead a lot of time being wasted in realizing that the
sound bank had to be pre-built and then used in the project
• Only some particular file formats work with XACT (WMA)
4. OpenGL to DirectX
• Y – axis is opposite in the two
• Solution -> y = ScreenHeight – y;
• Screen resolution on XBOX was 640x480 as compared to 1920x1080 on PC
• Solution -> ScaleX = TargetScreenWidth / IdleScreenWidth,
ScaleY = TargetScreenHeight / IdleScreenHeight
• The center of rotation for the textures in DirectX was based on the local coordinates of the texture
whereas OpenGL took that in screen space
• The direction of rotation was opposite in OpenGL and DirectX
• Textures were supposed to be square in shape with the image dimensions in powers of 2
5. Porting Box2D and TinyXML to XBOX
• Box2D had windows.h included in a few files
• Replaced references to windows.h components with their XBOX counterparts
• TinyXML used basic file operations like fopen, fread etc. which are not
allowed on XBOX
• Read XML using XBOX XDK file functions
• Bypassed the file read functions of TinyXML and provided it directly with a character stream
• Mapping the sprites to the actual Box2D physics bodies was difficult
6. Angry Birds Specific Challenges
• Implementing different bird abilities
• Implementing slingshot
• Different damage states for the birds, blocks and pigs
• Level design, balancing physics parameters