Monday, November 23, 2015

Learning to Make Video Games: One Geek's Journey Part 1

Humble Beginnings

For a very long time I have wanted to make video games. Not just as a hobby, but also as a profession. I am starting this journey in earnest now and I am writing this to share my experience in the hopes that others may benefit from it, but also for myself as sort of a journal as I progress.

First a little background. I began my journey after high school, taking programming classes at a local community college. I was on a path to get an associates degree in Computer Science, with a focus on programming. Life, as it turns out, had other plans for me. After completing a few semesters I happened to find the love my life, my wife, and very soon after and quite unexpectedly, she became pregnant with our first child. So I decided to put my plans on hold in order to provide for and be there for my family. Having always been a geek and quite proficient in networking and all things PC, I had already been working as a junior system administrator. So I worked to get a few more certifications under my belt and continued on that career path up until very recently.

Fast forward 20 years. My children, two, are both grown now, my son 19 and in the Navy, my daughter 17 and completing her final year of high school. She also joining the Navy after high school. My wife has found a career that she loves and is very happy with. I have given up the corporate career and now own my own small computer repair and managed service business. While not a lucrative as my former jobs, I am very happy doing it. Still an avid gamer I have decided I have reached a point where I can pursue my original dream of making video games.

Old Dog, New Tricks

So at the tender age of 40, I am taking a two-pronged approach to achieving my dream. To my surprise my community college still had all my records on file, even though I had not taken a class in over 14 years. As it also turned out, they had a new degree path available, Game Design and Development. As most of the classes I had taken previously were general education courses and a few entry-level programming courses, almost all of my old credits still applied. Awesome! So the first approach is getting my degree in the Game Design and Development. Currently I am in the early core courses of the degree so I haven't gotten into programming courses just yet, mostly design concept courses.

My second approach will be self-paced learning. I have purchased a few courses at Udemy on creating games with UnityI am also utilizing some free training courses from Microsoft Channel 9 on the C# programming language. After considering both Unity and Unreal Engine to begin creating games, I settled on Unity. I chose Unity largely for two reasons. First, it appeared to me to have a slightly lower learning curve than Unreal Engine. I guess I will find out if I am correct. Second, I was exciting by the possibility of cross-platform development. As C# is used by Unity for scripting, I am also utilizing the C# courses from Microsoft simultaneously.

Unity3D First Impressions

So this week I downloaded and installed Unity3D 5 Personal Edition. I have not started on the Udemy course yet, but I wanted to get prepared and familiarize myself with the interface and options. So after installing I began with the Interface and Essentials tutorials on the Unity website.

For starters the tutorials are laid out well and ease you into using the interface. Each tutorial expands on the last and explains more and more of the interface options. Upon opening Unity for the first time, the interface can be a bit overwhelming as there are several panes, tool bars with a myriad of options in each. The tutorials will help you get a grasp of what each pane does and how to utilize them.

When first starting a new project, assuming that you have chosen a 3D project, you are presented with fours panes; the Hierarchy pane, Scene pane, Project Pane, and the Inspector pane. Anyone who has used Unity 4 versions, will notice that this is a slightly different layout, version 4 had five starting panes.

The Scene pane is where you visually construct the game and can manipulate objects in 2D and 3D. The Hierarchy pane lists all objects in the scene in alphabetical order and in hierarchical order to show parenting. The project pane shows all assets you are currently working with, in one place, giving you quick access to everything in your game. The inspector pane is context specific and will show the properties of whatever object, asset or settings panel you have selected. In previous versions of Unity the Game pane was a separate fifth pane in the default view. It now shares the Scene pane as a separate tab in the same pane.

At the top, center of the screen are Play controls. This allows you to test your game while in the engine. You have the option to play test in real-time, pause or frame-by-frame in the Game view. The top-left toolbar allows you to navigate the Scene view and manipulate objects visually. The top-right tool bar are the Layers and Layout drop-down. The Layers drop-down allows you to add or hide layers on content. The Layouts drop-down allows you to select different layouts for the Unity interface. For those of you more familiar to the 5 pane view from previous versions fear not, it is one of the layout options from the drop-down. You also have options to save or delete a layout, so presumably you can create the layout you are most comfortable with and save it. More on that in a bit.

Being a complete novice, I am assuming that a majority of time will be spent in the Scene pane. The Scene pane initially opens with a completely open space with a grid pattern floor and simple sky box scene. It has a single light source illuminating the scene and a single camera view. The four top left tools buttons correspond the  Q, W, E and R keys, provide a quick keyboard shortcut, in combination with a right mouse hold, to change the way the you move the view in the Scene; i.e. up, down, left, right, pivot, pan and tilt. This will also be how you place, move and scale objects in the Scene view.

So having gone through some of tutorials and actually starting to use the interface I can say that I like the default layout for the most part. Having watched the tutorial which showed the 5 pane view, where the Game view was a separate pane, I think that having it a tab in the same pane as the Scene view is a good choice. The frees up valuable screen real estate. While I love that you can play test in the engine without having to compile, I think the Game view does not need a separate pane that is always in view. Having it as a tab in the Scene pane gives you quick access when you want to jump in a play test, without taking up 20% of the screen.


Unity 5 Interface

The four pane view in my opinion is optimal. You can re-size any of the panes to your liking. For me, I thought the hierarchy pane is a bit wider than need be. Also, I think that the Inspector Pane is a bit taller than needed. Personally I would like the have the Hierarchy Pane above the the Inspector pane on the right side, providing more room for the Scene Pane. That's where I did have some issues. While I could detach a pane and move it to a new part of the screen, I could not figure out how to fix it into the new position, it simply remained as a floating window. After fumbling around I was able to get the pane snapped into the position that I wanted it. You have to make sure that when you grab the pane, by holding down the left mouse button, the cursor in positioned on the tab in the pane, and not the empty space next to the tab. When the cursor is on the tab it will snap into area of the another pane automatically. Like I said I did eventually sort it out, but I think that the interface should be a little more intuitive and snap into position no matter where the cursor is positioned in the pane.

I determined that where the floating pane comes in handy is with a multi-monitor setup. In my case I have dual monitors. If you undock a pane and keep it as a floating window you can position it on a different screen. You can also save it as a layout. I tested it by undocking the Hierarchy and Project panes and moving them to my second monitor. I saved the layout and then closed the Unity interface. After re-opening Unity the undocked panes opened up on my second monitor right where I has positioned them. A nice feature for those with multi-monitor setups who really want to stretch their screen real estate. 

Another useful feature I discovered in my fumbling is that on each pane you can add additional tabs, the same way the the Scene view and Game view are separate tabs in the same pane. That is when I also discovered that there are some additional views that are not in the default view; Profiler and Animation. Not sure what they are for yet, but I am sure I will get there eventually. With the tabs feature you can group views in the same pane. So if you really want to go minimalist with your interface, you can. Having the ability set the screen to your own personal preferences is an outstanding feature, even with my little gripe about moving the panes. And floating panes certainly will help those with multi-monitor configurations maximize to their heart's content.

I have yet to get into placing objects in the Scene view, but I will be doing that soon. From the tutorials I know that you can manipulate objects on each individual axis or all axes simultaneously. It does seem that manipulating objects on an individual axis can become a bit unwieldy and the objects can easily become disproportionate. I'll have more on that in a future segment.

Overall my first impression is that Unity does a good job with the interface and the default interface should suffice for most developers needs. Again, having the ability to personalize the layout to your individual liking is a top notch feature. Aside from my one little complaint I am very pleased with my experience so far.

Please stayed tuned as I plan the add segments on a weekly basis at a minimum, perhaps more frequently when I can. Thank you for reading and I hoped you enjoyed.














Monday, November 2, 2015

Augmenting The User Experience in Gaming

We live in an ever increasing technological world. Just look around and you will see a multitude of people with smart phones, tablets, laptops or in many cases all three. Technology is part of our every day lives and we rely in for many different things. And very soon, technology will change how we see the world through the use of AR or augmented reality.

What is Augmented Reality?

Augemented Reality is the use of technology to supplement the real world with sensory input such as sound, video, graphics and GPS. Essentially the real-world is modified by a computer and the surrounding of the real world of the user becomes interactive and digitally malleable.


Microsoft Hololens
This is not to be confused with VR or virtual reality. With virtual reality the user's world is completely replaced by the virtual one. AR technology enhances the users perception of the real world by overlaying objects in a spatially intelligent way.

Hardware

Currently there are several AR devices already available or under development. Here are just a few:

Microsoft Hololens
Magic Leap
Sony SmartEyeGlass
Google Glass

While there are different ways to augment reality all of these devices have the same goal, to modify the user's perception of their surroundings. 

AR technology available today comes in the form of smart phones and handheld gaming devices. Both iOS and Android devices have AR apps and games you can currently purchase and use. Additionally both the Nintendo 3DS and PS Vita both have AR gaming apps available. While these devices show the potential gaming applications of AR, the glaring limitation is that they provide a very small window for which to view the augmented objects that are overlaid on the real-world environment.

Nintendo 3DS AR Game

The next phase of AR devices that are currently under development will take AR gaming to next level and provide a far more engaging experience for the user. HMDs or head-mounted displays place images of the virtual and real world over the user's field of view. Modern HMDs make use of sensors to detect the user's head movement in order to align the virtual information to the real world and make adjustments accordingly. This creates a far more immersive and interactive experience as the user's entire field of view is incorporated. An example of this type of device that you may be familar with is Google Glass. Currently several big name tech companies are developing their own HMDs including Microsoft, Sony, and Samsung. Recently Google was one of several venture companies that invested $542 Billion dollars in AR startup Magic Leap. 

Sample Image from Magic Leap HMD

AR Gaming

There are two reasons that I feel AR will be a big part of gaming in the near future. First, large tech companies are spending a lot of money to develop these technolgies and put them in the hands of the consumers. Two, gamers are always looking forward to the next big thing or advacement. 

If you consider that in the last 30+ years the way we play games has not really changed very much. Since the Atari 2600 the basic components of the gamer's experience have remained the same. You have the gaming device, some form of a handheld controller and a display. Now the technology has certainly advanced since the 80's. Graphics are rapidly approaching near-releastic quality, displays have gotten bigger and better, controllers have become more ergonomic and feature-rich, and gaming engines include realistic physics.

Devices like the Nintendo Wii and Kinect have moved gamers a step forward in the way that they interact with games, but not in the immersive way that AR has the potential to do. Imagine sitting down to play Call of Duty but instead of merely sitting on your coach, you need to take cover behind it. Imagine running down the hallway in your house while having to put down supressing fire to get to the next objective. See the demo of gaming on the Magic Leap below.



These are the types of interactions that AR is promising and it will fundamentally change the way we play games and enhance our experience with them. Any environment in the real world can become canvas on which games are played and the user will be able to fully interact with the phyical and virtual world. The possibility of our environment becoming the game is truly exciting and opens up nearly endless possibilities for devolpers.  Several game developers are already embracing the technology. It will be games that help foster the technology and bring it to the masses. I know I am ready for the next step in gaming experience.

Monday, October 19, 2015

The Contributions of NPCs

Often in the games we play we tend to overlook the importance of non-player characters. While some may look upon these characters as mere distractions, a function of moving the story along in some way or a bit of comic relief, I think that we may loose sight of how important they can be in certain games. I'll even take it a step further and say that in some games, they can be a key component. 

Most often NPCs are just background filler in a game. A device to make the world seem more real and natural. They offer little more than mere scenery to the game. Occasionally the main character may speak with an NPC in a game; again a device to help move the story along or provide some additional information. So when does an NPC become more than just a simple device? When they are a key component in the game or in the life of the main character.

As an example, I will use Alfred Pennyworth from the Batman Arkham games. First a little background on the beloved butler and father figure of Bruce Wayne.


General Information
Full Name:     Alfred Thaddeus Crane Pennyworth
Occupation:   Butler/Valet
Height:          6 Ft (1.83 Meters)
Eyes:             Blue
Hair:              Grey
Abilities:         Medical training, Confidant
Affiliations:     Bruce Wayne, Batman, Robin, Nightwing, Thomas and Martha                            Wayne
Game Appearances: Batman: Arkham Origins, Batman: Arkham Asylum, Batman: Arkham City, Batman: Arkham Knight

Biography

Prior to being employed as the Wayne's butler, Alfred claims to have been an actor. Records indicate the Alfred had a varied career prior to his employment with the Wayne family and may have had some background or involvement with the military. After the Thomas and Martha Wayne are murdered, Alfred becomes the legal guardian of their orphaned son Bruce, whom he raises as his own. When Bruce takes up the persona of Batman, Alfred reluctantly aids Bruce in his crusade. Alfred always has a formal appearance and helps to keep Bruce grounded. Alfred is often witty and sarcastic in his conversations with Bruce, but always demonstrates an unwavering devotion to him and cares for him perhaps more than anyone else. While never failing to assist Bruce, it is his ultimate hope that Bruce will lay down the cowl once and for all and lead a normal life.

Personality

While frequently sarcastic with a dry sense of humor, Alfred is a well mannered and sophisticated individual. Alfred can be very witty when he chooses to be. He cares very deeply for Bruce and demonstrates this by always supporting Bruce even when he doesn't agree with his choice to be a vigilante. He is very resourceful whether he preparing a seven course meal or analyzing field intel for Batman. While a staunch supporter of Batman he is not afraid to disagree and argue with him on a course of action. Alfred is at times a moral compass for the caped crusader.

More Than The Average NPC

One of the main reasons that I think Alfred is significant as an NPC in the Arkham games, more so than NPCs in other games, is that he is the primary point of interaction for Batman during the game. While Batman does frequently have an internal monologue in the games and will have conversations in cut scenes leading up to and after a boss fight, Alfred is one of the only characters he interacts with on a regular basis. He may be one of the only characters that Batman interacts with outside of cut scenes. Without Alfred, Batman would largely be going around the game thinking to himself.

Alfred's influence in the game is subtle, but important. Batman's interactions with Alfred during the games are sometimes as trivial as requesting an equipment drop or something more important such as suggesting a course of action or providing a key piece of information. Those interactions are what make Alfred a key element in moving the story forward or in a different direction. And as Batman's demeanor is dark and brooding, Alfred will be the one to inject some humor with his dry, sarcastic wit. 

While we play the game because its fun to be Batman with all his tools and abilities, the story is more engaging because of the interactions with Alfred. Again his contributions can be easily overlooked, but he helps make the story more engaging. It reminds the player that they are not alone and helps to add a human element to the game. Even with all his ability and intelligence, Batman needs the assistance of his trusted and unassuming ally. We all want to be Batman, and we all need Alfred.