Unity 3.x Game Development Essentials. If you have an idea for a game but lack the skills to create it, this book is the perfect introduction. There&a Knurów

Game Engines such as Unity are the power-tools behind the games we know and love. Unity is one of the most widely-used and best loved packages for game development and is used by everyone, from hobbyists to large studios, to create games and interactive experiences for the web, desktop, mobile, and …

od 134,10 Najbliżej: 7,5 km

Liczba ofert: 1

Oferta sklepu

Opis

Game Engines such as Unity are the power-tools behind the games we know and love. Unity is one of the most widely-used and best loved packages for game development and is used by everyone, from hobbyists to large studios, to create games and interactive experiences for the web, desktop, mobile, and console. With Unity‚Äôs intuitive, easy to learn toolset and this book ‚Äì it‚Äôs never been easier to become a game developer. Taking a practical approach, this book will introduce you to the concepts of developing 3D games, before getting to grips with development in Unity itself ‚Äì prototyping a simple scenario, and then creating a larger game. From creating 3D worlds to scripting and creating game mechanics you will learn everything you‚Äôll need to get started with game development. This book is designed to cover a set of easy-to-follow examples, which culminate in the production of a First Person 3D game, complete with an interactive island environment. All of the concepts taught in this book are applicable to other types of game, however, by introducing common concepts of game and 3D production, you'll explore Unity to make a character interact with the game world, and build puzzles for the player to solve, in order to complete the game. At the end of the book, you will have a fully working 3D game and all the skills required to extend the game further, giving your end-user, the player, the best experience possible. Soon you will be creating your own 3D games with ease! Spis treści: Unity 3.xGame Development EssentialsTable of ContentsUnity 3.x Game Development EssentialsCreditsForewordAbout the AuthorAbout the Reviewerswww.PacktPub.comSupport files, eBooks, discount offers and moreWhy Subscribe?Free Access for Packt account holdersPrefaceWhat this book coversWhat you need for this bookWho this book is forGetting help with the book and updatesConventionsReader feedbackCustomer supportDownloading the book asset bundleDownloading the color images of this bookErrataPiracyQuestions1. Enter the Third DimensionGetting to grips with 3DCoordinatesLocal space versus world spaceVectorsCamerasProjection mode3D versus 2DPolygons, edges, vertices, and meshesMaterials, textures, and shadersRigidbody physicsCollision detectionEssential Unity conceptsThe Unity wayan exampleAssetsScenesGameObjectsComponentsScriptsPrefabsThe interfaceThe Scene view and HierarchyControl toolsFlythrough Scene navigationControl barSearch boxCreate buttonThe InspectorThe Project windowThe Game viewSummary2. Prototyping and Scripting BasicsYour first Unity projectA basic prototyping environmentSetting the sceneAdding simple lightingAnother brick in the wallBuilding the master brickAnd snap!Its a rowGrouping and duplicating with empty objectsBuild it up, knock it down!Setting the viewpointIntroducing scriptingA new behaviour script or 'class'What's inside a new C# behaviourBasic functionsVariables in C#What's inside a new Javascript behaviourVariables in JavascriptCommentsWall attackDeclaring public variablesAssigning scripts to objectsMoving the cameraLocal, private, and public variablesLocal variables and receiving inputUnderstanding TranslateImplementing TranslateTesting the game so farMaking a projectileCreating the projectile prefabCreating and applying a materialAdding physics with a RigidbodyStoring with prefabsFiring the projectileUsing Instantiate() to spawn objectsAdding a force to the RigidbodySummary3. Creating the EnvironmentDesigning the gameUsing the terrain editorTerrain menu featuresImporting and exporting heightmapsSetting the resolutionMass place treesFlatten HeightmapRefresh tree and detail prototypesThe terrain toolsetTerrain ScriptRaise heightPaint heightSmooth HeightPaint TexturePlace TreesPaint DetailsTerrain SettingsCreating the islandsun, sea, and sandStep 1Setting up the terrainStep 2Creating the Island outlineStep 3Volcano!Step 4Adding texturesPainting procedureSandy areasGrass & RockVolcanoes rock!Step 5Tree timeStep 6The grass is always greenerStep 7Let there be lights!Creating sunlightStep 8What's that sound?Sounds2D versus 3DAudio file formatsThe hills are alive!Importing the book's asset packageFurther audio settingsStep 9Look, there! Up in the skybox!Step 10Open waterStep 11Going walkaboutStep 12Final tweaksSummary4. Player Characters and Further ScriptingWorking with the InspectorTagsLayersPrefabs and the InspectorAnatomy of a characterDeconstructing the First Person Controller objectParent-child issuesFirst Person Controller objectObject 1: First Person Controller (parent)TransformCharacter ControllerMouse Look (Script)Character Motor (Script)FPSInput Controller (Script)Object 2: Graphics (child)Mesh filterMesh RendererObject 3: Main Camera (child)CameraGUILayer and Flare LayerMouse Look (Script)Audio listenerFurther scriptingCommandsVariablesVariable data typesUsing variablesPublic versus private variablesDeclaring public and private variablesFull exampleFunctionsUpdate()OnMouseDown()Writing custom functionsReturn typeArgumentsDeclaring a custom functionCalling a custom functionIf else statementsC#:Multiple conditionsFor loopsInter-script communication and Dot SyntaxAccessing other objectsFind() and FindWithTag()SendMessageGetComponentProgramming for MobileDot SyntaxCommentsFurther readingScripting for character movementDeconstructing the scriptFull script (Javascript)Variable declarationStoring movement informationMoving the characterChecking grounded@Script commandsSummary5. InteractionsExternal modeling applicationsCommon settings for modelsMeshesNormals and TangentsMaterialsAnimationsAnimation CompressionSetting up the outpost modelAdding the outpostPositioningRotationAdding collidersAdding the RigidbodyAdding audioDisabling automatic animationCollisions and triggersRay castingThe frame missPredictive collision detectionOpening the outpostApproach 1Collision detectionCreating new assetsScripting for character collision detectionWorking with OnControllerColliderHitOpenDoor() custom functionDeclaring the functionChecking door statusPlaying audioTesting the scriptExtending collidersPlaying animationReversing the procedureCode maintainabilityDrawbacks of collision detectionApproach 2Ray castingDisabling collision detection with commentsMigrating codewriting a DoorManager scriptTidying PlayerCollisionsCasting the rayResetting the colliderApproach 3Trigger collision detectionCreating and scaling the trigger zoneScripting for trigger collisionsRemoving PlayerCollisionsSummary6. Collection, Inventory, and HUDCreating the power cell prefabDownloading, importing, and placingTagging the power cellCollider scaling and rotationEnlarging the power cellAdding a trigger colliderCollider scaleAdding the RigidbodyCreating the power cell scriptAdding rotationAdding Trigger Collision DetectionSaving as a prefabScattering power cellsWriting the Player InventorySaving the charge valueSetting the variable start valueAudio feedbackAdding the CellPickup() functionAdding the Inventory to the playerRestricting outpost accessRestricting door access with a cell counterDisplaying the power cell HUDImport settings for GUI texturesCreating the GUITexture objectPositioning the PowerGUI textureScripting for texture swapUnderstanding arraysAdding the HUD arrayAssigning textures to the arrayDisabling the HUD for game startEnabling the HUD during runtimeAdding the power generatorSignifying door unlockAdding the locked lightSwitching lights and removing the HUDHints for the playerWriting on screen with GUITextScripting for GUIText controlAdjusting hints to show progressUsing fontsSummary7. Instantiation and RigidbodiesUtilizing instantiationRigidbodiesForcesThe Rigidbody componentMaking the mini-gameCreating the coconut prefabCreating the textured coconutAdding physicsSaving as a prefabCreating the Launcher objectScripting to throw coconutsChecking for player inputPlaying feedback soundInstantiating the coconutNaming instancesAssigning velocityAdding development safeguardsEnsuring component presenceSafeguarding collisionsUsing IgnoreCollision() codeIgnoring collisions with layersIncluding the Audio Source componentFinal checksInstantiate restriction and object tidyingActivating coconut throwWriting the throwing mat trigger scriptAdding the coconut shy shackImport settingsCreating the throwing mat triggerRemoving coconutsTargets and coconut collisionsPlacementDisabling automatic animationAdding Rigidbodies to moving partsWriting the Coconut collision detection scriptEstablishing variablesCollision detectionUsing co-routines to time game elementsIncluding the Audio Source componentAssigning the scriptCreating more targetsWinning the gameSetting up variablesChecking for a winScript assignmentIncrementing and decrementing target countAdding to the target countSubtracting from the target countFinishing touchesAdding the crosshairToggling the crosshair GUI TextureInforming the playerSummary8. Particle SystemsWhat is a particle system?Particle EmitterParticle AnimatorParticle RendererCreating the taskAssets involvedAdding the log pileCreating the campfire particle systemsCreating fireEllipsoid Particle Emitter settingsParticle Animator settingsParticle Renderer settingsAdding a materialPositioning the FireSystemTime to Test!Blowing smoke!Ellipsoid Particle Emitter settingsParticle Animator settingsParticle Renderer settingsPositioningAdding audio to the fire3D AudioLighting the fireAdding the matchesWriting the Match Collection scriptCreating the matches GUICollecting the matchesStarting the fireUsing arrays and loops for commands on multiple objectsSignifying Inventory usageTesting and confirmingSo, what's the problem?Safeguarding with additional conditionsSummary9. Designing MenusInterfaces and menusCreating the sceneDuplicating the islandGrouping the environment objectsDuplicating the sceneFraming the shotPreparing textures for GUI usageAdding the game titleGUITexture formatsCreating the GUITexture objectPositioningCreating the menu with GUITextures and mouse eventsAdding the play buttonGUITexture button scriptLoading scenesAssigning public variablesTesting the buttonAdding the instructions buttonAdding the quit buttonChecking scripts with Debug commandsCreating the menu with the Unity GUI class and GUI skinsDisabling game objectsCreating the menuCreating public variablesThe OnGUI() functionPositioning for GUIsPixel-specific positioningStyling GUI buttons with a GUI skinUsing textures for GUI button backgroundsChoosing font size for GUI buttonsResolution-independent positioningScripting button actionsAdding the Instructions pageCreating menu pagesFormatting the GUI label with the GUI skin assetA note on optimizing the loading processSummary10. Animation BasicsGame win sequenceWin sequence approachTriggering the winCreating the game win messagesPositioning win sequence GUI elementsGrouping GUITextures for optimized instantiationAnimating with linear interpolation (Lerp)Adjusting animationsStoring the win sequenceCreating the win objectCreating the Fader and using the Animation panelScaling for various resolutionsStarting the Fader from invisibilityAnimation panel overviewCreating an animation clipCreating keyframesUsing animation curvesAdding animation eventsCreating and animating the Loading GUILoading scenes with animation eventsStoring and instantiating the Loading GUILoading the win sequenceLayering GUITexturesChallengefading in the Island sceneSummary11. Performance Tweaks and Finishing TouchesTerrain tweaks and player positionTweaking the terrainPositioning treesHills, troughs, and texture blendingLife's a beachKeep on the right pathPositioning the playerOptimizing performanceCamera Clip Planes and FogLightmappingLighting and baking the islandPreparing for lightmappingThe outpost and generatorLighting inside the outpostLighting a mesh with a Self Illuminated shaderLighting inside with Baked-Only Point LightsThe coconut shyThe campfireBaking the lightmapLightmapping overviewAmbient lightingIncluding lightsExcluding from the bakeBaking the sceneRestoring dynamic objectsFinishing touchesVolcano!Positioning the particle systemRequired assetsMaking the smoke materialParticle system settingsEllipsoid Particle Emitter settingsParticle Animator settingsAdding audio to the volcanoVolcano testingCoconut trailsEditing the PrefabTrail Renderer componentUpdating the prefabSummary12. Building and SharingBuild optionsWeb PlayerWeb Player StreamedPC or Mac standaloneOSX Dashboard WidgetBuild SettingsPlayer SettingsCross-Platform SettingsPer-Platform SettingsResolution and PresentationWeb Player SettingsStandalone SettingsIconStandaloneSplash ImageStandaloneOther SettingsWeb PlayerStandaloneQuality SettingsPlayer Input settingsBuilding the gameAdapting for web buildQuit button platform automationPreparing for streamingDisplaying streamed loading progressStyling the loading info boxFirst BuildBuilding the StandaloneFree versus ProBuilding for the WebEmbedding web player builds in your own siteThe web JavaScriptMaking the code portableObject embedding from the Styling your Unity embed with CSSSharing your workSharing on Kongregate.comSummary13. Testing and Further StudyLearn by doingTesting and finalizingPublic testingFrame rate feedbackOptimizing performanceApproaches to learningCover as many bases as possibleDon't reinvent the wheelIf you don't know, just ask!SummaryIndex O autorze: Will Goldstone is a longstanding member of the Unity community and works for Unity Technologies as a Technical Support Associate, handling educational content and developer support. With an MA in Creative Education, and many years experience as a lecturer in higher education, Will wrote the first ever Unity book, the original Unity Game Development Essentials, and also created the first ever video tutorials for the package. Through his sites http://www.unity3dstudent.com and http://learnunity3d.com Will helps to introduce new users to the growing community of developers discovering Unity every day.

Specyfikacja

Podstawowe informacje

Autor
  • Will Goldstone
Rok wydania
  • 2011
Format
  • PDF
  • MOBI
  • EPUB
Ilość stron
  • 488
Wybrane wydawnictwa
  • Packt Publishing