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

 

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

Learning iOS Programming, 2nd Ed. – Updated to cover iOS 5, iPad, iPhone, iPod Touch – #programming #bookreview

Learning iOS Programming, 2nd Edition
By Alasdair Allan
(O’Reilly, paperback, list price $34.99; Kindle edition, list price $27.99)

Alasdair Allan’s popular iOS programming book recently has been updated to cover iOS 5. And it has a new name. (The first edition was titled Learning iPhone Programming.)

“The changes made in this second edition reflect the fact that a lot has happened since the first edition was published: the release of the iPad, a major release of Xcode, two revisions of the operating system itself, and the arrival of Apple’s iCloud,” the author notes. “This book has therefore been refreshed, renewed, and updated to reflect these fairly fundamental changes to the platform, and all of the example code was rewritten from the ground up for Xcode 4 and iOS 5 using ARC.”

Allan’s book – well-written and appropriately illustrated – is structured to provide “a rapid introduction to programming for the iPhone, iPod touch, and iPad,” and it assumes that you have some familiarity with C or a C-derived language, as well as a basic understanding of object-oriented programming.

And the pace is fast. By chapter 3, you are building the requisite “Hello, World” application and running it in iPhone Simulator.

In that same chapter, Allan also introduces the basic syntax of Objective-C and highlights some of the “rather strange” ways that it deals with method calls. He discusses how the Cocoa Touch framework underlying iOS applications “is based on one of the oldest design patterns, the Model-View-Controller pattern, which dates from the 1970s.” And he warns that “[a]ttempting to write iOS applications while ignoring the underlying MVC patterns is a pointless exercise in make-work.”

Learning iOS Programming, 2nd Edition does not emphasize web-based applications. It centers, instead, on creating native applications using Apple’s SDK. “The obvious reason to use the native SDK,” Allan states, “is to do things that you can’t do using web technologies. The first generation of augmented reality applications is a case in point; these needed close integration with the iPhone’s onboard sensors (e.g., GPS, accelerometer, digital compass, and camera) and wouldn’t have been possible without that access.”

He emphasizes a financial reason, as well. “Consumers won’t buy your application on their platform just because you support other platforms; instead they want an application that looks like the rest of the applications on their platform, that follows the same interface paradigms as the rest of the applications they’re used to, and is integrated into their platform.”

He adds: “If you integrate your application into the iOS ecosphere, make use of the possibilities that the hardware offers, and make sure your user interface is optimized for the device, the user experience is going to be much improved.”

Hard to argue with that.

Learning iOS Programming, 2nd Edition provides the steps necessary to develop and market your first iOS application. Allan notes: “Until recently, the only way to obtain the iOS SDK was to become a registered iOS developer. However, you can now download the current release of Xcode and the iOS SDK directly from the Mac App Store.”

Of course, if you intend to distribute your applications “or even just deploy them onto your own device, you will also need to register with Apple as a developer and then enroll in one of the developer programs.”

You may need some system upgrades, as well. To develop apps for the iOS, you’ll need an Intel Mac running OS X 10.6 (“Snow Leopard”) or later. If you plan to create apps that use Apple’s iCloud, you’ll need OS X 10.7 (“Lion”) or later.

One other recommendation from Allan: If you’re truly serious about being an iOS developer, consider also registering with the Mac Developer Program.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.

Learn Microsoft Visual C# 2010 with ‘Start Here!’ Book for Beginners – #programming #bookreview

Learn Microsoft Visual C# 2010
By John Paul Mueller
(Microsoft Press, paperback, list price $34.99; Kindle edition, list price $27.99)

I like the “Start Here!” series from Microsoft Press. The books, in my view, provide a convenient, affordable and approachable way to develop some new skills in a hurry, without having to take classes.

There is nothing wrong with taking classes, of course. Most of us in America’s workforce (working or unemployed) need all of the new skills and education we can get. But if, like me, you’ve checked the prices of online classes lately and also looked at your checking account, you likely need some affordable alternatives.

If you are ready to tackle Microsoft Visual C# 2010,  you definitely can “Start Here!”, with John Paul Muller’s well-written new book.

Learn Microsoft Visual C# 2010 has been “conceived and created for the complete novice–someone who has no programming experience at all.” And it uses a hands-on approach to learning. It is not recommended for experienced programmers seeking to pick up another language.

But if you are, indeed, a complete novice to computer programming, you probably should read another “Start Here!” book first: Fundamentals of Microsoft .NET Programming by Rod Stephens. Or, at least have that book handy to read in conjunction with Learn Microsoft Visual C# 2010.

The “Fundamentals” book explains and illustrates many essential terms and concepts, such as routines, call stacks, and passing parameters. And sometimes, in Learn Microsoft Visual C# 2010, you will be referred to some of the definitions and examples found in Fundamentals of Microsoft .NET Programming.

The software download section of Learn Microsoft Visual C# 2010 may be a bit confusing for some beginners. Some of the screens and choices have changed somewhat and some have been combined since the book was published.

And while the author says “you don’t need a copy of SQL Server to work through the examples in this book,” the “Code Samples” discussion in the book’s introduction says otherwise.: “…your system should have Visual Studio 2010 and SQL Server 2008 installed.”

I left an SQL option box unchecked when setting up for my download, but I still received all of the SQL files. And, altogether, I spent a ridiculous 14 hours going through (and sometimes sleeping through) the download and installation process on a somewhat aging PC running Windows XP and a not-so-blazing wi-fi connection.

Your results will vary. So do not be in a hurry, even with a fast system. Set aside plenty of time to do things right once you start the process.

But at least all of the software tools used in this book are free. And once things are up and running, the author takes you right into the process of learning how to develop applications using C#.

His book is divided into 12 chapters:

  • Chapter 1: Getting to Know C# – Includes the Integrated Development Environment (IDE), creating and testing a Windows Forms application project, viewing its code, using Windows Presentation Foundation (WPF), creating and testing a WPF project, and viewing the code produced.
  • Chapter 2: Developing a Web Project – Focuses on developing two web applications using C#. Also shows how to download and install tools used to develop web applications.
  • Chapter 3: Using Simple Data Manipulation Techniques – Introduces data manipulation and shows how to use Language Integrated Inquiry (LINQ) to manipulate data.
  • Chapter 4: Using Collections to Store Data – Shows how to create containers to store similar data together, and explains three different types of data storage.
  • Chapter 5: Working with XML – Shows how to use eXtensible Markup Language (XML) in tasks such as saving applications settings and working with web services.
  • Chapter 6: Accessing a Web Service – Shows how to access free web services using two techniques that C# provides: Representational State Transfer (REST) and Simple Object Access Protocol (SOAP).
  • Chapter 7: Using the Windows Presentation Foundation – Focuses on using WPF to “help you create applications with impressive interfaces and new features that aren’t available using older C# development techniques.”
  • Chapter 8: Working with Libraries – Programmers try to reuse code as much as possible, to speed up the development process. This chapter shows how to create and use a library as part of  an application.
  • Chapter 9: Creating Utility Applications – “…shows how to create applications that have a command-line interface so that you can work with them quickly and automate them in various ways.”
  • Chapter 10: Using LINQ in Web Applications – Shows how to use LINQ to ask an application to supply certain types of data.
  • Chapter 11: Working with Silverlight Applications – Silverlight “works with multiple browsers and on multiple platforms”  and “can transform your C# application into something that works everywhere.” This chapter focuses on understanding “the basics of Silverlight development using C#.”
  • Chapter 12: Debugging Applications – Shows how to apply tracing techniques learned in this book to the process of finding and fixing errors.

The code samples used in the learning exercises can be downloaded from a Microsoft site. And, once you work your way through the book, the author says you may want to move up to another book, Microsoft Visual C# Step by Step.

You also may be eager to take a C# class, online or on campus, where you can learn from an instructor and fellow students.

It all depends on your resources and how committed you are to programming in C# after you “Start Here!”

Si Dunn