Skip to main content
main-content

Über dieses Buch

This book will take you through the process of creating a game for the Windows Phone market with a heavy emphasis placed on optimization and good design decisions. On your way, you will be introduced to key Unity concepts and functionality, weigh the pros and cons of various possibilities, and gain a good working knowledge of scripting in the Unity environment using both JavaScript and C#.

Learn Unity for Windows 10 Game Development starts by exploring the Unity editor and experimenting with staple game functionality. If you are new to scripting or just new to C#, you will be able to investigate syntax, commonly used functions, and communication required to bring your ideas to life. With the book's included art assets, you will learn the ins and outs of asset choices and management while making use of Unity's 2D physics, Shuriken particle systems and Mecanim's character and state management tools.

Finally, you will bring it all together to create a multi-level game as you learn how to incorporate mobile specific functionality, test on a Windows Phone device, and others for Windows 10 and ultimately, publish your game to the Windows App Store. You'll even learn about marketing and monetization in the mobile game market.

What You Will Learn:

C# basics for Unity

Working with the Unity Editor

Managing assets

Using the Mecanim animation system

2D features and physics

Setting up your game for Windows Phone and other devices

Who This Book Is For:

Game developers, hobbyists and game dev students who are new to Unity or Windows Mobile game development or both. JavaScript and C# experience are helpful, but C# experience is not required.

Inhaltsverzeichnis

Frontmatter

Chapter 1. The Unity Editor

Abstract
On the off chance that you are completely new to Unity, this first chapter reviews the basics of the Unity editing environment and a few key concepts. If you are already somewhat familiar with Unity, be aware that Unity is a fast-evolving application. This book was written while Unity 5.4 was in beta, so it is based on those features; future configurations could be slightly different. Be sure to check this book’s thread in the Teaching & Certification ä Community Learning & Teaching section of the Unity Forums for updates, clarification, and changes introduced by subsequent releases.
Sue Blackman, Adam Tuliper

Chapter 2. Unity Basics

Abstract
Although you can create assets directly inside Unity, the building blocks for your scene will usually be based on imported assets. The in-game functionality, location, and final appearance, however, will be managed and completed within the Unity editor. For that, you need a good understanding of Unity’s key concepts and best practices. In this chapter, you will explore and experiment with a good portion of the Unity features that don’t require scripting to be useful in your scenes.
Sue Blackman, Adam Tuliper

Chapter 3. Scripting with C#

Abstract
In Unity, very little happens without at least a small amount of scripting. Even if you consider yourself more of an artist or game designer, you should learn enough of the basics of scripting to be able to prototype game ideas, track down code for desired functionality, and become familiar with concepts and techniques commonly used with Unity game development. If your palms are getting sweaty and your pulse rate is increasing at this point, don’t panic! The syntax involved is no more difficult to pick up than learning to text; it is generally fairly descriptive. The major concepts are fairly straightforward. More important, just as you don’t need to understand the workings of an internal combustion engine in order to drive a car, in scripting you don’t necessarily have to understand how a bit of code works in order to make good use of it.
Sue Blackman, Adam Tuliper

Chapter 4. Importing Assets

Abstract
Although Unity has several primitive objects, and others can be generated at runtime, unless your game tends toward the minimalistic, you will have to deal with imported assets. Art assets can be anything from textures and sound clips to fully rigged and animated characters or mechanical devices. The settings you choose for importing those assets will be determined by their use in the game. For mobile devices, where efficiency is extremely important, you need to be especially careful when selecting your import options.
Sue Blackman, Adam Tuliper

Chapter 5. Prototyping the Navigation

Abstract
As with any game, it is always a good idea to lock down the basic functionality by using simple proxy objects wherever possible. This helps keep your development time agile, allowing you to adjust your game plan when an idea doesn’t pan out. Even with a team of programmers, you can easily hit technical restrictions that will force you to make changes. Game play itself may require extra thought; what looks good on paper doesn’t necessarily equate to fun game play. Creating mock-ups with simply geometry allows you to test your ideas without the overhead or commitment of expensive (in time and/or money) art assets.
Sue Blackman, Adam Tuliper

Chapter 6. Experimenting with Functionality

Abstract
As you saw in the previous chapter, just because something is challenging (for example, driving the marble around the board) doesn’t automatically make it fun. Given that challenging tasks can be fun for one person and tedious for another, you are never going to be able to please everyone. You can, however, try your best to make the challenges entertaining. Just as with the preliminary stage, you can block in the functionality without spending too much time. With mobile devices in mind, you will not have free rein to overload the game with fabulous (but costly) special effects, so intriguing concepts and clever or unexpected consequences will have to do the job. A combination of obstacles and power-ups or other “helpers” will form the basis of the game play required to move the marble to an end location.
Sue Blackman, Adam Tuliper

Chapter 7. Creating the Environment

Abstract
Now that you have a tentative idea for a tip-board chutes-and-ladders type of game, you need your game to have some sort of path to give the player a goal and purpose for the marble. Good portals will move you farther along the path, and bad portals will drop you back. For the path itself, because a typical casual game is meant to be played multiple times, the path should be either generated at runtime or at least chosen from a pool of possible paths. Because creating the logic and code for a fully automated path is beyond the scope of this book, you will compromise by creating an authoring system that will let you design paths quickly and store them in efficiently small sizes.
Sue Blackman, Adam Tuliper

Chapter 8. Combining Assets and Functionality

Abstract
With your potential game functionality and the game board ready for further testing, your next challenge is to merge them and, along with some new game pieces, lock down the basic game play.
Sue Blackman, Adam Tuliper

Chapter 9. Audio and Special Effects

Abstract
Now that most of the game play is sorted out, it’s a good time to look into adding some special effects to spice up the user experience. The most obvious thing that is missing is a variety of sound effects that will help your players keep tabs on the state of the marble’s health while keeping their eyes on the marble and other game pieces. The other missing piece of the puzzle is a favorite of video games of all kinds: the particle system. Particle systems, a mainstay of desktop games, cannot be used with abandon for mobile applications, but with careful planning you can budget in a few for special occasions. Let’s begin with audio, as it will add the most bang for the buck.
Sue Blackman, Adam Tuliper

Chapter 10. GUI and Menus

Abstract
With the inclusion of Unity’s long-awaited Unity UI, graphical interfaces have become both more powerful and more complex. The trade-off is that you no longer have to code everything for location and interaction. In this chapter, you will be filling in a few last parts of your game by providing a heads-up display (HUD) for your in-game play statistics to put a bit more pressure on the player. You will also be creating a simple menu. Although your game has only one level, you will allow your player to adjust the difficulty at the beginning of each session.
Sue Blackman, Adam Tuliper

Chapter 11. Rewards and Monetization

Abstract
As it stands, your little game could be considered to be complete. In the early days of computer games, you would shop it around and find a publisher who would then take care of the box, marketing, and retailers to sell your game. You, as the developer, might see around 5 percent of the retail price; for a $20 game (typical for an indie developer), that meant 50 cents, or at most, a dollar. As the Internet became ubiquitous, it became possible for indie developers to sell their own games online for half the retail price and cut out the publishers. That also meant cutting out the marketing, so the number of units sold dropped accordingly. Filling a need, Valve came up with Steam, an online publisher, or store, for both their own games and approved games (meaning, they monitor the quality) from indie developers as well.
Sue Blackman, Adam Tuliper

Chapter 12. Building for Windows Store

Abstract
In this chapter, you will be getting firsthand experience with accelerometer code and functionality, provided, of course, you have access to a Windows 10 device that supports it. It is assumed you will be working with Windows 10. There are differences in procedure and requirements for Windows 8 and 8.1, but they are well documented on the Windows Dev Center in case you need them. The accelerometer functionality requires that you venture out from the (by now, comfortable) Unity environment, and discover the world of Windows Store, Windows Dev Center, and a host of new terms, procedures, and reference material.
Sue Blackman, Adam Tuliper

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise