Unity in Action: A top-notch how-to guide for game developers – #gamedev #programming

Unity in Action

Joseph Hocking

Manning – paperback

Unity, the cross-platform game development environment, is easy to download and get running. But it definitely is not easy to learn without some help.

Fortunately, Joe Hocking’s Unity in Action makes it reasonably straightforward to learn how to develop games in 3D, as well as with Unity’s new 2D capabilities. The book takes the reader from “Hello, World” all the way to “Putting the parts together into a complete game” and then “Deploying your game to players’ devices.”

Even with this fine book, however, game development can be hard and complicated work. There are many different elements to consider, such as “Adding enemies and projectiles to the 3D game”, “Developing graphics for your game”, “Adding interactive devices and items within the game,” and putting sound effects and music into your game. Hocking’s book does a good job of showing how to handle these tasks, plus many more.

You may have heard Unity described as a game development environment where you don’t have to know how to program. Yes, you might be able to create some games without programming skills. But, “to produce commercial titles” using Unity, you definitely need some programming experience, Hocking emphasizes. In this case, you should have some knowledge of C#, but a background in some other object-oriented (OO) programming language will be helpful if you are new to C#, he adds.

Hocking’s book has many examples, illustrations, headings and subheadings. But step-by-step listings are sparse. Therefore, be prepared to read the text closely and, if necessary, develop lists of steps yourself. There is nothing wrong with this approach, and it is not really a criticism of the book. Game development, after all, is not something that you can, nor should, just dive into and speed through, step by step. It requires a lot of careful planning and thought before you start.

Unity in Action wastes no time. It gets right to the essential stuff you need to know. And it can get you into action reasonably fast as a game developer. But “reasonably fast” in this case must be defined by how quickly you personally can learn to handle Unity, plus the myriad tasks of planning, creating, testing, revising and distributing a game.

Si Dunn

 

Advertisements

Programming C# 5.0 – Excellent how-to guide for experienced developers ready to learn C# – #bookreview

Programming C# 5.0
Ian Griffiths
(O’Reilly, paperbackKindle)

Ian Griffiths’ new book is for “experienced developers,” not for beginners hoping to learn the basics of programming while also learning C#. The focus is “Building Windows 8, Web, and Desktop Applications for the .NET 4.5 Framework.”

Earlier editions in the Programming C# series have “explained some basic concepts such as classes, polymorphism, and collections,” Griffiths notes. But C# also keeps growing in power and size, which means the page counts of its how-to manuals must keep growing, too, to cover “everything.”

The paperback version of Programming C# 5.0 weighs in at 861 pages and more than three pounds. So Griffiths’ choice to sharpen the book’s focus is a smart one. Beginners can learn the basics of programming in other books and other ways before digging into this edition. And experienced developers will find that the author’s explanations and code examples now have space to go “into rather more detail” than would have been possible if chapters explaining the basics of programming had been packed in, as well.

If you have done some programming and know a class from an array, this book can be your well-structured guide to learning C#. The “basics” are gone, but you still are shown how to create a “Hello World” program—primarily so you can see how new C# projects are created in Visual Studio, Microsoft’s development environment.

C# has been around since 2000 and “can be used for many kinds of applications, including websites, desktop applications, games, phone apps, and command-line utilities,” Griffiths says.

“The most significant new feature in C# 5.0,” he emphasizes, “is support for asynchronous programming.” He notes that “.NET has always offered asynchronous APIs (i.e., ones that do not wait for the operation they perform to finish before returning). Asynchrony is particularly important with input/output(I/O) operations, which can take a long time and often don’t require any active involvement from the CPU except at the start and end of an operation. Simple, synchronous APIs that do not return until the operation completes can be inefficient. They tie up a thread while waiting, which can cause suboptimal performance in servers, and they’re also unhelpful in client-side code, where they can make a user interface unresponsive.”

In the past, however, “the more efficient and flexible asynchronous APIs” have been “considerably harder to use than their synchronous counterparts. But now,” Griffiths points out, “if an asynchronous API conforms to a certain pattern, you can write C# code that looks almost as simple as the synchronous alternative would.”

If you are an experienced programmer hoping to add C# to your language skills, Ian Griffiths’ new book covers much of what you need to know, including how to use XAML (pronounced “zammel”) “to create  applications of the [touch-screen] style introduced by Windows 8” but also applications for desktop computers and Windows Phone.

Yes, Microsoft created C#, but there are other ways to run it, too, Griffiths adds.

“The open source Mono project (http://www.mono-project.com/) provides tools for building C# applications that run on Linux, Mac OS X, iOS, and Android.”

Si Dunn

For more information:  paperback – Kindle

Introducing Regular Expressions – Finding your perfect match…in strings – #bookreview

Introducing Regular Expressions
Michael Fitzgerald
(O’Reilly, paperbackKindle)

“Regular expressions are specially encoded text strings used as patterns for matching sets of strings,” Michael Fitzgerald writes in this example-rich new book that focuses on learning by doing.

Veteran programmers who work with Perl, Java, JavaScript, C# and a number of Unix utilities often consider regular expressions to be an important part of their toolkit. Ruby 1.9 and Python 3 also support regular expressions.

“Regular expressions have a reputation for being gnarly,” Fitzgerald notes. However, using the online Regexpal JavaScript regular expression tester, he shows you how to dive right into the very basics and start working your way up.

He introduces several other applications that let you work with regular expressions. And his chapters smoothly take you from matching single digits to matching text strings, number strings, boundaries such as the beginnings or endings of words, character classes, and beyond, including white-space patterns and Unicode. He also shows how to perform some fairly esoteric operations such as “negative lookaheads,” where you verify that a certain pattern of text or digits does not appear in a string ahead of certain other text, numbers, or other qualifiers.

The 136-page book has ten chapters:

  1. What Is a Regular Expression?
  2. Simple Pattern Matching
  3. Boundaries
  4. Alternation, Groups, and Backreferences
  5. Character Classes
  6. Matching Unicode and Other Characters
  7. Quantifiers
  8. Lookarounds
  9. Marking Up a Document with HTML
  10. The End of the Beginning

An appendix provides a regular expression reference, listing such items as control characters, Unicode whitespace characters, metacharacters, and others. There is also a glossary of regular expression terms, such as “greedy match” and “zero-width assertions.”

Fitzgerald recommends his book for those who are “new to regular expressions or programming…the reader who has heard of regular expressions and is interested in them but who really doesn’t understand them yet.”

Those who are a bit beyond the beginner level, however, likewise can benefit from Introducing Regular Expressions and its handy examples and how-to summaries.

Si Dunn

Learn the Kinect API – New Microsoft ‘Start Here!’ guide shows how – #bookreview

Learn the Kinect™ API
Rob Miles
(Microsoft Press, paperback, Kindle)

The Kinect sensor  is a popular peripheral for Microsoft’s XBox 360 video game systems and Windows PCs. The device contains a video camera, a directional microphone system, and a depth sensor.

Software developers are using the device “to advance the field of computer interaction in all kinds of exciting ways,” the author notes. “It is now possible to create programs that use the Kinect sensor to create a computer interface with the ability to recognize users and understand their intentions using a ‘natural’ user interface consisting of gestures and spoken commands. In addition, the device’s capabilities have a huge range of possible applications, from burglar alarms to robot controllers.”

If you want to learn how to program with the Kinect application programming interface (API), this new book in the popular Microsoft “Start Here!” series can get you moving along the right path toward becoming a developer.

But there are three key assumptions that may slow your start. You are expected to “have a reasonable understanding of .NET development using the C# programming language.” And: “You should be familiar with the Visual Studio 2010 development environment and object-oriented programming development.”

Also, “if you are a C++ developer who wishes to learn how to interact with the Kinect sensor from unmanaged C++ programs, you will find that the code samples supplied will not [emphasis added] provide this information.” All of the code samples are written in C#.

Rob Miles, a programming professor at the United Kingdom’s University of Hull, has organized his well-written, 250-page book into four parts:

  • Part I: Getting Started – Provides an overview of the Kinect and how to hook it up and get it working with your PC.
  • Part II: Using the Kinect Sensor – Covers sensor initialization and introduces each of Kinect’s data sources –video, depth, and sound – and how to use them in programs.
  • Part III: Creating Advanced User Interfaces – Illustrates how the Kinect SDK performs body tracking and how programs can use this information. Also shows how Kinect data can be combined to create augmented-reality applications.
  • Part IV: Kinect in the Real World – Focuses on how the Kinect can interact with external devices, such as MIDI devices and robots.

Learn the Kinect™ API offers several ideas for how you can use the Kinect’s video, sound, and depth-response capabilities in your own programs. One example is using the Kinect’s directional microphone feature so that a spoken password “only works when you say it in one part of [a] room, or you could have different [spoken] passwords for different parts of the room,” Miles points out.

It’s a bit of understatement to say that Rob Miles enjoys working with the Kinect device. “I’ve had,” he writes, “more wow moments with this little sensor bar than I’ve had with much more expensive toys that I’ve played with over time.”

Si Dunn

New Books for Windows Phone 7 & 7.5 and Microsoft SQL Server 2012 T-SQL – #bookreview

Microsoft Press recently has released two new books, one for developers who work with Windows Phone 7 & 7.5 and the other for newcomers to Microsoft SQL Server 2012 T-SQL. 

Windows Phone 7 Development Internals
Andrew Whitechapel
(Microsoft Press, paperback, Kindle)

Andrew Whitechapel’s hefty new 809-page development internals guidebook focuses on Windows Phone 7 design and architecture and helps you learn best practices for building Windows Phone 7 applications. It is illustrated with numerous screenshots, code examples, and other illustrations.

The book “covers the breadth of application development for the Windows Phone platform, both the major 7 and 7.1/7.5 versions and the minor 7.1.1 version,” Whitechapel writes.

Windows Phone 7 Development Internals is aimed at experienced .NET developers who are familiar with Microsoft Silverlight and want to dig into Windows Phone’s platform design and API surface.

“The Windows Phone 7 release only supports C#,” Whitechapel notes, “and although support for Visual Basic was introduced with the 7.1 SDK, this book focuses purely on C# and XAML.”

In each of the 20 chapters, several features are introduced, and Whitechapel provides “one or more sample [Silverlight] applications and walks you through the significant code (C# and XAML).”

The book’s author is a senior program manager for the Windows Phone Application Platform.

#

Microsoft SQL Server 2012 T-SQL Fundamentals
Itzik Ben-Gan
(Microsoft Press, paperback, Kindle)

Transact-SQL, more commonly known as T-SQL, is the Microsoft SQL Server dialect of the ISO and ANSI standards for SQL. T-SQL code is used to query and modify data in SQL Server 2012.

Itzik Ben-Gan, one of the leading experts on T-SQL, emphasizes that his new book “covers fundamentals [and] is mainly aimed at T-SQL practitioners with little or no experience.” But others who have some T-SQL experience also can find it helpful for filling in gaps in knowledge. The book also is recommended for database administrators, business intelligence (BI) practitioners, report writer, analysts, architects, and SQL Server power users who have “just started working with SQL Server and need to write queries and develop code using Transact-SQL.”

Microsoft SQL Server 2012 T-SQL Fundamentals is structured into 10 chapters. The first chapter provides “Background to T-SQL Querying and Programming. Chapters 2 through 8 examine “various aspects of querying and modifying data.” Chapter 9 looks at concurrency and transactions, and Chapter 10 provides an overview of programmable objects.

The book’s one appendix shows you how to “get started and set up your environment so that you have everything you need to get the most out of this book.” The major discussions include: “Getting Started with SQL Database”; “Installing an On-Premises Implementation of SQL Server”; “Downloading Source Code and Installing the Sample Database”; “Working with SQL Server Management Studio”; and “Working with SQL Server Books Online.”

#

Si Dunn

Oh, Say Can You C#? – C# 5.0 in a Nutshell & C# 5.0 Pocket Reference -#programming #bookreview

O’Reilly recently has released two handy and helpful books for practitioners and students of the C# object-oriented programming language. One is a hefty, 1042-page “definitive reference” that (in paperback format) can double as a handy weight for physical exercise. The other is a compact, 215-page reference that really does fit in a coat pocket or pants pocket (but not a typical shirt pocket, unless you happen to wear an XXL, or larger, shirt).

Starting first with the muscle-building reference guide that weighs in at nearly three pounds…

C# 5.0 in a Nutshell, 5th Edition
Joseph Albahari and Ben Albahari
(O’Reilly, paperback, list price $49.99; Kindle edition, list price $39.99)

This latest Nutshell edition covers C# 5.0, “the fourth major update to Microsoft’s flagship programming language, an update that positions C# “as a language with unusual flexibility and breadth,” the authors state.

They note: “At one end, it [C#] offers high-level abstractions, such as query expressions and asynchronous continuations, while at the other end, it provides low-level power through constructions such as custom value types and the optional use of pointers.”

The revised and expanded new edition “covers C#, the CLR [Common Language Runtime], and the core Framework assemblies. The authors have chosen this focus “to allow space for difficult topics such as concurrency, security and application domains—without compromising depth or readability.” It’s hard to argue with the “depth” of a book 1,000+ pages long. And the book is written clearly, with numerous short code examples to illustrate its points.

C# 5.0 in a Nutshell is aimed at readers with intermediate to expert knowledge of programming, but no prior knowledge of C# is assumed. Indeed, chapters two through four provide an introduction to C# basics, starting just above the “Hello, World” level with a program that multiplies 12 times 30. The remaining chapters cover advanced C# 5.0 topics and the core .NET framework. With just a few exceptions, you can read these chapters randomly.

The hefty book has a hefty index. It has been “shaped by more than 20 expert reviewers,” including several from Microsoft. And the authors have solid backgrounds in their subject matter.

And now, for something a bit lighter…

C# 5.0 Pocket Reference
Joseph Albahari and Ben Albahari
(O’Reilly, paperback, list price $19.99; Kindle edition, list price $11.99)

The Nutshell authors have boiled their big book down to a very practical aid that you can easily carry to work, class or your favorite coffee shop or when traveling. Conveniently, the Pocket Reference still includes an introduction to C# 5.0’s fundamentals, starting with the simple multiplication program. It also covers many advanced topics, ranging from operator overload and Language Integrated Query (LINQ) to preprocessor directives, custom attributes, and XML documentation.

This book is not organized by chapters, so you will find yourself making frequent use of the book’s two-page table of contents and 12-page index, particularly if you are new to C# 5.0.

But you can readily find brief explanations, code samples and illustrations that define and clarify much of what you are seeking. And you will appreciate the book’s convenient size.

Si Dunn

Inside Windows Debugging: Practical Debugging and Tracing Strategies – #bookreview #in #programming

Inside Windows Debugging: Practical Debugging and Tracing Strategies
Tarik Soulami
(Microsoft Press,
paperback, list price $39.99; Kindle edition, list price $31.99)

Debugging and tracing tools — and the willingness and strategies to use them — should be key aspects of any software development and testing process.

Inside Windows Debugging is intended for software engineers who want to “perfect their mastery of Windows as a development platform through the use of debugging and tracing tools.”

Yet anyone serious about learning, using and supporting Windows can benefit from this book. Its first few chapters provide basic explanations of debugging and tracing tools and how to acquire the right packages and use them. From there, the author presents and explains numerous code examples that demonstrate many types of bugs and related problems in software. So it is helpful to have at least a little experience with C/C++ and C# programming languages.

Inside Windows Debugging has 560 pages, including an extensive index, and is divided into three parts: (1) “A Bit of Background”; (2) “Debugging for Fun and Profit”; and (3) “Observing and Analyzing Software Behavior.” Two appendices sum up common debugging tasks and show how to accomplish them using the WinDbg debugger.

To run the software and examples used in this book, you should have “Windows Vista or later.”

The author, however, “highly” recommends at least having Windows 7 or Windows Server 2008 R2. And in some of the kernel debugging exercises, a second computer will be needed to serve as a host kernel-mode debugger machine.

Si Dunn