Making console games in Unity Tomas Jakubauskas Making console games in Unity • History • Getting started • Development workflow • Limitations and requirements • New input methods • Q&A Bootcamp Asia 2012 History • Wii dev started in 2007, first game out in 2008 • Xbox 360 dev started in 2010, first game out in 2011 • Playstation 3 dev started in 2010, first game out in 2011 • Unity is getting ready for next-gen! Bootcamp Asia 2012 Why develop for consoles? • Xbox 360: over 66M sold o Over 18M Kinects sold o Over 40M Xbox Live subscribers • Playstation 3: over 62M sold • Nintendo Wii: over 95M sold • Parallel market to mobiles, not dead yet Bootcamp Asia 2012 OK! Where do I start? • Become a licensed developer o Complete a licensing agreement with platform holder o Complete a detailed NDA • Xbox 360 - www.xbox.com/developers • Playstation 3 - www.scedev.net • Nintendo Wii – www.warioworld.com Bootcamp Asia 2012 Hardware & SDKs • Ordered online after becoming a licensed developer • Xbox 360 and PS3 tools integrate with Visual Studio o Visual Studio Pro comes free with every Xbox 360 kit. • Development and testing done over Ethernet o Easy to share hardware • Can use Unity with testkits o Devkits needed for native plugin development Bootcamp Asia 2012 Unity licensing • Console licences are per-title o Price varies depending on title-type: retail DVD, XBLA, PSN, FunLabs. • Trial licences o Contact sales with proof that your studio is a licensed developer • News and discussions in private mailing lists o Unity engineers o Other users of Unity for consoles • Source-code licences available Bootcamp Asia 2012 Unity builds • Console support comes as add-on packages o Install over an existing copy of Unity o Extended documentation and samples • Workflow is the same o “Build And Run” • Deployment options o Xbox 360 • Copy to HDD (Ethernet) • DVD emulation (USB) o Playstation 3 • PC hosted (Ethernet) • PSN Submission • Blu-Ray Disk Bootcamp Asia 2012 Debugging • Unity 3.5 o Native tools (PIX, XbPerfView, GPad) o Crash dumps (runtime symbols provided) o Script symbols generated o Explicit null checks o Built-in CPU profiler • Next version o MonoDevelop support for Xbox360 (in QA now) o Built-in GPU profiler for Playstation 3 Bootcamp Asia 2012 Can we ship the game now? • Not yet • There are limitations • And specifics • And requirements • And even new possibilities! Bootcamp Asia 2012 Limitations? • Nothing serious! • Limited memory o 512MB unified on Xbox 360 and 256MB/256MB video/system on Playstation 3 o Devkits provide extended memory to help with the initial port o Native tools help in reducing texture memory (mipmap usage statistics) o Built-in profiler displays memory usage in various areas • PowerPC CPU architecture o Scripts execute slower than on your beefy x86 desktop machine o Use built-in profiler to find bottlenecks Bootcamp Asia 2012 Specifics: Scripting • Ahead-of-time (AOT) script compilation o Platform owners do not allow JIT compilation for security reasons o Limited support of generics and LINQ • No duck-typing: o Wrong: var a = go.GetComponent<MeshRender>(); o Right: var a : MeshRender = go.GetComponent<MeshRender>(); • Unhandled managed exceptions are not caught o Work in progress o Runs faster though • Code stripping helps decrease memory footprint • .NET Marshalling allows to interface native code Bootcamp Asia 2012 Specifics: Native code access? • Yes! o Xbox 360 DLL • Access D3DDevice o Playstation 3 PRX • Access Sony SPURS o Wii links directly to UnityWii library • Implement rarely used features for your game o Also those that Unity doesn’t expose yet • Reuse existing C++ code base • Extensive manual: www.mono-project.com/Interop_with_Native_Libraries Bootcamp Asia 2012 Specifics: Graphics • No fixed-function pipeline o Just write vertex and fragment programs o Avoid ShaderLab combiner effects • Xbox 360 has one fixed resolution: 720p • Playstation 3 supports SD and HD resolutions • Hardware MSAA is not available o FXAA3 post-process effect gives similar results • Optimised skinning o Xbox 360 – on GPU o Playstation 3 – on SPU Bootcamp Asia 2012 Specifics: Graphics (part 2) • Video playback using native APIs o UnityEngine.X360VideoPlayer for WMV files o UnityEngine.PS3VideoPlayer for MPEG4/AVC/DivX files • Editor supports graphics emulation o Find unsupported materials easily • Multi-threaded rendering o Make use of those Xbox 360 cores Bootcamp Asia 2012 Specifics: Other • No Mono threads on Playstation 3 • Certain APIs not yet available o WWW for Xbox 360 will be ready in the next build o MovieTexture is replaced with native APIs • Xbox 360 is a 4-user machine Bootcamp Asia 2012 Requirements: Title id • Every game gets one • Binds network services • Xbox 360: o Game configuration (SPA) o _SpaConfig.cs o PartnerNET • Playstation 3: o Trophy signature Bootcamp Asia 2012 Requirements: SPA - Stats • At least one leaderboard • Must be in active session to submit new stats o UnityEngine.X360Session • Single-player mode too! Bootcamp Asia 2012 Requirements: SPA - Presence • Broadcast player in-game status. o UnityEngine.X360Presence API. Bootcamp Asia 2012 Requirements: SPA - Achievements • Achievements and gamer points o Award using UnityEngine.X360Achievements API • Different rules for: o Retail titles o XBLA titles o Kinect Fun Lab titles Bootcamp Asia 2012 Requirements: Trophies (PS3) • Signature key provided by Sony • Packages are created using SDK tools o Award using UnityEngine.PS3TrophyUtility Bootcamp Asia 2012 Requirements: Other • XBLA / PSN games must have a trial mode o DRM functionality in UnityEngine.PS3DRMUtility and UnityEngine.X360Core o Needs extra menu items to exit to the market place • Technical certification requirement list is in the SDK o Unity handles as many TCRs as possible o Developers need to be aware of certain TCRs and work apropriately Bootcamp Asia 2012 So what are the new possibilities? Bootcamp Asia 2012 You guessed it - Input! • Controllers • Playstation 3 Move • Xbox 360 Kinect o Skeleton tracking o Camera streams Bootcamp Asia 2012 Controllers • The usual story o Xbox 360 pad o PS3 Sixaxis o UnityEngine.PS3Pad • Sensor filtering • Vibration • InputManager • UnityEngine.Input API Bootcamp Asia 2012 Playstation 3 Move • Fully supported o Including Eye Toy 2 camera o Accessed via UnityEngine.PS3Move o Can access camera feed for calibration Bootcamp Asia 2012 Johann Sebastian Joust • Innovation Award o 12th Annual Game Developers Choice Awards o [Video] Bootcamp Asia 2012 Xbox 360 Kinect • Skeleton tracking • Camera streams • Microphone • Speech recognition • Fitness API • Editor integration Bootcamp Asia 2012 Kinect Skeleton Tracking • Hand refinement • Smoothing • Biometric identification • Full API exposed o UnityEngine.KinectSkeleton o UnityEngine.KinectIdentity Bootcamp Asia 2012 Kinect Fun Labs: Air Band • First Unity Xbox 360 title • Features o Skeleton tracking o Video post-processing and super-composition o Video recording and Youtube publishing o [Video] Bootcamp Asia 2012 Kinect Camera Streams • Full API exposed o UnityEngine. KinectCamera o UnityEngine. KinectImageStream Bootcamp Asia 2012 Kinect Fun Labs: Mutation Station • Another Unity Xbox 360 title • Features o Camera streams o Depth-stream based video effects o [Video] Bootcamp Asia 2012 Kinect Editor Integration • Skeleton tracking o Prototype gesture code instantly • Camera feeds o Prototype video effects instantly Bootcamp Asia 2012 Other Kinect features • Easy script access o Microphone • void MyAudioDataHandler(float[] data) { } KinectAudio.OnMicData = MyAudioDataHandler; o Speech recognition • void MyPhraseHandler(string phrase, float confidence) { } KinectSpeech.OnRecognitionPhrase = MyPhraseHandler; o Fitness • KinectFitness .GetFitnessLevels() Bootcamp Asia 2012 Hey, did I forget Nintendo Wii? • Nope, but Unity 3.5 is the last version with Wii support o That is why we give it less attention • However Wii support in 3.5 is mature o DVD and WiiWare titles supported o LotCheck requirements handled (Strap reminder, Home button, disconnection dialog, disk error handling, etc.) • Some difference from other consoles o Only fixed-function o JIT enabled Bootcamp Asia 2012 Final notes • Less restrictive release schedule for console runtime • We can profile your game prior to submission • We take your input on what to improve o And what APIs to expose o And what your next game will require Bootcamp Asia 2012 Q&A Bootcamp Asia 2012 .
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages37 Page
-
File Size-