Archive for category: RMC News

RMC Primer: Everything Virtual Reality (VR)

Category: Industry News, RMC News     |     Tags: C#, Games, Mobile, Unity3D

RMC Primer: Virtual Reality

Virtual Reality is here. Since 2016 we can play high quality experiences.

In my previous article Finding Your Next Unity3D Job I overview what companies want in prospective candidates and outline where you can search for available positions. And in Get a Job In Game Development, I discuss the specifics of a programming career in the games industry

The games industry spans myriad platforms. Historically, PC (Commodore, Amiga, Dos, Windows, Mac, Linux) through the 70’s and 80’s led the medium. Consoles (Atari, Nintendo, Sega, Sony, Microsoft) and handheld (especially Nintendo) brought the first game-specific hardware to consumers. The 2007 release of the iPhone brought the critical masses to the device that would launch more games per year than any other platform before it. People who ‘never play games’ started to play, and continue to play today. The primary leader of advancement each year has been ‘better graphics’. Visuals are important to the marketing, promotion, and experience of playing video games. While the history of that technology spans decades, the number of other major technology advances is relatively small.

Its a short list. Here are the most significant paradigms in video games:

What is VR?

Virtual reality (VR) is a computer technology that uses software-generated realistic images, sounds and other sensations to replicate an a real environment or an imaginary setting, and simulates a user’s physical presence in this environment to enable the user to interact with this space. The essential hardware is a VR Headset.

Visuals

Visuals are at the essence of VR.

If all humans had just one eye, we would see still see robust visual information. But compare that to 2 eyes. Our 2 eyes look in the same general direction at the same objects. However, the offset position of our eyes (inches apart) and the unique angle (looking in slightly towards the nose) give us much more information than one eye could give. Through stereopsis we sense depth, perspective, and motion at a more profound level.

In traditional software development, visual content is designed for one screen of output (e.g. computer monitor or TV). This is essentially a one-eyed perception of the world within our games. For decades, we have adapted to see those worlds as realistic.

The perceived psychological distance between our ‘self’ and our ‘game’ collapses. The subtleties of where we are sitting, how we are sitting, and the angle of the screen are insignificant. In one-screen gaming, we are not ourselves, we are the screen.

However, the essential difference in VR is the simultaneous output of 2 high-resolution, high frame-rate screens. For the first time in the virtual gaming world we are gaining the same benefits of stereopsis in the physical world.

In VR gaming, we are no longer our game screen, we are ourself.

Input

Traditional gaming input devices include keyboard, mouse, controller (joystick/gamepad), and more recently gesture and voice. VR can and will embrace those devices too.

Primary Inputs

  • Headset – the position, angle, and acceleration of your head are input.
  • Motion Controller – The position, angle, and acceleration of your hand(s) are input.
  • Gamepad – Traditional console game controllers are also popular.
  • Others… (Magic Leap)

VR Challenges / Solutions

VR Platforms

While there have been attempts at VR in the past, 2016 marks the relevancy of VR to the mainstream. The cost, quality, and distribution are finally here. Some are already released and before the end of the year, all the known devices will be released.

Top Platforms

  • Vive – Highest price, best hardware
  • Oculus
  • Playstation VR – Lower price non-mobile with massive distribution potential (with 40 million PS4’s sold as of October, 2016)

Others

VR Software

Forever, we as game players waited for the right hardware. Its here. Now the game development industry is scrambling to provide us content.

Games

Movies

  • The Wild West of VR Narrative ( link )

Experiences

Uses For VR

Entertainment is the primary usage for the VR we see today, but telepresence, healthcare, and education have massive potential too.

Education

  • LifeLique (Life Like) – Interactive 3D models for STEM learning
  • Virtual Reality Meets Education ( link )

Developing VR

Apple has yet (October 2016) to announce specific plans for VR/AR, but the major game development platforms are embracing VR. Some more quickly and completely than others. Here are a few leading options.

 

Resources

  1. Big Storage Is The New Reality In Virtual Reality ( link )
  2. Investing in VR Could Kill VR ( link )

RMC Primer: Get A Job In Game Development

Category: Industry News, RMC News     |     Tags: C#, Games, Mobile, Unity3D

RMC Primer: Get A Job In Game Development

A career in video game development is challenging and rewarding. But getting into the industry is not easy.

As reported in the Guardian, the game development industry makes $60bn a year [2014]. It is an industry that’s bigger than Hollywood, that dwarves the music business – and an increasing number of young people want to work in it. Hundreds of universities throughout the world offer degree courses in computer games programming and design.

It is a good time to join. With the arrival of digital distribution, games now have a bigger audience than ever; they are beamed directly to our phones, PC, consoles and tablets.

In my previous article Finding Your Next Unity3D Job I overview what companies want in prospective candidates and outline where you can search for available positions.

As a tangent on the same subject, below is a quick overview of working in the industry with a decided focus on programmer roles, my chosen career.

Game Development Careers

Here are the common roles on a small (5-10 person) game development team.

Roles

  • Producer – Owns the ‘product’. Decides what features to add.
  • Project Manager – Owns the ‘process’ and timeline. Decides if time exists to add the desired features.
  • Artist – Creates concepts, production art, and animation. Decides how the game looks.
  • Tester – Plays the game, reports bugs. Decides what needs improvement.
  • Programming
    • Programmer – Codes the tools for the team and the gameplay for the end-users. Decides how the game works.
    • Lead Programmer – Lead the programming team responsible for creating all the computer code which runs and controls a game. Produce the technical specification of the game and managing the overall code development process

Larger teams may have more specific responsibilities in departments (and roles); Backoffice (Accounting, HR, Marketing), Art (Concept Artist, Animator), Audio (Music Composer, SFX), Programming (Engine programmer, gameplay programmer), Game Designer, Level Designer.

Programming

Let’s compare the skills required for programmer and Lead Programmer. Typically a ‘Lead Programmer’ was first a ‘Programmer’ earlier in his/her career.

I choose to divide the lists into 3 areas; the technical skills (fostered by education), the personality skills (less trainable), and the social skills (how we interact with others).

You can see that as a programmer advances in his career, the lead position requires many social skills to excel.

Required skills (Source: CreativeSkillset.org)

Programmer

  • Tech
    • be able to programme in C++, C and other programming languages
    • have specific platform experience, e.g. Wii, PlayStation, Xbox
    • have a good knowledge of game play
  • Personality
    • be systematic and highly organised
    • be creative and possess problem-solving skills
    • be able to work to deadlines
  • Social
    • have good communication skills
    • be able to work on your own initiative and as part of a team

Lead Programmer

  • Tech
    • have a hands-on knowledge of all programming roles
    • have advanced programming skills
  • Personality
    • be able to resolve conflicts and solve problems
    • be able to multitask
    • be creative and innovative
    • be composed under pressure
  • Social
    • be a team player and a leader
    • be approachable and listen to what people need and want, both from other disciplines and within your own team
    • be able to communicate your ideas and vision to the programming team
    • be able to inspire and motivate the programming team to ensure that everything gets fixed on schedule
    • have excellent people skills with management and communication, including tact and diplomacy

Advice For Career Planning

I choose to divide employee effort/value into 3 areas; the product (what is being created), the process (how it is created), and the people (who is creating it). Here is some advice;

Focus on ‘Soft Skills’ – Programming is important. Its ‘the’ core skill to develop, but once you set that ball in motion, shift your focus to other ‘soft’ skills. Everyone is a great programmer. It doesn’t set you apart as dramatically as other areas of improvement. Many will disagree with my point of view. Many product-centric employees believe that doing more development, in less time, with less lines of code is the only goal. As a people-centric and process-centric philosopher, I recommend instead to focus on the soft skills; EQ (Emotional Intelligence Quotient), social graces, communication, language, personal habits, interpersonal skills, managing people, leadership, etc. that characterize relationships with other people.

Focus on Learning – Create a virtuous cycle of meeting the requirements of your assigned job description (typically focused on ‘product’) while also raising quality of the process and bolstering your people skills. For more info, see my previous article Ultimate Path Learning. I contribute high quality Free Unity / C# Video Tutorials for new and veteran developers to build community and sharpen my knowledge and communication skills.

Pick Your Moment – Jack Ma, Founder of Alibaba advises to pick your moment. Your strategy must change as you age.

  • Age: Childhood – Be a good student.
  • Age: 20’s – Follow a mentor. Go to a small company — you learn the passion, you learn the dreams, and you learn how to do lots of things at any one time. Make mistakes.
  • Age: 30’s – You have to think very clearly if you want to work for yourself. If you really want to be an entrepreneur. This is the ‘mid-game’.
  • Age: 40’s – You have to do all the things that you are already good at.
  • Age 50’s – Work for the young people.
  • Age 60’s – Spend time on yourself. Its too late for you to change.

Focus on Passion – Use your early years to try EVERYTHING professionally, then settle into the things that are a fit for your strengths, your interests, and your passions. For more info about my passions including teaching and charity see my previous article Playing For Good.

Consider Your Mid-Game – Over your career (ex. 40 years of work) you will likely hold many different positions and many different companies. You may start as a Game Tester, then become a Programmer, then Senior Programmer, then a Lead Programmer which is generally  most advanced role in that specific career track. For the excellent and ambitious that might happen in the first 10 or so years. So what then do you do for the next 30 years of your career? There are endless layers on top of the value offered within that track, but other opportunities are calling too. The biggest mid-game (i.e. mid-career) question is do you want to lead people, or do you want to stay solo. Consider your strengths and interests. As your answer becomes more clear you can steer your growth and progression to fit that goal.

Avoid ‘Rockstar’ Programmers – These are programmers that 1. are extremely efficient and deliver results and 2. are isolationist and self-serving. There are countless definitions for this type of worker, but let’s stick to definition for now. There is nothing ‘wrong’ with working that way per-se, but when a company actively hires rockstar programmers (through the language of job descriptions and the practice of the recruiting process) it is a red flag. The company may value end-results more than process and may value product more than people. As a job-seeker, be cautious of joining such a team unless those qualities match your career goals. A Rockstar coworker may indeed raise the quality of the product, which is good for you and your portfolio. But a teaching, sharing, collaborative programmer will help you build your own toolset more dramatically which IMHO is more important to your career. As a job-recruiter, be cautious of hiring such a candidate as he/she categorically will not thrive within a people-centric environment and the rest of your team may be impacted as well.

Short Interview About My Career

I have 16 years of experience in video game development [2015]. My roles include; founding team member of Neopets.com, owner and consultant at Rivello Multimedia Consulting (portfolio), and senior programming positions at leading game studios (LinkedIn).

What education do you have?

I decided between studying computer science and graphic design. I graduated with a B.A. degree in Media Studies (graphic design + multimedia). In the first year of my career I changed from an artist position to programmer. I have been a programmer since.

What was your career path?

Game programmer and founding-team member of a gaming startup which grew from 5 people to 180 in 8 years. Managed a team of 12 game developers. Left that company to start another company as a consultant for 8 years. Now, I’m a full-time employee again, as a Unity game developer.

Did you expect to end up in this field?

Ending high-school in 1995 I dreamed of working in video game development. At that time that meant working for one of the biggest companies. Then the internet bubble came and went, mobile phones came and stayed, and democratization of game development made indies a reality. Its a totally different industry now.

When you are interviewing young candidates, what are you looking for?  What advice can I give students so that they stand out?

When hiring for a small team, end-to-end game development experience and social skills are priorities. I like to see a side-project the candidate completed at home handling the game design, development, (simple art), and really succeeding in the polish of the input as well as the feedback to the user. A candidate really impresses who can speak clearly about his or her goals on that project, who can defend the choices made during design and development, and who can take criticism on the completed project. A student should get experience working with people (customer service, retail at a store, etc…) anything where communication is critical so they can speak their mind, listen actively, and demonstrate putting the needs of others first in conversations and meetings.

Are there any programming packages or languages you like prospective candidates to have experience with?

As a web developer I recommend learning some client platform (e.g. HTML5/JS/CSS) and some server platform (e.g. Ruby). Typically members of a team will focus on one or the other, but knowing some of both will help you collaborate with more compassion. Young game developers are advised to learn engine-level programming (e.g. C++) and gameplay-level programming (e.g. C#) for the same reason. I’m learned to program outside of academia, so my focus is mostly client side (Unity with C# most recently which serves me well).

Many students are interested in studying business.  Do you think programming/technology based skills are becoming essential in this area of study?  If so what types of skills?

For business-people the required technology has changed. It went from nothing required, then in the 90’s Microsoft Office was the core skill, then in the 00’s learning to program webpages was the buzz-topic, now I think commanding social media channels (for marketing purposes) may the the latest tech area that business people are encouraged to learn. I’m not sure of the answer, but I’d say if you don’t ‘do’ tech in your job, but you work with people who do, then you want to gain as much expertise as possible on the tech that your coworkers know. This builds rapport/understanding and improves the efficiency the feedback loop between your requests and the tech teams responses.

One of my students ask me to forward this question J. How important is it to have solid mathematical skills in this field?

You can be an excellent programmer without historical interest or excellence in mathematics. Becoming comfortable with ‘logic’ as a concept has been more relevant to me than specific mathematics. Some exceptions where math directly helps my game development are trigonometry for 2d and 3d tasks (collisions, path finding, camera) and statistics for understanding creating controllably-random level generation and AI routines.

Removing cost and skills constraints, what software packages would you encourage future programmers to learn?

For game development. Learn to model simple 3D in Maya, animate it in Maya, texture it with Photoshop, import into Unity3D (or Unreal), and create a simple, complete game with it. The goal is workflow, not polished final product.

What software packages would you encourage future programs to learn that are accessible?

Unity3D. Its extremely popular and accessible (free and cross platform). Other engines exist and the popularity of tools changes, but competency or expertise in any one package is my recommendation. 

If you were to pick a languages to teach students today.  What language would it be and why?

C++ and Java have VAST resources available online and in academia. They are great for learning the fundamentals. C# is great too. From a learning perspective, you want a language with core features such as class based inheritance and strong typing. You can compile and run small demos for free online via Tutorialspoint.com and others.

Resources

  1. Find your ideal job fit (Sokanu.com)
  2. Is It Worth Getting A Degree In Game Development (IGN.com)
  3. How To Get A Job In Game Development (TheGuardian.com)
  4. Be Organized (GettingThingsDone.com)
  5. Evaluate Your Progress (Forbes.com)
  6. Invest In Your Personal Development (Glen Lopis)
  7. Raise Your Own Standards (Jack Zenger)

Unity – Tools Of The Trade

Category: Quick Tips, RMC News     |     Tags: AssetStore, C#, Review, Unity3D

As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development. The Unity IDE is great for integrating your assets and code, setting up your scenes visually, and tweaking parameters through the powerful Inspector window. While Unity ships with a very capable code editor, MonoDevelop, serious developers prefer more powerful tools.

Here is a list of the must-have tools for Unity development.


unity_tools_600_200_banner_visual_studio_v1

Name: Visual Studio – Code Editor (Various Versions, Free to $499)

Competitor: MonoDevelop (Free), Xamarin Studio (300-1000$ / yr)

Details: Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It includes a code editor supporting IntelliSense as well as code refactoring. Built-in languages include Unity’s C# as well as C, C++, and more.

Pros:

  • Development Environment – Focus on creating value and accomplishing task quicker with a clean, fast and powerful development environment.
  • Semantic Code Analysis – Semantics (references, declarations, etc…) not just syntax are analyzed as you type. This allows for better refactoring.
  • VisualSVNSubversion integration (GIT too)
  • Great Navigation – New ways to travel around your code, including peek.
  • UML Diagram Built In – Improving architecture through modeling

Showcase Video:


unity_tools_600_200_banner_resharper_v1

Name: ReSharper ($185 for personal, $310 for a whole team)

Details: ReSharper is a renowned productivity tool that makes Microsoft Visual Studio a much better IDE. Thousands of developers worldwide wonder how they’ve ever lived without ReSharper’s code inspections, automated code refactorings, blazing fast navigation, and coding assistance.

The ultimate Agile tool is ReSharper. It is the one thing for C# developers that removes fear of change. Refactoring is just so damn easy that change isn’t scary. – Jaco Pretorius of ThoughtWorks

Pros:

  • Analyze code quality – On-the-fly code quality analysis in C#, VB.NET, XAML, ASP.NET, ASP.NET MVC, JavaScript, CSS, HTML, and XML. ReSharper tells you right away if your code contains errors or can be improved.
  • Instantly traverse your entire solution  – Navigation features to instantly traverse your entire solution. You can jump to any file, type, or type member in no time, or navigate from a specific symbol to its usages, base and derived symbols, or implementations.
  • Eliminate errors and code smells – Instant fixes to eliminate errors and code smells. Not only does ReSharper warn you when there’s a problem in your code but it provides quick-fixes to solve them automatically.
  • Enjoy code editing helpers – Multiple code editing helpers including extended IntelliSense, hundreds of instant code transformations, auto-importing namespaces, rearranging code and displaying documentation.
  • Safely change your code base – Automated solution-wide code refactorings to safely change your code base. Whether you need to revitalize legacy code or put your project structure in order, you can lean on ReSharper.
  • Comply to coding standards – Code formatting and cleanup functionality is at your disposal to get rid of unused code and ensure compliance to coding standards.
  • More features… including generation of common code, extensible templates, internationalization assistance, and unit test runner.

Showcase Video:


unity_tools_600_200_banner_unityvs_v1

Name: UnityVS ($99 for personal, $249 for a whole team)

Details: UnityVS is the missing ‘glue’ between the Unity IDE and the Visual Studio code editor.

Pros:

  • Connect Visual Studio’s debugger to Unity to debug your scripts. Put breakpoints, inspect and modify variables and arguments and evaluate complex expressions to fix bugs promptly. Without UnityVS, Visual Studio is just a powerful yet decoupled code editor.
  • UnityVS is packed with productivity features: code snippets, wizards, tool windows such as the Unity project explorer. UnityVS sends the Unity console directly to Visual Studio.
  • A short list of essential features.

Play Unity and use breakpoints. At the breakpoint you can inspect AND EDIT the live values of any variable. If that doesn’t convince you to purchase UnityVS, you are insane. – Sam Rivello, RMC

Showcase Video:


uEP – Unity Expose Properties

Category: Full Tutorials, Quick Tips, RMC News     |     Tags: Unity3D

About RMC & Unity3D Rivello Multimedia Consulting (RMC) provides consulting services for applications and games. RMC specializes in Unity3D development (see our work here). Please contact us today with any questions, comments, and project quotes. As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

Why Use The Inspector?

For a complete introduction to Unity see my “Intro To Unity” Article. For a quick review: games in Unity are made up of multiple GameObjects that contain meshes, scripts, sounds, or other graphical elements like Lights. The Inspector displays detailed information about your currently selected GameObject, including all attached Components and their properties. Here, you modify the functionality of GameObjects in your scene. Any public field (publicly accessible variable) that is displayed in the Inspector can be directly modified while in edit mode and also while in play mode (the game is playing live). That is great.

The Inspector is a vital part of the Unity toolset with many powerful features. However, here I’ll focus on the specific programming-centric benefits of using the inspector.

Reasons

  • Gives us an (editable) view to all public fields on a game object.
  • Very powerful for experimentation, prototyping, and debugging.
  • Improves our interface to the code. E.g. instead of setting a color in code as #ff0000, you can have a GUI color picker in the inspector.

Example

public float myNumberField_float = 10f;

NOTE: Only public fields are shown in the inspector.

NOTE: Adding the attribute [HideInInspector] before a public field name will allow it to be public (for coding) but not be shown in the inspector. This is outside the scope of this article, but it is quite useful sometimes.

Why Use Properties?

As we learn in C# In Depth, for every type you write, you should consider its interface to the rest of the world (including classes within the same assembly). This is its description of what it makes available, its outward persona. Implementation shouldn’t be part of that description, any more than it absolutely has to be. (That’s why I prefer composition to inheritance, where the choice makes sense – inheritance generally exposes or limits possible implementations.)

A property communicates the idea of “I will make a value available to you, or accept a value from you.” It’s not an implementation concept, it’s an interface concept. A field, on the other hand, communicates the implementation – it says “this type represents a value in this very specific way”. There’s no encapsulation, it’s the bare storage format. This is part of the reason fields aren’t part of interfaces – they don’t belong there, as they talk about how something is achieved rather than what is achieved.

I quite agree that a lot of the time, fields could actually be used with no issues in the lifetime of the application. It’s just not clear beforehand which those times are, and it still violates the design principle of not exposing implementation.

Reasons

  • Through encapsulation you now have a publicly accessible ‘thing’ just like a field, but here you can more completely control it. For example, within the set {}  you could check the incoming ‘value’ and ensure it is between 1 and 10 before accepting the change.
  • Want to break into the debugger whenever the value changes? Just add a breakpoint in the setter.
  • Want to log all access? Just add logging to the getter.
  • Properties can be used for more advanced language features (like binding) too

Example

private float myNumberProperty_float = 10f;
public float myNumberProperty
{
	set {
		myNumberProperty_float = value;
	}
	get {
		return myNumberProperty_float;
	}	
}

Using Properties Via Inspector

By default, while Unity allows the inspector to shows with fields (variables), it does not render properties (getter/setters).

However, now you can do it all. I created the uExposeProperties (uEP) project. It is an asset store project for free. I’m hoping the community finds great uses for it. With uEP you get the best of both worlds; benefits of the inspector as well as properties.

Reasons

  • You get the benefits of the inspector
  • You get the benefits of properties
  • Your code stays very clean (only one simple attribute is added per property)

Example

NOTE: You must download the uEP package to use this functionality. It is not included in Unity.

private float myNumberProperty_float = 10f;
[ExposeProperty]
public float myNumberProperty
{
	set {
		myNumberProperty_float = value;
	}
	get {
		return myNumberProperty_float;
	}
	
}

Drawbacks

  • There is one major drawback: theoretical performance. The current implementation depends on the OnInspectorGUI() event which is far more expensive than not using it.
  • Any ideas on how to improve that?

Next Steps

  • Download the source-code (See ‘Member Resources’). Available Now.
  • Get uEP on the asset-store (Coming Soon!)

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]

Unity3D Reactive Extensions 2: Syntax & Marble Diagrams

Category: Full Tutorials, Quick Tips, RMC News     |     Tags: ReactiveExtensions, Unity3D

About RMC & Unity3D Rivello Multimedia Consulting (RMC) provides consulting services for applications and games. RMC specializes in Unity3D development (see our work here). Please contact us today with any questions, comments, and project quotes. As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

Why RX?

You can read more in my first article “Unity3D Reactive Extensions 1: An Introduction“. That is recommended reading before continuing with the article below.

How to do RX?

Here is a recap. In article 1 we used an RX approach for the following (academic) exercise;

Exercise: Dispatch a double click event based on custom timing parameters.

Reactive Extensions (RX) Solution

You can see the code is easy to read and powerful. While this algorithm requires state management, we don’t have to handle it directly. The internals of RX do it for us. You can imagine with a more complex feature, the code would be dramatically more than the RX solution. Below we break-down the code and explain each step.

NOTE: The TLP Library used in this article is a work in progress. It features only limited functionality and does not conform to common RX standards in the naming, signature, and structure of major elements. These differences are why the syntax and marble diagram names below are not 100% coincidental, but the concepts are similar. The TLP team invites other developers to fork the library and contribute to it. Still it is a fantastic learning tool and quite useful as-is.

Complete Code For RX Solution

//--------------------------------------
//  Methods
//--------------------------------------
///<summary>
///	Use this for initialization
///</summary>
void Start ()
{
	// VARIABLES
	float maxTimeAllowedBetweenSingleCLicks_float = 1;
	float delayBetweenAllowingADoubleClick_float = 5;	
	int clicksRequiredForADoubleClick_int = 2;
	
	// CREATE OBSERVABLE 
	//(ORDER IS NOT IMPORTANT, BUT SUBSCRIBE MUST BE LAST)
	var mouseDoubleClickObservable = Observable

		//RUN IT EVERY FRAME (INTERNALLY THAT MEANS Update()
		.everyFrame

		//FILTER RESULTS OF THE FRAME
		//WE CARE ONLY 'DID USER CLICK MOUSE BUTTON?'
		.filter	(
			_ => 
			Input.GetMouseButtonDown (0)
		)

		//DID WE FIND X RESULTS WITHIN Y SECONDS?
		.withinTimeframe (clicksRequiredForADoubleClick_int, maxTimeAllowedBetweenSingleCLicks_float)

		//REQUIRE SOME 'COOL-DOWN-TIME' BETWEEN SUCCESSES
		.onceEvery (delayBetweenAllowingADoubleClick_float);


	//FOR EVERY EVENT THAT MEETS THOSE CRITERIA, CALL A METHOD
	var subscription = mouseDoubleClickObservable
		.subscribe (
			_ => 
			_onMouseEvent (MouseEventType.DoubleClick)

		);


	Debug.Log ("Subscription Setup : " + subscription);


}
//--------------------------------------
//  Events
//--------------------------------------
/// <summary>
/// SUCCESS: Double click
/// </summary>
private void _onMouseEvent (MouseEventType aMouseEventType)
{

		Debug.Log ("RX._onMouseDoubleClick() " + aMouseEventType);
}

 

Marble Diagrams & RX Syntax

Marble diagrams are frequently in videos and blog entries from the Rx team explaining how certain operators in Rx work. From top to bottom there are; source stream(s), operators, and then the outgoing stream. The RXJava wiki has an especially pretty set of these images.

Let’s take a closer look at the syntax we used.

  • 1. everyFrame: We observe an event stream on every frame (aka Update) in Unity…
  • 2. filter: …where the mouse button is down…
  • 3. withinTimeFrame: … X occurrences within Y seconds, which we call success…
  • 4. onceEvery: …and success can only happen every Z seconds…
  • 5. subscribe: …then call the desired method…

1. Operator: everyFrame (Similar to fromEvent)

From RXJava, we see that “the free-threaded nature of Rx is key to the performance characteristics of the event processing pipeline. However, in places where we bridge with the external world, this sometimes has negative effects due to thread-affine operations involved. The FromEvent [Pattern] bridges are one such place where we reach out to add and remove operations on events”.
 
Our specific use of everyFrame(), in pseudocode, would be like fromEvent (myMonoBehavior.Update).

2. Operator: filter

rmc_banner_filter_dropshadow_600_400_v1

You can filter an Observable, discarding any items that do not meet some test, by passing a filtering function into the filter( ) method. For example, the following code filters a list of integers, emitting only those that are even (that is, where the remainder from dividing the number by two is zero):

3. Operator: withinTimeFrame (Similar to buffer)

rmc_banner_buffer_dropshadow_600_400_v1

The buffer( ) method periodically gathers items emitted by a source Observable into bundles, and emits these bundles as its own emissions. There are a number of ways with which you can regulate how buffer( ) gathers items from the source Observable into bundles:

4. Operator: onceEvery (Similar to sample)

rmc_banner_sample_dropshadow_600_400_v1

5. Operator: subscribe

Subscribe is not an operator per se, it is something higher level in importance — When an observer subscribes to an observable sequence, the sequence begins and runs till completion. It is in the subscribe that we answer “What should ultimately happen with the outgoing event stream?”. In our example, we call a local method _onMouseEvent and we pass an appropriate MouseEventType.

NEXT STEPS

Our exploration into RX has just begun. Everyone interested is invited to download the source-code from my first article “Unity3D Reactive Extensions 1: An Introduction” and learn more. I continue to seek to find the best RX library for Unity development and have already begun to add RX into my game projects.`

Unity3D Reactive Extensions: An Introduction

Category: Full Tutorials, Quick Tips, RMC News     |     Tags: ReactiveExtensions, Unity3D

About RMC & Unity3D Rivello Multimedia Consulting (RMC) provides consulting services for applications and games. RMC specializes in Unity3D development (see our work here). Please contact us today with any questions, comments, and project quotes. As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

Why RX?

General

Obviously fantastic software can be created without RX. We work without it every day. So why consider it? Well, essentially because asynchonous programming is hard to do, brittle, and is a challenge to scale. Well as the Reactive Manifesto explains;

  1. The Need To Go Reactive – Each day applications are getting bigger, users expect more to happen in less time, and our projects are deployed to increasingly diverse set of (smaller) devices. To compete, old dogs need new tricks.
  2. Reactive Applications – They react to events; loading data, user gestures, system failures.
  3. Event-Driven – Event driven systems feature loose coupling between components and subsystems; a prerequisite for scalability and resilience.
  4. Scalable – With RX our data runs ‘as if’ it is synchronous. Even the currently synchronous stuff. So as complexity comes and delays ensue, it can flex to be asynchronous. Secondly, the decoupled nature allows for location transparency. Benefits include multi-threading (where possible).
  5. Resilient – In a reactive application, resilience is not an afterthought but part of the design from the beginning (see ‘onError’). Making failure a first class construct in the programming model provides the means to react to and manage it, which leads to applications that are highly tolerant to failure by being able to heal and repair themselves at run-time.
  6. Responsive – The philosophies and practices of RX programming seek minimal latency to the user experience.
  7. Conclusion – We expect that a rapidly increasing number of systems will follow this blueprint in the years ahead.

NOTE: While RX is designed to work with asynchronous data streams, it really doesn’t care. RX blindly accepts synchronous data within the same data flow.

Games

My first exposure to RX was regarding both UI behaviors (e.g. mouse events) and asynchronous data (e.g. loading from server). Gaming is inherently an asynchronous experience and the UI behaviors (e.g. user input) alone warrant a deep look at RX.

What is RX?

Iterables You are probably familiar with the concept of Iterables. In Unity we are used to using a List of values and looping through them and doing something synchronously. Observables In RX, it is observables that are a similar concept except the list may or may not be populated yet (i.e. it could start out empty) and may or may not be fully populated yet (i.e. ‘complete’). Still you iterate through the values, however asynchronously. Consider the following table;

Same Concept, Opposite Direction (Pull vs Push of Data)
Iterable (Pull) Observable (Push)
getDataFromLocalMemory()
.skip(10)
.take(5)
.map({ s -> return s + " changed" })
.forEach({ println "next => " + it })
getDataFromNetwork()
.skip(10)
.take(5)
.map({ s -> return s + " changed" })
.subscribe({ println "onNext => " + it })

Reactive applications use observable models, event streams and stateful clients.

Reactive extensions (RX) is the library designed for Functional Reactive Programming (FRP). It is “a library for composing asynchronous and event-based programs by using observable sequences.” What is FRP? The name comes from the language features used and the philosophy of the data exchange (See Figure 1).

Figure 1. Functional Reactive defined.

According to Haskell.org, Functional Reactive Programming (FRP) integrates time flow and compositional events into functional programming. This provides an elegant way to express computation in domains such as interactive animations, robotics, computer vision, user interfaces, and simulation. The major parts of RX;

  • Observables – Source of event stream & Subscriber – Observer of event stream.
  • Linq – Query the event stream (e.g. filter, map, zip)
  • Schedulers – Define the timing (inc. frequency) of concurrency.

As a quick primer, consider the following Observer->Subscriber event stream (See Figure 2).

Figure 2. Observer-to-Subscriber Event Stream.

Here the Observable emits an integer, it goes through an operation that adds 2 to it, and is finally received by the Subscriber (Observer). All steps are asynchronous, which means the subscriber does not actually know that the original value had been changed.

Operators

Between the Observable and the Subscriber the event stream can be operated upon. Here is a partial list of operators;

  • Transforming
    • map( ) — transform the items emitted by an Observable by applying a function to each of them
    • scan( ) — apply a function to each item emitted by an Observable, sequentially, and emit each successive value
  • Filtering
    • filter( ) — filter items emitted by an Observable
    • takeLast( ) — only emit the last n items emitted by an Observable
    • skip( ) — ignore the first n items emitted by an Observable
    • takeFirst( ) — emit only the first item emitted by an Observable, or the first item that meets some condition
  • Combining
    • startWith( ) — emit a specified sequence of items before beginning to emit the items from the Observable
    • merge( ) — combine multiple Observables into one
    • zip( ) — combine sets of items emitted by two or more Observables together via a specified function and emit items based on the results of this function

How to do RX?

Let’s consider a very typical operation; using mouse input to perform a simple operation. Compare the non-RX and RX approaches to the following (academic) exercise;

Exercise: Dispatch a double click event based on custom timing parameters.

Reactive Extensions (RX) Solution

You can see the code is easy to read and powerful. While this algorithm requires state management, we don’t have to handle it directly. The internals of RX do it for us. You can imagine with a more complex feature, the code would be dramatically more than the RX solution. You can read an in depth analysis of this code in my next article “Unity3D Reactive Extensions 2“.


//--------------------------------------
//  Methods
//--------------------------------------
///<summary>
///	Use this for initialization
///</summary>
void Start ()
{
	// VARIABLES
	float maxTimeAllowedBetweenSingleCLicks_float = 1;
	float delayBetweenAllowingADoubleClick_float = 5;
	int clicksRequiredForADoubleClick_int = 2;

	// CREATE OBSERVABLE
	//(ORDER IS NOT IMPORTANT, BUT SUBSCRIBE MUST BE LAST)
	var mouseDoubleClickObservable = Observable

		//RUN IT EVERY FRAME (INTERNALLY THAT MEANS Update()
		.everyFrame

		//FILTER RESULTS OF THE FRAME
		//WE CARE ONLY 'DID USER CLICK MOUSE BUTTON?'
		.filter	(
			_ =>
			Input.GetMouseButtonDown (0)
		)

		//DID WE FIND X RESULTS WITHIN Y SECONDS?
		.withinTimeframe (clicksRequiredForADoubleClick_int, maxTimeAllowedBetweenSingleCLicks_float)

		//REQUIRE SOME 'COOL-DOWN-TIME' BETWEEN SUCCESSES
		.onceEvery (delayBetweenAllowingADoubleClick_float);

	//FOR EVERY EVENT THAT MEETS THOSE CRITERIA, CALL A METHOD
	var subscription = mouseDoubleClickObservable
		.subscribe (
			_ =>
			_onMouseEvent (MouseEventType.DoubleClick)

		);

	Debug.Log ("Subscription Setup : " + subscription);

}
//--------------------------------------
//  Events
//--------------------------------------
/// <summary>
/// SUCCESS: Double click
/// </summary>
private void _onMouseEvent (MouseEventType aMouseEventType)
{

		Debug.Log ("RX._onMouseDoubleClick() " + aMouseEventType);
}

Traditional Solution (Non RX)

This code requires us to ‘manually’ maintain state. You can imagine with a more complex feature, the code here would be even more long-winded compared to the RX equivalent. Thankfully we can use Coroutines, otherwise there would be even more state-specific variable setup to write and maintain.

/// <summary>
/// KEEPING STATE: Timing information
/// </summary>
private int _state_clicksInLastXSeconds_int = 0;

/// <summary>
/// KEEPING STATE: Timing information
/// </summary>
private bool _wasLastEventTooRecent_boolean = false;

// PRIVATE STATIC
//--------------------------------------
//  Methods
//--------------------------------------
/// <summary>
/// Update this instance.
/// </summary>
void Update ()
{

	// VARIABLES
	int clicksRequiredForADoubleClick_int = 2;

	//
	if (Input.GetMouseButtonDown (0)) {

		if (!_wasLastEventTooRecent_boolean) {

			if (++_state_clicksInLastXSeconds_int >= clicksRequiredForADoubleClick_int) {

				//SUCCESS!
				_onMouseEvent (MouseEventType.DoubleClick);

				//STATE MANAGMENT
				_wasLastEventTooRecent_boolean = true;
				_state_clicksInLastXSeconds_int = 0;
				StartCoroutine ("DelayBetweenAllowingADoubleClick_Coroutine");
				StopCoroutine ("MaxTimeAllowedBetweenSingleCLicks_Coroutine");

			} else {

				//STATE MANAGMENT
				StartCoroutine ("MaxTimeAllowedBetweenSingleCLicks_Coroutine");
				StopCoroutine ("DelayBetweenAllowingADoubleClick_Coroutine");
			}
		}

	}

}

//--------------------------------------
//  Coroutines
//--------------------------------------
/// <summary>
/// HANDLES TIMING: Between clicks
/// </summary>
private IEnumerator MaxTimeAllowedBetweenSingleCLicks_Coroutine ()
{
	// VARIABLES
	float maxTimeAllowedBetweenSingleCLicks_float = 1;

	// TIMING
	yield return new WaitForSeconds (maxTimeAllowedBetweenSingleCLicks_float);

	// STATE MANAGMENT
	_state_clicksInLastXSeconds_int = 0;

}

/// <summary>
/// HANDLES TIMING: Between clicks
/// </summary>
private IEnumerator DelayBetweenAllowingADoubleClick_Coroutine ()
{
	// VARIABLES
	float delayBetweenAllowingADoubleClick_float = 5;

	// TIMING
	yield return new WaitForSeconds (delayBetweenAllowingADoubleClick_float);

	// STATE MANAGMENT
	_wasLastEventTooRecent_boolean = false;

}

//--------------------------------------
//  Events
//--------------------------------------
/// <summary>
/// _ons the mouse event.
/// </summary>
/// <param name="aMouseEventType">A mouse event type.</param>
private void _onMouseEvent (MouseEventType aMouseEventType)
{
	Debug.Log ("NonRX._onMouseDoubleClick() " + aMouseEventType);
}

NOTE: The Unity source-code for this article is available (See ‘Member Resources’ below).

RX & Unity

Figure 3. RX & Unity

Figure 3. RX & Unity

RX is a library that can be theoretically ported to any language. It currently exists in many languages; prominently Java and JavaScript. There are C# ports, but unfortunately not all are Unity-compatible. Unity’s (latest version 4.3.4) C# is compatible with an OLD version of Mono – Mono v2.65 (versus the latest available v3.2.7). Mono is the open source version of .NET which powers the C# language features of Unity. So, while RX libraries in C# are plentiful, there is not yet a Unity-compatible library which contains all the features we would like to see. All examples covered int his article are from the amazing people at Tiny Lab Production (TLP). Their RX library is available for free download (See ‘Member Resources’ below). The TLP team actively encourage use of and contribution to their library

RX Integration

Uses of RX

My first experimentation includes creating mostly non-RX games with few distinct RX elements (particularly mouse/key/gesture input scenarios). RX can be peppered into your project selectively. With more experience and awareness I expect the community to embrace more systemic usage of RX in Unity games. Ideas for RX In Gaming;

  • User Input (Mouse/Keyboard/Touch)
  • Constraints (keep player character onscreen)
  • Loading Assets
  • Loading From Backend Services
  • Multiplayer game state synchronization (e.g. ‘Did every player in this game room click start?’)
  • And much more… see Reactive Game Architectures

Choosing an RX Library

The RX library you choose must match your platform of choice. For me that is Unity & C#. Due to the “RX & Unity” issues above I can’t simply choose any C# library. The library chosen for this article was created by the fine developers at Tiny Lab Productions (TLP). I continue to search for a Unity-friendly library that has the scope and syntax exactly matching Netflix’s fantastic RxJava implementation.

NOTE: The TLP Library used in this article is a work in progress. It features only limited functionality and does not conform to common RX standards in the naming, signature, and structure of major elements. The TLP team invites other developers to fork the library and contribute to it. Still it is a fantastic learning tool and quite useful as-is.

Resources

While RX is new to the Unity Community, there are tons of non-Unity resources and tutorials available. Its important to note that until a robust Unity-compatible RX library is available all of the functionality may not be available. Here are some resources;

NEXT STEPS: RX Syntax & Marble Diagrams

The RX example above uses combinators to empower the event stream filtration and modification. Deeper explanation is available in my next article “Unity3D Reactive Extensions 2“.

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]

GDC 2014 – San Francisco

Category: Corona, Current & Past Events, Events, RMC News     |     Tags: C#, Games, Mobile, Unity3D

GDC_banner_v1Game Developers Conference 2014

After years of consulting success, I am shifting goals for the next phase of my career.

I am now actively seeking a full-time position as a Unity3D Game Developer. 

I have deep experience in game development; more than 13 years of professional work. I absolutely live and breath gaming. I love it. I have much to offer my next team — everything from game concept creation and development, through to launch — and I am very excited! Here you can learn about my skills and experience ( RivelloMultimediaConsulting.com/forecast/ ) and contact me ( RivelloMultimediaConsulting.com/contact/ ) to setup a time to talk — before, during, or after GDC.

1. GDC Goals

  • Geek Out! – As a lifetime video game fantastic, I am incredibly psyched to see some great sessions about my favorite games of 2013/2014.
  • Promote New Opportunities — I am seeking a Unit3D Game Developer position. There are so many bright teams creating with passion and innovation.
  • Connect to the community — While American, I have worked internationally for many years.
  • Plug-in to the presenter-scene — I’d like to get a feel for who is talking, how, and about what subjects. My focus is mobile. And the mobile space, while growing, it is still marginalized at GDC. As an experience public speaker (360|Flex, Adobe Max, Adobe Camp Brazil, FlashForward, FITC, LA Games Summit, Montreal Game Summit, RIA Adventure Cruise, Rich Media Institute, … ) I would like to speak at GDC 2015 and Unite 2015 next year. There are some session I will attend — more to experience the speaker himself/herself than to see the content.

2. GDC Social Schedule

I’m excited to meet new contacts and reconnect with old friends during GDC. Outside of the conference sessions, I’m excite to block out time for more fun.

Are you hiring? Want to to talk about great video games? Or just explore amazing San Francisco?

Update: The event has ended. Thanks to all the great people I met.

Suggested Meeting Places GDC is huge and it can be hectic to meet on site. Here are a few nearby locations within walking distance of the event’s Mosocone Center. Note that 20,000 people attend GDC and everyone needs to eat. Long delays! Also, some of these businesses have multiple locations, so the address is included.

3. GDC Maps

GDC_Moscone_MAP_v1

Figure 1. Moscone Street Map

Figure 2. Moscone South Hall Map

Figure 2. Moscone South Hall Map

Figure 3. Moscone North Hall Map

Figure 3. Moscone North Hall Map


4. GDC Session Schedule

This year’s conference is full of great sessions about AAA and mobile gaming goodness. Here are some topics of special interest.

Unity3D Unit Testing 2: Unity Test Tools

Category: Quick Tips, RMC News     |     Tags: Debugging, Testing, Unity3D

About RMC & Unity3D

Rivello Multimedia Consulting (RMC) provides consulting services for applications and games. RMC specializes in Unity3D development (see our work here). Please contact us today with any questions, comments, and project quotes.

As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

Intro To Unit Testing

To get the full background on what exactly are unit tests and more, checkout my “Unity3D Unit Testing 1” article first. It covers the basics as well as the historical challenges of testing within Unity. There I also cover the theory of TDD.

Unity Test Tools

In December, 2013 Unity Technologies released Unity Test Tools (UTT). While there had been several 3rd party options to attempting testing, now we have the official solution.

Figure 1. Unity Test Tools Released

Figure 1. Unity Test Tools Released

As Unity Technologies previously announced, they have been using testing internally on the core Unity3D codebase for a couple years. Lessons learned there helped to shape the free, newly released Asset Store Item Unity Test Tools.

The UTT package comes with 2 major areas of functionality. We cover them here.

1. Assertion Component

The assertion component is able to monitor the state of gameobjects while in playmode and pause the game if the condition is met. The primary use is debugging, where you can make the game stop in the exact frame the condition is met, thus enabling you to see the entire picture of when it occurs.

2. Integration Test

In order for you to test the integration between components, objects and assets, you need a higher level of tests and for this Unity has made the Integration Test Framework. Integration tests are also the easiest way of starting to write automation tests on a game in development, since they don’t have requirements on the architecture of the code.

This is obviously very powerful. Its early, but it is not yet clear to me how to utilize this in my project workflow. But I’ll figure it out soon. However, the following feature is perfect for me.

3. Unit Test

NUnit-Net-0

The lowest and most efficient level to do automation is at the unit level. Unity decided to use nUnit (nUnit.org) as the basis for the unit test framework, which is a well known framework for those already writing unit tests. In development, a ‘unit of work’ is a single logical functional use case in the system that can be invoked by some public interface (in most cases). A unit of work can span a single method, a whole class or multiple classes working together to achieve one single logical purpose that can be verified.

A unit test is an automated piece of code that invokes a unit of work in the system and then checks a single assumption about the behavior of that unit of work. Good unit testing is an art and a science and there is TONS of material online about it.

A good unit test is:

  •  Fully automated
  •  Consistently returns the same result
  •  Tests a single logical concept in the system

The Unity Test Tools

The free, newly released Asset Store Item Unity Test Tools, include the core testing libraries, examples of all 3 of the above types of tests, and documentation. If you find the documentation to be dry and obtuse (*hint*), then you are in luck. Checkout my video here. It cover only Unit Testing. The full source-code shown in the video is available for you too (See ‘Member Resources’ Below).

Vimeo responded to TubePress with an error: Not Found

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]

Find Your Next Unity3D Job

Category: Industry News, RMC News     |     Tags: C#, Games, Mobile, Unity3D

Finding Your Next Job

As game developers we have complete freedom to choose the tools and teams with which we work. Unity is of course a fantastic tool-set for game development and the industry is hungry for talent.

In fall 2013, I transitioned from consultant to full-time employee again to meet evolving career goals. At that time, I researched hundreds of full-time and freelance job postings for Unity game developers. To more deeply understand what are the most popular requirements for prospective employees, I’ve put together information on where to look for your next job, and what employees value in prospective employees. Take a look!

Where to look

Employers looking for Unity3D Developer talent post job listings on a variety of locations. Unity-related job listing sources;

Unity Job Position Titles There is quiet a variety of job titles which focus on Unity-focused game skills. Often the job list title does not include ‘Unity’ in the title, and you may get more results by omitting ‘Game’. However to focus the search results I include this list;

  • Unity (Game) Developer
  • Unity3D (Game) Developer
  • Unity (Game) Engineer
  • Unity3D (Game) Engineer

What Employers Want

Amount of Experience

Prospective employers like to see you have a few ‘shipped’ (launched) games in your portfolio.

  • 3-5 years for senior positions (0-2 for Junior)
  • 2-3 shipped game titles for senior positions (0-1 for Junior)

IMHO, this requirement is an vague predictor of value. Just like ‘years’ of experience. I have hired dozens of employees as well as subcontractors, and for me it is a far more effective indicator of future efficacy to discuss with the candidate his specific experience with ONLY the areas of the Software Development Life-Cycle (SDLC) which are germane to the role. This list includes; project planning, systems analysis, systems design, implementation (i.e. coding), integration and testing, installation/deployment, and maintenance.

Requirements For Senior Positions

The skills, responsibilities, and requirements of a position obviously depend on the company who lists the position, but here are some of the most common items. I’ve divided the skills among basic ‘employee‘ skills, positions with some manager responsibilities, and then between various programming disciplines. Each discipline is pretty separate — for example a job positions may require ‘game’ skills but not any ‘multi-player’ experience. All of these items are taken directly from real-world Unity-related job posts I have found. I included a short explanation for each item too.

Employee

  • Self-motivated: This is probably the #1 thing I see. Companies are trying more and more to be ‘flat-hierarchies’ where both power and responsibility are spread more evenly across all staff. You may see the management approach as ‘Kanban’, ‘Agile’, ‘team-based’, ‘cell-based’, ‘a studio of studios’ or something similar. Flat encourages each team-member to feel more ‘close’ to the project and ostensibly contribute more. I think it is a great philosophy. In my experience the ‘flatness’ is more ‘talk than walk’ — but that is ok. To fit in – be proactive, transparent, and communicative. If you ask AND answer your own questions, manage your own tasks, and speak before spoken-to about the challenges you are facing, you are on the right path.
  • Passionate: This is probably the #2 thing I see. I consider passion one of the most powerful things in life. Intrinsic appreciation brings intrinsic motivation. However, it is unfortunately rare that a company really cultivates passion in those who they don’t think have it.
  • Team-player: I feel item is most important for two reasons. One programming is a very personal, cerebral process. It is akin to putting ones thoughts into code. The same left-brained personality that is drawn to programming is NOT drawn to interpersonal communication and the vast challenges that exist there. Communication and empathy favor the right-brained. As the internet success bubble was building 10+ years ago, it was feasible to market your experience as a ‘rock-star’ programmer. This is someone who can come in and kick ass (as an individual). Rockstars contribute well to a management-less regime, and there were plenty of those. However, the HR & PM atmosphere has matured and we already see a more team-based approach. So because team-work is rare among programmers its important. Secondly, I am a strong believe that (especially in flatter hierarchies) we are all managers — meaning as super employees we all exist to leverage the skills of those around us in addition to our own direct contribution. As teams adopt more flexible, iterative development (see ‘Agile’) each team member is more of a thought-leader than just a ‘doer’. I feel strongly that it is the collaboration between those who are genuinely interested in excelling at collaborating which creates the virtuous cycle that turns good game projects into truly great ones. Can you amplify the effectiveness of your coworkers?
  • Excellent written, verbal communication: For the reasons just stated, programmers are not always good communicators. Besides the interview process (which is a historically horrible predictor of job performance), how can prospective employers evaluate the communication skills of an employee? That is indeed a challenge — and a great subject perhaps for another article. As a worker, it is recommended to educate yourself on communication as much as you do on technical skills. This requires an honest look inside at gaps in interpersonal skills. We all have them. At larger companies the HR department may have free resources on this; books, workshops, lectures. Your communication (emails and public speaking at meetings) should be honest, compassionate, and concise. At smaller companies it takes discipline and a champion – like yourself – to make the time for growth in communication skills.
  • Interested & capable to learn quickly: For any type of employee in any field, self-education is and will be increasingly valuable.  However, in technology this is paramount — especially as languages, platforms, devices, and consumer expectation are growing so rapidly.
  • Ability to work under high pressure deadlines: This is very common. Also is ‘we have a start-up like atmosphere’. I would call this ’emergency preparedness’ as emotional IQ skills. I think indeed that it is important. However it is trite (meaning-less from overuse) and it shouts ‘our management is disorganized’. Applying for a position listing this, it is recommended that you ask thoroughly about the expectation on utilization (expected hours per week) and access (emergency ‘work’-calls on nights and weekends) of employees.
  • Agile/Scrum project management experience: Instead of traditionally documenting 100% of a project and calendar upfront, teams are embracing a more realistic, ‘wait and see’ and ‘just-in-time’ organic process. Agile is not a match for all employees, and is certainly not a match for all (most) companies either. In the 7-8 years since this buzz-word as been mentioned to me in consulting projects, I have not met one team that FULLY embraces Agile.

I have found that my self-motivation and desire to learn voraciously to be some of my strongest attributes. I have found getting ‘out of my own head’ and bringing truer empathy to workplace dynamics to be an ongoing challenge. I have worked hard to add team-work and communication to my repertoire through intensive study and driving my experiences toward growth. At one large employer I was lucky enough to sponsor a 12-month team building program for me and my staff of 12 programmers. Not everyone loved it. It is hard to do ‘extra’ things at work when deadlines loom. However respecting the soft-skills (everything that is not technical) will come with the employee’s maturity.  

There is a very real chasm between programmers and designers. There is a chasm too between goals of making the game ‘fun’ and making the game ‘profitable’ (e.g. monetization and monetization metagames). Any employee who can bring efficiency and maintain morale between these groups will shine to upper-management. I’m very lucky to have a University art degree which gives me compassion for the challenges of artists working within increasingly technical workflows. On the fun-vs-profit I have learned hard lessons to defer-to and support whatever is the mission statement of the team/company. While I choose to be a programmer, my background brings a little more peace to my teams, I think.

Manager

Management responsibilities vary greatly between personnel management or project management. The trend of ‘flat hierarchy’ organization we see today often spreads these responsibilities to ‘normal’ staff and gets rid of dedicated management. So the normal staff (i.e. artist or programmer) who is ALSO handling management duties. While employees may embrace the theoretical meritocracy (anyone can be a leader), the loss overall from lack of academic management understanding (ostensibly lost because dedicated manager roles are lost) should not be underestimated. Also solitary team members, talented but socially awkward may not be compatible with such teams. Another potential loss. Position listings which require leadership of people or projects may include the following;

  • Conflict resolution: Foster a spirit of teamwork and unity among department members that allows for disagreement over ideas.
  • Plan Staffing Levels: Assess man-power vs work-load, assist HR in recruiting, interviewing, hiring.
  • Effective performance evaluation: Provide feedback through employee recognition, rewards, and disciplinary action.
  • Experience mentoring/coaching: A good manager leads, a great manager creates leaders.  Recognizing and allowing subordinates to flourish is critical. Guiding and cultivating requires maturing and generosity. This leader may champion other employees’ causes to upper management and HR too.
  • PM Software Expertise: Knowing the most common 20% of functionality in any one PM software (e.g. BaseCamp, Unfuddle, MS Project) is sufficient. However, I’ve seen managers that are so familiar with PM they can offer flexible per-team and per-project changes to the workflow. One size does not fit all in PM.
  • Agile/Scrum: Increasingly common. See ‘Agile’ above.

Programming – General

  • Write clean, documented code and also Employ object-oriented programming (OOP):  These are both legitimately vital and top the list of the most commonly required skills. If you are a best practice champion ( I absolutely am, but often waiver to the (lack of) seriousness of my clients), investigate your prospective employers techniques to establish (coding standards bible) and police (mandatory code reviews) such clean code. If the team does not make time for best practices, and most (especially in ad-agency based work) do not, then such practices will not be done.
  • Programming Language: The majority emphasize C#, some mention C# & JavaScript*. I have not seen any that mention Unity’s only other coding language — Boo. While rare, it is worth mentioning that positions specifically related to rendering disciplines may also ask for experience with Unity’s ShaderLab language. ShaderLab’s style it similar to CgFX and Direct3D Effects (.FX) languages and it is used to describes everything needed to display a Material.
  • Use version-control (GIT/SVN): Any mid-sized or larger team is using version control. I must assume. Smaller companies may not have the technical know-how to require it of you. In all cases use it! In my experience there are 3 levels of version-control experience; 1) you can update/commit fine but must call over a coworker for assistance on code-conflicts or other tasks, 2) You can handle all of that and you can ALWAYS fix your own mistakes, 3) You are the person who sets up build automation and answers other peoples git problems. Admittedly I my level is somewhere between #1 and #2. GIT is awesome, and scary.
  • Experience in AS3/Flash: This is VERY common in the listings and I believe this is for 3 primary reasons. First, the Flash has a very strong history in the casual game market starting around year 2000/2001. Second, the skills of a Flash game developer are directly relevant to a Unity game developer position. Lastly, due to strategic changes by Adobe, and the community’s reaction, many Flash game developers are looking for non-Flash jobs. Employers are smart to tap into the Flash game developer market. The ‘death’ of Flash was/is/and-will-be strongly exaggerated. As of 2014, really talented Flash developers still have their pick of top jobs in casual game development — including to a lesser degree in cross-platform mobile.
  • Experience in iOS/Android SDK: Unity teams deploying to these devices may need your native coding skills to create plugins for C# to speak directly to ‘hidden’ features in the device. Also, it is correctly assumed that if you know these platforms, you have experience creating for mobile (and handling some of the related challenges below).
  • Use test-driven development (TDD) practices:  While this one listed, I’m curious if the job really requires it and doubtful the team leaves time for it. Test-driven development is a strategy of creating unit tests ‘as you go’ for your work, rather than later or never. It is proven to yield less breakable, less bug-prone code, but it is FAR less practiced than listed. Kudos to prospective employers who dreaming big and list this in the job post, but it is trite. The best code I have written (with respect to stability) has been on TDD teams, however some of the most frustrating projects have been where such best practices are required but not allocated for (expertise, time, workflow, accountability).

*JavaScript and UnityScript are synonymous here

Programming – Game

  • Passion for games: EVERYONE lists this. Trite. Obviously important.
  • Mobile: Handle device-specific features (accelerometer, camera, etc…), mobile api’s (Ad integration, in-app purchases, etc…), and mobile development workflow (app-store submission, etc…)
  • Cross-platform: Handle multiple screen resolutions and cross-platform workflow
  • 3D: Knowledge of 3D-specific math (Vector, matrices, etc…) provides value to working on core game mechanics and camera (following, avoiding, line-of-sight) systems.
  • AI: Chain of command algorithms to patrol, seek, attack, the player, etc…
  • Rendering: Experience creating shaders allows you to shape the way the game is rendered, creating unique looks like we see in Limbo and Geometry Wars.
  • GUI: Handling input and layout of buttons, text, and overlays. On your team, this worker may be the artist with the most programming skills or the programmer with the most art skills.
  • Prototype creation: Some developers like working with established, proven API’s and common mechanics. Those who demonstrate incredible creativity and communication and also favor more experimentation, hacking, and are at-home with loose requirements/documentation can excel at the earliest stages of pro-typing new game and app concepts.

Programming – Cross-device

  • Mobile: Working on mobile presents many, many challenges. Small screen-size, multiple-screensize, touch input, device-specific features, and more…
  • Ability to optimize: While always important in software, and increasingly important for games, optimization is of paramount importance on the resource-starved mobile devices. Knowledge in optimizing rendering for fast and stable frame rate as well as optimizing for low file-size and low ram-consumption are most commonly requested.
  • Multi-screen: The business requirement to launch on computer, phone, and tablet requires games to be flexible and (asset) workflows to be well-organized. While primarily important to UX and UI experts on your team, these concerns will touch your life too.
  • Multi-platform: With middle-ware tools like Unity, game developers are both blessed and cursed by the write-once-deploy-everywhere paradigm.  Your game projects can do more for more potential game players, but this often requires (figuratively) forking your code to handle the various deployment paths. Team leaders with good solution/design patterns should set the tone, but each developer must be cognizant of the readability and flexibility of her code.

Programming – Tools / Systems

The workflow of every game project includes making some tools to assist the development process. Unity’s incredible editor scripting together with the Asset Store marketplace, make tool-development skills even more relevant and marketable. While on small teams these responsibilities may not be expansive, larger teams often dedicate one or more developers exclusively to the creation of tools.

  • Tool/API design for coworkers: Very very different than traditional end-user-focused development, designing and developing systems with your fellow coworkers in mind has its own batch of challenges. Analyzing upfront what the needs of your team will be requires both experience and technical know-how as well as excellent leadership and communication skills to discuss needs with your team. Unity is so very friendly at tool-creation even one-man-teams need tools. When your team size is 5 to 8 (very common today), a proactive developer can save precious resources with intelligent work-flows and tools. A few examples include level-editors for in-IDE level generation and well-designed API’s to send high-scores from the game to your companies back-end systems.
  • Extend Unity: Knowing the UnityEngine and UnityEditor API’s related to creating custom inspectors, custom windows, gizmos — all greatly expanding what you and your team can do with the Unity IDE is of critical importance. This is the ‘how’ which correlates to the last bullet item.
  • Knowledge of CMS: Your Tool/API may very well speak to a back-end for level-data, user-data, or more info. Knowing how to use a Content Management System (CMS) is a no-brainer requirement, but mastery on CREATING them and setting up easy to use workflows for technical and non-technical team members is really valuable.
  • Knowledge of back-end/database: You may need to program server code or collaborate with those who do. Knowledge with common languages (PHP, .NET, etc…) and tasks (database setup) are important.

Programming – Multi-player

  • 3rd Party Multi-player API Experience: Knowing the Xbox Live, PSN, Steamworks…
  • Good knowledge: of contemporary competitive and cooperative multi-player gaming paradigms
  • Latency/Lag-Hacking: Handling client-prediction algorithms to minimize loss of perceived world-sync for end users.

Programming – Unity Specific Stuff

In addition to the requirement of ‘must know ‘UnityEngine API’ we also see…

  • Must have Unity-Pro License: This requirement is listed in freelance jobs (I have no problem with that) and also (surprisingly) in full-time jobs. It reeks of an employer that does not provide you your computer workstation and the software on it — which is a very real red flag. In a way this is a indirect requirement that you are familiar with the few (honestly) critical pro-only features, but I find it to be a sloppy investigation.
  • Knowledge of Packages: The most common 3rd party libraries I see mentioned are NGUI (easily the most common), 2DToolkit, and surprisingly Playmaker. I think PlayMaker is great and has uses on nontechnical and expertly technical teams, but I’m very surprised its greatness has bubbled up already to job listings.

Unity3D Dev Diary: uEventDispatcher

Category: RMC News     |     Tags: Debugging, DevDiary, Testing, Unity3D

About RMC & Unity3D

Rivello Multimedia Consulting (RMC) provides consulting services for applications and games. RMC specializes in Unity3D development (see our work here). Please contact us today with any questions, comments, and project quotes.

uEventDispatcher

Problem

Unity3D is a great gaming IDE and runtime. Like any tool I use regularly, I have many constructive criticisms as well. For example, there is no adequate one-to-many messaging system. The UnityEngine includes BroadcastMessage & SendMessage but it is not adequate and has many public, deserved criticisms.

Solution

Streamline messaging between classes using uEventDispatcher.

Benefits include;

  1. Easily add/remove and dispatch custom communication
  2. Strongly-typed data payload
  3. Compiler properly warns you about major misuse cases (mistyping, etc…)
  4. Works within any class type and requires no special ‘Interface’ or ‘Inheritance’
  5. Does not rely on reflection (slow performance) like BroadcastMessage/SendMessage

Usage

Here is an example that shows the COMPLETE API of uEventDispatcher.


//--------------------------------------
//  Imports
//--------------------------------------
using UnityEngine;
using System.Collections;
using com.rmc.events;

//--------------------------------------
//  Class
//--------------------------------------
public class TestEventDispatcher : MonoBehaviour
{

	//--------------------------------------
	//  Properties
	//--------------------------------------
	// PRIVATE
	private EventDispatcher eventDispatcher;

	//--------------------------------------
	//  Methods
	//--------------------------------------

	// PUBLIC
	/// <summary>
	/// Start this instance.
	/// </summary>
	void Start ()
	{

		//CREATE
		eventDispatcher = new EventDispatcher (this);

		//ADD 0, 1, 2, OR MORE LISTENERS...
		eventDispatcher.addEventListener 			(TestEvent.TEST_EVENT_NAME, _onCustomEvent1); //default is EventDispatcherAddMode.DEFAULT
		eventDispatcher.addEventListener 			(TestEvent.TEST_EVENT_NAME, _onCustomEvent2, EventDispatcherAddMode.SINGLE_SHOT);

		//TEST REMOVE
		//eventDispatcher.removeAllEventListeners();
		//eventDispatcher.removeEventListener (TestEvent.TEST_EVENT_NAME, _onCustomEvent1);

		//TEST HAS
		//Debug.Log ("	hasEventListener(): " + 	eventDispatcher.hasEventListener 	(TestEvent.TEST_EVENT_NAME, _onCustomEvent1));

		//TEST EVENT SETUP FROM 3 DIFFERENT SCOPES
		eventDispatcher.dispatchEvent (new TestEvent (TestEvent.TEST_EVENT_NAME));

	}

	//--------------------------------------
	//  Events
	//--------------------------------------
	public void _onCustomEvent1 (IEvent iEvent)
	{
		Debug.Log ("	1. _onCustomEvent1(): " + iEvent);
	}

	public void _onCustomEvent2 (IEvent iEvent)
	{
		Debug.Log ("	2. _onCustomEvent2(): " + iEvent);
	}

}

Status

The project is now complete and live on the AssetStore. It is free. Check it out today!