Tag Archive for: Mobile

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.

Find Your Next Unity3D Job

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

Announcing…

At my company Rivello Multimedia Consulting (RMC) I provide great consulting services for applications and games. Well, after 7 years on the founding team of an amazing gaming startup, and then 7 years with RMC, I’m ready for my next challenge;

I am actively seeking a full-time Unity3D Game Developer position. Opportunities? RivelloMultimediaConsulting.com/forecast

During this thorough exploration I am continually encouraged by the health of the gaming industry. Its a developer’s market. No doubt — and Unity3D’s momentum is clear and well-defined. Here are tips that will help you find your next Unity3D job or project.

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. Over the last months, I have researched literally thousands 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 & C# Design Patterns

Category: Quick Tips     |     Tags: C#, Design Patterns, Games, Mobile, 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.

Design Patterns Defined

As BlackWasp explains, Design patterns provide solutions to common software design problems. In the case of object-oriented programming, design patterns are generally aimed at solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture. They give generalised solutions in the form of templates that may be applied to real-world problems. Design patterns are a powerful tool for software developers. However, they should not be seen as prescriptive specifications for software. It is more important to understand the concepts that design patterns describe, rather than memorizing their exact classes, methods and properties. It is also important to apply patterns appropriately. Using the incorrect pattern for a situation or applying a design pattern to a trivial solution can over-complicate your code and lead to maintainability issues. A group of developers, the Gang of Four, publicized these 23 design patterns.

Creational Patterns
1. Abstract Factory Creates an instance of several families of classes
2. Builder Separates object construction from its representation
3. Factory Method Creates an instance of several derived classes
4. Prototype A fully initialized instance to be copied or cloned
5. Singleton A class of which only a single instance can exist
Structural Patterns
6. Adapter Match interfaces of different classes
7. Bridge Separates an object’s interface from its implementation
8. Composite A tree structure of simple and composite objects
9 .Decorator Add responsibilities to objects dynamically
10. Facade A single class that represents an entire subsystem
11. Flyweight A fine-grained instance used for efficient sharing
12. Proxy An object representing another object
Behavioral Patterns
13. Chain of Resp. A way of passing a request between a chain of objects
14. Command Encapsulate a command request as an object
15. Interpreter A way to include language elements in a program
16. Iterator Sequentially access the elements of a collection
17. Mediator Defines simplified communication between classes
18. Memento Capture and restore an object’s internal state
19. Observer A way of notifying change to a number of classes
20. State Alter an object’s behavior when its state changes
21. Strategy Encapsulates an algorithm inside a class
22. Template Method Defer the exact steps of an algorithm to a subclass
23. Visitor Defines a new operation to a class without change

Design Patterns for Unity 3D / C#

C# is a robust language, and all popular design patterns are possible. However, which design patterns are most appropriate to Unity3D and game development?

1. Which patterns above are ‘built-in’ to the Unity3D experience?

I’m curious of your help here. Please add a comment below.

2. Which patterns above would you like to see in my training series?

My Unity3D & C# HD Video tutorial series will feature sections about architecture and design patterns. What would you like to see covered?

Unity3D Version 4.2 Released!

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

Learn Unity 3D & C# – From Basics to Advanced

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development. Read my full articles of “Introduction to Unity3D” and “Tutorial Series: Unity3D & C#“.

There is incredible momentum in the Unity3D product and its community. Here is a look at key features of the latest release.

Top Unity3D 4.2 Features

My top 3 ‘Free Unity’ version features per category are here;

New platforms

  • Windows Phone 8 (Yes!)
  • Windows Store (Yes!)
  • BlackBerry 10 (Yes!)

‘Free Unity’ Features (Formerly Pro Unity Features)

  • Realtime shadows (one-directional light only; hard shadows only). (Yes!)
  • Text-based serialization of materials, prefabs, scenes etc. for easier version control. (Yes!)
  • NavMesh baking (OffMeshLinks still require Pro).

Graphics

  • OpenGL for Android
  • Shuriken Collision Event Callback Scripting
  • (None)

Editor

  • Preset Libraries: Create new libraries and save. (Yes!)
  • Platform switching, player building and asset importing can now be cancelled.
  • (None)

See Unity’s official 4.2 announcement here.

Want More Video Tutorials?

We are currently creating tons of new training content for Unity3D.

Unity Game Development

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

unity_intro_banner_v1

Unity Game Development

Since 2006, as Principle of Rivello Multimedia Consulting  (RMC), I have offered four key services; software architecture, consulting, complete development of games and applications, and training. Fortunately we at RMC have thrived and are highly effective — profitable since year one. I have worked in exciting cities on 5 continents which has given me gifts of cultural knowledge & skills with spoken languages. Consulting offers many unique opportunities and challenges which I enjoy, however there are benefits to being part of a team which I miss too.  To satisfy my career forecast I will be changing gears and announce that;

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

I have deep experience in game development; more than 15 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! Please contact me directly with your opportunity. I’d love to chat.

This page serves as the main table of contents for all Unity-specific posts, demos, and code samples. Enjoy.


LATEST UNITY FEATURES

  • New Unity UI (4.6.x): Unity UI Part 1 of 3: Overview
  • New Unity UI (4.6.x): Unity UI Part 2 of 3: Demo – Basic UI (Source code + Video) [Coming Soon!]
  • New Unity UI (4.6.x): Unity UI Part 3 of 3: Demo – Combining UI w/ Frameworks/Architectures for scalability (Source code + Video) [Coming Soon!]

 ASSET STORE PACKAGES

 BmAb5uQIgAEuUyM

 COMPLETE GAMES

paddle_soccer_poster_v1 spider_strike_poster_v1
paddle_soccer_poster_v1

TRAINING

vimeo_screenflow_video_thumbnail_UWK_poster_v1


ARTICLES

BEST ARTICLE: Unity3D for Game Development

Asset Store

paddle_soccer_poster_v1

Architectures

Best Practices

universal_post_tools_of_trade_450_230_v1

Reactive Extensions (RX)

More Training

Career Advice

Industry News

Misc

External Links (Mentioned In My HD Training Videos)

  • Unity IDE Keyboard Shortcuts (Link)

We are confident that Unity presents compelling benefits for mobile game development; especially games for multiple-devices (write once and publish everywhere). Contact Us today with any questions, comments, and project quotes.

Intro To Unity3D and AR (Augmented Reality)

Category: Industry News, Quick Tips     |     Tags: Augmented Reality, C#, Games, Mobile, Unity3D

Learn Unity 3D & C# – From Basics to Advanced

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development. 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. There is incredible momentum in the Unity3D product and its community. Here is more information on using Unity3D with Augmented Reality.

Augmented Reality

Augmented reality (AR) is a field of computer science that involves combining the physical world and an interactive, three-dimensional virtual world. I originally wrote a complete demo, source code, and article for my client Adobe – “Augmented Reality With Flash“. Now I’ve updated the information regarding Unity3D. In a future article I may make the full Unity demo source code available. While mainstream audiences are now becoming aware of AR, it is not new. Its background is intertwined with decades of computer science development. Virtual reality (VR), AR’s more familiar counterpart, is the replacement of the user’s physical reality (particularly that which is experienced through sight and hearing) with a computer-generated reality. The idea of a virtual experience is exciting — creating entertaining and educational sensory encounters that do not exist in our everyday lives.

From a consumer standpoint, it seems that AR advances have come out of nowhere to surpass VR advances. The acceleration in AR technology is due to two major factors: First, users are still experiencing reality, so believability is easier to achieve. Adding simple graphics (such as text or simple shapes) and color effects (such as night vision or thermal vision) to reality creates a better user experience. The user is still seeing a mostly familiar world. Second, this more subtle use of computer graphics is less expensive with today’s technology, making it more feasible than VR. Let’s take a look at augmented reality, its current uses, and its future potential.

Practical Uses of AR

The video game industry has released major augmented reality products for more than a decade. The Eye Toy for Sony PlayStation 2 and 3 takes input from an inexpensive video camera and composites the live video feed with CG onto the TV screen. This toy detects the user’s body position in front of the camera as an alternative input method to the typical joystick or gamepad, deepening the user’s immersion into the game world. Detection schemes continue to advance, allowing for more engaging interaction.

There are AR applications outside of console games, including military and consumer products, too. Night-vision goggles and targeting-assistance technology help marksmen in battle, and children’s stories come to life with AR-enhanced books. The uses are vast. With AR-enhanced books, each page of a real-world book is outfitted with a marker — a pattern that is detectable by AR. As the child turns each page, a computer is able to place a virtual 3D animation on top of a physical image printed on paper. While the marker is often an image as in this example, it could also be the user’s face.

Basics of AR

  • Marker Detection – The marker is located by the application. Typically the device webcam is used. The webcam inspects the physical reality near the user to find a predetermined marker (image or the users face).
  • Transform Mapping – The transform (position, rotation, scale) of the marker are interpreted. Move the marker and the transform updates.
  • Rendering – Now the 3D model is updated to rendered to the screen.

Essential Libraries

Because of the growing popularity of AR, many platforms have 3rd party packages (free and premium) to facilitate development. Unity too. While you could create you own system from scratch, it is highly recommended to find the best 3rd party library and use it. Your end product will be higher quality and you will save greatly on time to market. You can choose any one from this list; Unity3D Packages for AR

*Seem to be popular

Vuforia is the best and free to use. I tried with Metaio, it’s easy to use than Vuforia, but the tracking quality don´t convince me. Vuforia handles the pattern occlusion is robust, and it’s framerates are high, much higher than Metaio and NyARToolkit. – 3rd Party Blog Comment

There are pros and cons to each. In a future article, I may evaluate each of these options. Some of the key differences are cost, ease of use, completeness of documentation, breadth of features, and accuracy (speed) of tracking the marker from the camera and transforming the model. Each package surely has its own workflow and API, however the major concepts are the same. So once we choose a package, we follow this the basic setup.

Developing Augmented Reality

Marker Setup

Figure 1. Marker Image

Figure 1. Marker Image

The marker image is a graphic drawn, printed, and shown to the end application as it runs. Your AR package, with help from the marker data file and parameters file, will detect this shape via webcam. To design a graphic, fit the desired shape within a white square that is centered within a larger black square. Keep your shape simple for best results. Note the sun shape in the graphic. This helps the application detect which way is up for the marker and assists its angle and rotation detection. Your design doesn’t need to have this shape per se, but it should be asymmetrical in some way for best results. Webcam Setup Unity features webcam support. As the application runs and a camera is detected, Unity will show the video onscreen. This functionality may or may not be included in the AR package you choose. AR Package Setup

Figure 2. Marker Detection

Figure 2. Marker Detection

A cornerstone of this project is marker detection. As the marker graphic is detected via webcam, its position, rotation, and scale in the user’s physical space are calculated. This calculation will be used in the next steps. The AR package will search each still-frame of webcam footage for the predefined marker graphic (Pattern object). The detection scheme uses just the latest still-frame of video at any given time. Model Setup

Figure 2. 3D Model Setup

Figure 3. 3D Model Setup

The 3D model is loaded and inserted into the 3D scene, and the view into that scene. Luckily 3D is a strength in Unity and much of this work is all done for you. In the final project, this view is layered on top of the 2D webcam Video object shown earlier so the composite (See Figure 4.) of 2D and 3D will look believable. Repeated Loop: Detect-And-Update

Figure 4. Complete Process

Figure 4. Complete Process

Generally speaking your loopToDetectMarkerAndUpdate3D function will be called 60 times per second. Each frame the latest frame of the webcam footage is grabbed. The AR package runs detection on the frame. If the marker is detected the AR package will update the position, rotation, and scale data. This modifies the 3D model so it appears to be at the same position in the user’s physical space as the marker. The resulting effect is nothing short of amazing for first-time viewers.

Great Slideshow on Unity3D & AR



Want More Video Tutorials?

We are currently creating tons of new training content for Unity3D.

Unity3D Top 5 News Announcements

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

Learn Unity 3D & C# – From Basics to Advanced

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development.

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.

There is incredible momentum in the Unity3D product and its community. Here is a look at key announcements.

Top Unity3D Announcements

  • 1. November 2007 – The Unity3D.com Blog section launches (link)
  • 2. January 2009 -Unity targets iOS/Android – Develop for iOS ($400 upgrade) and Android ($400 upgrade) (link) and in 2013 many app award winners prove to be created in Unity (link)
  • 3. October 2009 – Pricing Update – Unity offers a free ‘Indie’ License to target desktop games (link)
  • 4. 2012 – Unity adds support for Adobe’s Flash Player – Develop for the browser with the popular Flash plugin  (link) and support for  Nintendo WiiU & Xbox360  – Develop for consoles (link) and adds support for Sony Platforms – Develop for Sony’s PS3 (and now PS4, PS-Vita, and PlaystationMobile too) (link)
  • 5. November 2012 – Unity 4.0 Launches – With many new features and a slick UI update (link)

Top Unity3D Announcements of 2013

  • 6. 2013 - Unity targets Ouya – Develop for the new Android based Ouya console (link)
  • 7. April 2013 - Unity removes support for Adobe’s Flash Player – Unity will no longer support to target to Flash Player (link)
  • 8. May. 2013 – Pricing Update - Unity offers a free ‘Indie’ License to target iOS & Android games (link)
  • 9. May. 2013 – Pricing Update - Unity offers a free ‘Pro’ License for 75$ per month (link)
  • 10. Jul. 2013 – IDE Popularity – Unity’s IDE reaches 2 million users (link)
  • 11. Jul. 2013 – IDE Version Update – Unity IDE 4.2 Released (RMC Link)
  • 12. Aug. 2013 – Unity Blog Announces – Unity IDE 4.3 Will Feature Native 2D (link)
  • 13. Aug. 2013 – Unite 2013 Conference Keynote – All The Highlights Are Here (link)

What Is Next?

  • Site Features – I’m incredibly impressed with Unity3d.com’s training section. The scope of coverage is large and the price (free), quality, and consistency of the material is unparalleled from any game development platform I’ve seen. Obviously more content will be rolled out over time.
  • Product Features – Unity is currently at a very stable and capable version 4.x. What new features could be announced next?
  • Targets – Unity is agressive in its strategy to offer developers the most compelling platforms on which to publish content. While XBox One will likely be announced, others targets may surprise us.
  • Pricing – Unity has shifted wildly (and favorably) in its pricing structure. While the current options seem pretty complete, history shows us that more changes are very likely.

Want More Video Tutorials?

We are currently creating tons of new training content for Unity3D.

Tutorial Series: Unity3D / C#

Category: Screencast Tutorials     |     Tags: C#, Games, Mobile, Unity3D

Learn Unity 3D & C# – From Basics to Advanced

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development. Read the full “Introduction to Unity3D” article and watch the videos below.

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.

Got Comments?

Please add a comment below on this post and include the video number. (e.g. “2.1 – I have a question about…”)

Table Of Contents

The videos and source-code are available below this table of contents for all topics marked with [Complete!].  Check back regularly for more videos.

1. Intro

  • 1.1 Series Overview: Welcome  [Complete!]
  • 1.2 IDE – Unity Editor: Learn the basics of project creation, setup, editing, and publishing.   [Complete!]
  • 1.3 IDE – MonoDevelop Part 1: Explore this editor; create classes, code, debug, & compile.  [Complete!]
  • 1.4 Demo Source Code: Where to download the source code & a quick overview of the demo project.  [Complete!]
  • 1.5 IDE – MonoDevelop Part 2: Learn advanced IDE techniques and “What’s New In MonoDevelop 4.0″.

2. C# With Cocktails – Basic Programing

  • 2.1 Programming – C# Primitives -  (e.g. int, float, string)  [Complete!]
  • 2.2 Programming - C# OOP – Object Oriented Programming  [Complete!]
  • 2.3 Programming – C# UnityEngine API Part 1 - Component-based thinking & communicating with GameObject & MonoBehavior. Bonus: Create a cube, texture it, and play a sound via Inspector window.  [Complete!]
  • 2.4 Programming – C# UnityEngine Physics - – Colliders, Rigid Bodies, OnCollisionEnter  [Complete!]
  • 2.5 Programming – C# UnityEngine 2D Part 1 Using Unity3D for 2D, Camera Setup, Draw calls  [Complete!]
  • 2.6 Programming – C# UnityEngine API Part 2 – GUIText via C#, Sound via C#, Mouse/Key Input Via C#, Prefabs, 2nd Camera  [Complete!]
  • 2.7 Programming – C# UnityEngine 2D Part 2 Learn advanced 2D techniques and “Intro To New Native 2D In Unity 4.3″.
  • 2.8 Debugging – Debugging Basics Part 1 Overview of Finding and Fixing Errors in C#
  • 2.9 Debugging – Unity Test Tools Part 1 Learn Unit Testing Via nUnit  [Complete!]
  • 3.0 Debugging – Unity Test Tools Part 2 Advanced Topics

3. C# With Cocktails – Advanced Programming

  • 3.1 Programming - C# Advanced Part 1 - Classes, Struct, Partial Classes, Singleton, Interface, Casting, Ref/Out, Conditionals, Loops, Collections  [Complete!]
  • 3.2 Programming - C# Advanced Part 2 – Generics, Delegates/Actions/Predicates/Lamda, Threads, Extension Methods, Operator Overloading, Attributes, Preprocessor Directives  [Complete!]
  • 3.3 Programming – C# UnityEngine API Part 3 (e.g. Custom Inspector, Custom Editor, Custom EditorWindow)
  • 3.4 Architectures – C# Architectures Part 1 – MVC
  • 3.5 Architectures – C# Architectures Part 2 – The StrangeIoC Framework 1  [Complete!]
  • 3.6 Architectures – C# Architectures Part 3 – The StrangeIoC 2 : PropertyChangeSignal  [Complete!]
  • 3.7 Architectures – C# Architectures Part 4 – Creating an ‘EventDispatcher’ Framework
  • 3.8 Graphics –  Shaders – Creating custom shaders using ShaderLab

4. Asset Store Packages

  • 4.1 Buy vs Build Theory – When is it best to buy a 3rd party plugin?
  • 4.2 Package: iTween (Free) – Easily animate with code
  • 4.3 Package: NGUI (Premium) – Create 2D & 3D UI interface elements and UI components
  • 4.4 Package: PlayMaker (Premium) – Visual Scripting (Especially for Finite State Machines)

5. Complete Projects

  • 5.1 Build Simple Game #1 – TBD 3D Action
  • 5.2 Build Simple Game #1 With a Custom Game Manager – TBD 3D Action

Free Video Resources

Enjoy a few videos of free content! Sign-up to view the full video series in ‘Member Resources’ below and to access the complete source-code. Membership is free!

Member Video Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?

Want More Video Tutorials?

Intro to Loom Game Engine

Category: Full Tutorials, Loom     |     Tags: Games, Mobile

Seasoned game & game-engine developer Ben Garney has a new game development engine called Loom.

Ben demonstrates competency in a long series of projects. He worked on the Torque Game Engine with GarageGames at www.garagegames.com (Site No Longer Live), the PushButton Game Engine for Flash with PushButton Labs at www.pushbuttonlabs.com (Site No Longer Live). Support from PushButton (including its website, updates to its source code and forums) abruptly ended in 2012. PBE’s spiritual successor launched in 2012 as Smash Game Framework at www.smash.io (Project apparently dead after no updates since more than ‘a year ago’).

Now he and his team have Loom, The Loom Game Engine at www.theengine.co. The word ‘loom’ is used for a device used for weaving textile projects and Loom is also a popular 80′s computer game, both spiritually aligned with game development. However, I wish it had a more unique name to facilitate online searches.

Pros of Loom (Paraphrased from theengine.co);

  • Pragmatic Development - Loom features a lean and fast workflow without strict development rules or required frameworks.
  • Freedom Of Choice - Access and edit C++ core source code, access and edit LoomScript core source code, or simply add your own custom LoomScript. LoomScript sits atop C++ and can access any C++ library.
  • LoomScript - LoomScript is an easy to use, new language modeled after AS3 with features inspired by C#. LoomScript is based on Lua which is concise, robust, proven, and supported by tools, debuggers, and community.
  • Useful Libraries - CSS Styling, UI Markup, Tweening, Dependency injection, JSON/XML and more…
  • Loom Architecture - Three parts; Call LoomCLI from your command line to create ‘new’ projects and ‘run’. The LoomSDK is precompiled LoomScript with powerful libraries. The NativeSDK is the raw C++.
  • Built For Teams - Three tiers; Artists can create & integrate assets into the latest build without bothering others. Scripters use LoomScript for the bulk of development. Need extra power? Extra features? Coders can access the C++ layer.
Pros of using one code-base for multiple platforms

When and where it is manageable, I am a huge fan of using  and reusing the same project for multiple platforms. Loom 1.x currently exports to TV (Ouya), Desktop (Mac & Windows), and Mobile (iOS & Android). Future support for other platforms is in discussion on the loom forums.

  • Save Time – Develop, iterate, QA simultaneously cross-platform
  • Focus Marketing dollars – Instead of marketing the game on two platforms separately, we can do it at the same time
  • Momentum – Word of mouth dictates that downloads on one platform will possibly translate into downloads on the other
  • Maintenance - We’d rather be working on the next game, than debugging separate platforms

What is Loom?

With cheap, powerful tools and massive exposure to new game players, there has never been a better time for indie game developers. – Me

There are many available tools for indie game development. Loom is a powerful 2D game engine with live reloading of code and assets, a friendly scripting language, and an efficient command-line workflow.

Loom’s competitors include 2D-capable gpu-accelerated cross-platform mobile game development platforms such as Adobe AIR, Corona & Unity3D as well as the newcomer Stencyl. The approach each platform takes is diverse. Where-as Stencyl is the a complete IDE for project setup, art & development which requires no coding, Loom is a raw platform without even a GUI.

Checkout the screenshots of Loom’s Workflow;

  1. Create a new project via command line.
  2. Create your raster assets using your favorite creative programs.
  3. Create your LoomScript code using any text editor. While a Loom IDE is a top feature request which is in active discussion, SublimeText is the current free, recommendation.
  4. Compile (run) the project via command line.
1. Project
2. Assets
3. LoomScript
4. Compile

Development Philosophy

We believe that fast iteration times across multiple devices simultaneously lead to better, faster, cheaper game development. – Loom Documentation

Loom‘s design goal is to keep you on the fast development path as much as possible, while still preserving access to slower, more difficult, but still essential development paths. This gives a substantial benefit to development teams without blocking them.

The Loom GameFramework

Loom offers a powerful (optional) Loom GameFramework (LGF). A game framework is a system to organize your code specific for game projects.

LGF is made of three general types of classes. There may be many of each type in each game project:

  • Manager – Managers are the brains of the operation — each one has a unique task; for instance one focuses on the spatial area of the screen and the objects within it and one on graphics rendering of visible objects. Depending on its role in the game, a manager may or may not relate to entities and components directly.
  • Entity – Each visual element in your game is represented by an entity. This could be anything; your player, the enemies, collectible items, etc…. Entities can be non-visual too.
  • Component — Each entity contains components. This is where the bulk of your game code lies. Each components handle a specific responsibility. For instance perhaps one component handles rendering the entity in which it resides.

Developers can extend existing managers and create new managers too. LGF ships with managers for our most common needs. Here is a partial list of the managers packaged with the core Loom.GameFramework package:

  • TimeManager – Manages all time related functionality in the engine. It provides mechanisms for performing actions every frame, every tick, or at a specific time in the future. A tick happens at a set interval defined by the TICKS_PER_SECOND constant. Using ticks for various tasks that need to happen repeatedly instead of performing those tasks every frame results in much more consistent output. However, for animation related tasks, frame events should be used so the display remains smooth. You can pause/play your game easily here too.
  • ConsoleCommandManager – Process and dispatch commands issued via the asset agent.
  • PropertyManager – Properties are like public variables; set/get manually or bind automatically.

Entities are essentially empty shells. As a developer you fill them with the core components &custom components needed. Each component has access to any Loom API desired and responds to custom events as well as the following built-in Loom events:

  • onFrame – Best used for graphics rendering-routines; this occurs once per frame-rate (e.g. 60 times per second for 60 FPS). Included for AnimatedComponent
  • onTick – Ticks are guaranteed to happen at a fixed interval. If the frame-rate slows down due to some number-crunching or heavy rendering, Loom will attempt to ‘catch up’ by calling more ticks. It balances the run-time experience well. Included for TickedComponent.
  • onThink – Based on an arbitrary, per-use timer. This is ideal for AI code which can be processed slowly (e.g. every 1–5 seconds). Included for QueuedComponent.

Getting Started

If you have setup a programming environment before (Flash, Java, HTML5), then you should find Loom easy to setup and use.

Here are the links and tips;

  1. Download Loom (CLI & SDK Together) – Visit the Loom downloads page.
  2. Download examples - See the list of examples or download and view the source-code from the Loom downloads page.
  3. Learn to run code with the examples and create new projects – Visit Loom getting started page and the Loom documentation page. Curiously, the class-by-class documentation is not available online, but is indeed downloadable.

Creating My ‘FlyerGame’

To learn Loom, I followed my own ‘Getting Started’ steps above and then created my own complete game. I used assets and game logic from “FlyerGame”, a game that I have recoded many, many times using game frameworks. The HD Video Screencast and source assets are available (See ‘Member Resources’ below).

Optimizations

I have limited experience with Loom, but from reading the Loom forums and reviewing the Loom example code I understand that optimizing a project – especially rendering with a constant frame-rate on a variety of devices takes time.

Conclusion

I like what Loom does well; LoomScript is light and powerful, the workflow is VERY fast. I haven’t tapped into the full strengths of device-specific CSS (e.g. to size a button uniquely on iPad vs iPhone) yet, but it looks really compelling.

Library of Libraries

Loom is based in great part to Cocos2d, a free community-based library for 2D gaming. Some people love and some people hate Cocos2D. A consciousness I see throughout the Loom forums is for ‘Loom’ itself to provide minimal functionality and instead depend on 3rd party libraries to provide developers with needed functionality. Some libraries will be folded into the Loom API and for others developers can mix and match libraries as they like. This ‘borrow vs build’ approach is not new. It is what provides huge functionality within the Javascript gaming world too. However, as a developer having a big bag of separate APIs (separate syntax, separate terminology, inconsistent value ranges…0 to 1 vs 0 to 100 vs 0 to 256) is not intuitive and severely hurts the learning curve. Furthermore such separation makes it hard in my opinion for Loom to compete in an all-too-crowded world of cross platform mobile game development tools.

Maturity

The product is both at “1.0″ and costs money which to me means The Engine Co is positioning it as a finished product. However a look at the feature requests from the community and bug reports/omission from the forums, which include countless bare essentials (e.g. complete code documentation & incomplete method override support) is a sign it is not yet ready to stand against full realized competitive cross-platform mobile engine.

The engine also misses many device-specific features and most every OS-specific integration features (e.g. in-app purchase, social network integration, ad monetizations) which the forum promises are coming soon.

When the docs & wiki are complete and describe features which are implemented bug free the product can be recommended with more confidence. The team is working fast and communicates so frequently, that we may see that level of completeness very soon. A dedicated IDE (currently the #1 feature request) with auto-complete and more will help seal the deal.

The license pricing;

  • 1. Starter- Target desktop 0nly – Free!
  • 2. Indie – Target mobile too
  • 3. Pro – Includes support
  • 4. Enterprise – Includes more support

Developer Q&A

NOTE: Bonus Section!!!

Loom is very new and is changing rapidly. I reached out to Loom developers to get a reactions based on Loom CLI v#1.0.506 and Loom SDK v#sprint27.

PROs

  • Live Reloading – Greatly accelerates development
  • LoomScript – Easy to learn (especially from AS3) and powerful
  • Support – Loom dev team is open, responsive, and productive

I find the component-based architecture suggested in the Loom API to be powerful and a distinguishing feature among competitors.

CONs

  • Young platform – Has many bugs, missing basic implementations (“lots of loose ends”), and lacks must-have features of competitors
  • Lack of documentation, tutorials, & examples.
  • Rendering – The “CSS layout is pixel [dependent and] has little practical use”, and overall the “performance is not amazing”.
  • No full-featured IDE – Although a 3 code editors already provide partial support.

The lack of IDE is an obstacle for me. And the creator’s conscious choice to use existing 3rd party APIs to solve basic implementation needs is wise (provides functionality) but weakens the platform tremendously as it becomes a ‘bag of APIs’ which hurts the learning curve.

Gotchas & Advice

  • Read the docs
  • Download, read, and run the examples
  • Just “Dive into it!” and remake a basic game from scratch

“Is Loom ready for professional development?”

  • No, It is the “early days for the platform so there’s not so much”.
  • No, “standard mobile features like reading/writing to camera roll are not exposed yet (as far as I know)”.
  • Yes, I think its ready for professional deployment, If you can get over the bugs and [missing] features”.
  • No, we’d have to “spend a lot of time working on supplementing the engine, and less on making our games”.
  • And as one developer said – I am “not sure. I’d have to make a game with it!”

For me, Loom is absolutely ready for production in a vacuum. However there are many compelling alternatives to use which are more robust.

Next Steps

After ‘Getting Started’ and following my HD Video Tutorials, here are more resources to fuel your Loom savvy.

  • VIDEO: Welcome To Loom – Watch the HD Screencast Video Tutorial*
  • VIDEO: FlyerGame With Loom – Watch the HD Screencast Video Tutorial*
  • SOURCE CODE: FlyerGame With Loom – Download, view, and run the code.
  • Find common answers on the Loom forums page
  • Post your comments on Loom below on this blog page.

*See ‘Member Resources’ below.

NOTE: Source code is available, but videos are NOT yet available.

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?

Unity3D for Game Development

Category: Full Tutorials     |     Tags: Games, Mobile, Unity3D

Unity3D (or simply ‘Unity’) is a fully integrated development engine that provides rich out-of-the-box functionality to create games and other interactive 3D content. You use Unity to assemble your art and assets into scenes and environments; add physics; simultaneously play test and edit your game, and when ready, publish to your chosen platforms, such as desktop computers, the Web, iOS, Android, Wii, PS3 and Xbox 360.

Unity’s complete toolset, intuitive workspace and rapid, productive workflows help users to drastically reduce the time, effort and cost of making games.

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

Unity’s Top News Announcements

Updated!

There is incredible momentum in the Unity3D product and its community. Here is a look at Top Unity News Announcements.

Features

Pros of Unity3D (Paraphrased from Unity3D.com); 

  • Multi-platform Development – Desktop (Mac OSX , Windows)
  • Multi-platform Deployment – Web Browsers (using the Unity WebPlayer), Desktop (Mac OSX w/ OpenGL, Windows w/ Direct3D), Mobile (iPhone, iPad, Android phones and tablets), and console (Wii, PS3 and Xbox 360). The Unity Editor emulates all your selected platforms too. The Unity3D Engine is gorgeous and performant. Unity even offers Union a way to license out your games to find an audience.
  • Powerful Coding – Unity makes it simple to keep your code working across many devices. Unity abstracts away the majority of platform differences. When precise control is needed, simply use #ifdef to specialize code per platform. Unity supports 3 languages that can be combined within the same project; C# (seems to be the most ‘professional’ option), JavaScript, and Boo programming languages.
  • Powerful Editor – Manage assets & code, drag and drop to build your scene (2D or 3D), the editor’s stage *IS* the Unity runtime (so you get high fidelity previews as you work), instant build times, see public script properties in the ID for easy viewing/editing.
  • Flexible Asset Workflow – Within the editor you don’t create assets per se, you import them (see docs & see supported formats) from other programs (all popular formats such as Photoshop and Maya) and manage them within your scenes.
Pros of using one code-base for multiple platforms

When and where it is manageable, I am a huge fan of using  and reusing the same project (including all source and code) for multiple deployment platforms. Unity supports this very well.

  • Marketing dollars – Instead of marketing the game on two platforms separately, we can do it at the same time
  • Momentum – Word of mouth dictates that downloads on one platform will possibly translate into downloads on the other
  • Maintenance - We’d rather be working on the next game, than debugging two separate platforms

What is Unity?

Unity is the combination of a project editor, a code editor, and the run-time player. The project editor allows for creation of new projects, manipulation of 3D objects within the 3D world*. Its the glue that brings together your assets, your code and its where you performs the project builds.

*Note: Another tool such as the premium Maya or the free Blender3D studio max is required to do any complex modeling and animation.

The Unity Player (used only for playback in desktop web browsers) is gaining popularity. So is the popularity of developers using the Unity Editor. See these images;

unityStats_v1

Figure 1. Unity3D Stats

 

It takes some time to appreciate the workflow of Unity. A developer will likely have several applications open at once while working.

Checkout the screenshots;

  1. Unity Editor: Create your project, edit the properties of your game objects, and build your game.
  2. Create your assets using external tools (Photoshop shown); 2D, 3D, sound, etc… and import them into the Unity Editor.
  3. Code Editor: Unity is compatible with any text editor and comes packaged with the very capable MonoDevelop code editing tools. MonoDevelop has formatting, syntax highlighting, intellisense, and autocomplete.
  4. Asset Store – Within the IDE itself you can shop online to find assets of any type (2D, 3D, sounds, etc…) as well as ‘packages’ which are groups of reusable code which enable new C# functionality as well as add completely new UI* and tools within the Unity Editor authoring environment too. The organization of the assets is great. I get the feeling (so far) that the best way to find packages is through the store (vs Googling, downloading, & importing – which is also possible). However the store is dreadfully slow and buggy, I assume because it is just a clunky webpage loaded through the Unity IDE.

Note: The extensibility within the Unity Editor itself is inspiring. No other game development environment has 3rd party free and premium tools which actually change how the IDE itself functions.

Figure 2. Overview of the User Interface (UI)
assets
Figure 3. Setup Game Sprites
Figure 4. Code Editor
Figure 5. Free & Premium Asset Store

Unity Design Philosophy

There is a hierarchy to everything in Unity; Project -> Scene -> GameObject -> Component -> Properties. Typically, when we talk about ‘things’ in our game we are talking about a specific ‘GameObject’ in a ‘Scene’. An empty game object contains just a ‘transform’ component (which is required). Using menu GameObject -> Create Empty you can make one and add it to the scene.

Two core, Unity-specific data types are;

  • GameObject:  The GameObject is the base class for all entities in Unity scenes. It is not necessarily visual, but commonly is (e.g. Cube, Sphere, Plane)
  • Component:  Created from MonoBehaviour, which is the base class every script derives from. Much of your code goes here.

The Transform Component

It is impossible to create a GameObject in Unity without a Transform Component. The Transform Component is one of the most important Components, since all of the GameObject’s Transform properties are enabled by its use of this Component. It defines the GameObject’s position, rotation, and scale in the game world/Scene View. If a GameObject did not have a Transform Component, it would be nothing more than some information in the computer’s memory. It effectively would not exist in the world.

The Transform Component also enables a concept called Parenting, which is utilized through the Unity Editor and is a critical part of working with GameObjects. To learn more about the Transform Component and Parenting, read the Transform Component Reference page.

You can see here (Figure 6.) how it is represented in the Scene Window, the Hierarchy Window, and the Inspector Window. You can see the Transform component which includes position and other properties. Also note the inviting ‘Add Component’ button. GameObjects exist so you can add components to them. The components do most of the work.

An empty GameObject

Figure 6. An empty GameObject

Other Components

The transform component is critical to all GameObjects, so each GameObject has one. Here (See Figure 7.) we see that GameObjects can contain other components (2-way purple arrow icons) too and components can refer to assets (cloud icon)

GameObject vs Component. From www.raywenderlich.com/

Figure 7. GameObject vs Component. From www.raywenderlich.com/

Component <-> Component Communication

Any class instance (of any type) can access one of the active GameObjects in the hierarchy via GameObject.FindObjectOfType( typeof ( MyGameObject ) ). For example your ScoreBoard class instance can access all the Enemy class instances to display a “Enemies: 5/10″ display.

Within any one GameObject it is common that one or more Components will need to communicate. For example your keyboardInputComponent instance can call walkingComponent.walkRight(). Advanced developers may create their own solution to for need. However, for beginners, here are the popular techniques for Component <-> Component communication;

Properties

As mentioned each component contains properties. These are the granular values such as Mass, Drag, and Use Gravity (See Figure 8.) that affect how a component behaves. Not every variable within a component is editable, but all editable ones are exposed as properties through the inspector. At author-time and even at run-time you can edit these values. Very friendly for iterative development.

Figure 8. GameObject with 3D Physics

Figure 8. GameObject with 3D Physics

 

Editable Editor

One of the most shockingly cool features of Unity is that the Editor tool itself is completely scriptable.

  • Want a different icon to float over a particular GameObject in the Scene window? Script it!
  • Want a property editable in the Inspector window? Script it!
  • Want your custom components in main menu? Script it!
  • Want an entirely custom window (e.g. a home-made texture painting program)? Script it!

Everything scriptable about the Unity experience can be shared between your projects and with other developers (free or premium cost).

Gotchas

Unity’s complexity may have you scratching your head as you get started (and for years to come). It is a very deep and powerful tool. Here are some quick answers to some puzzling ‘gotchas’.

Only For The Third Dimension (3D)?

Unity3D, as its name suggests is a 3D-enabled IDE to create content in a 3D-enabled runtime. There is no option to NOT render your project in 3D. There are always x (width), y (height), and z (depth) to the positioning of every asset in your project. However, this does not mean you can’t create 2D gaming. By setting your camera’s perspective to Orthogonal, the camera will ‘render objects uniformly, with no sense of perspective’. Lock the z (depth) of every GameObject and WOW, now you have a 2D game running in a 3D engine. While this may sounds counter-intuitive or inefficient, it is not. This is the same way many 2D games are created on other platforms too.

Note: Any developers hoping to do 2D should strongly consider 3rd party Unity packages to assist the process. There is MUCH to learn and the tools are very helpful to both fill in the knowledge gaps and provide tools which make development much faster. One of the most popular recommendations for 2D in Unity is called 2DToolkit.

Editable Runtime

Probably the largest single source of confusion during your first day of unity is that you can EDIT your source while the project is PLAYING. There are 3 play controls in the IDE (and via the edit menu); play, pause, and step.

Click play to play and click pause to pause. The trick is that WHILE playing you can still use the IDE; you can drag things into and out of the live scene, you can move the camera, you can edit code, you can change assets, and more! This is very powerful, HOWEVER, once you click pause all of your changes are lost. So be sure you click PAUSE before you return to edit your scene. Obviously this feature is very powerful, you can tweak settings in your live scene without needing to pause/play again. Just be careful.

With the power of Unity there is A LOT to learn. Luckily the editor and the language features are intuitive and there are ample tutorials and sample projects to get started. Still, it is intimidating.

Prefabs

Prefabs are a collection of GameObjects (e.g. a 3D Mesh of your hero character)  & Components (e.g. one unit of code that helps accept keyboard input to move your hero character) that can be re-used in your scenes. Several identical objects can be created from a single Prefab, called instancing. Take trees for example. Creating a tree Prefab will allow you to instance several identical trees and place them in your scene. Because the trees are all linked to the Prefab, any changes that are made to the Prefab will automatically be applied to all tree instances. Assets may be created by you or your team or downloaded for free or for cost within the app store within the IDE.

Asset Store

Unity’s Asset Store is home to a growing library of free and commercial assets created both by Unity Technologies and also members of the community. A wide variety of assets is available, covering everything from textures, models and animations to whole project examples, tutorials and Editor extensions. The assets are accessed from a simple interface built into the Unity Editor and are downloaded and imported directly into your project.

Getting Started

With the power of Unity there is A LOT to learn. Luckily the editor and the language features are intuitive and there are ample tutorials and sample projects to get started. Still, it is intimidating.

Here are the links and tips;

  1. Download The IDEUnity3D and install it. Its free. There is also a pay version with many (non-essential) additional features.
  2. Watch My HD Screencast Video - Watch me talk you through as I create a complete game from start through finish. (See ‘Member Resources’ below)
  3. Review My Sample Project Code - (See Members Resources below).

Making ‘FlyerGame’

To learn Unity3D, I created several simple, but complete games. I include one here to help you learn too. I used assets and game logic from “FlyerGame”, a game that I have recoded many, many times using game frameworks. The HD Video Screencast and source assets are available (See ‘Member Resources’ below).

Conclusion

Coming from a 13 years of Flash Player game development as well as JavaScript game development Unity feels at times a huge polished step forward yet also a clunky gaming-with-training wheels step backward.

The C# language – is AMAZING. I’m constantly figuring out new language features and powerful new ways to solve old problems. The language speed is great. The MonoDevelop code editor is very strong.

The graphics – and sound-performance is stunning. The quality of the output of desktop games from Unity is incredible when compared to any casual-game development platforms yet obviously less-so when compared to professional-grade commercial gaming platforms such as Unreal Engine and CryEngine.

Ease of development – considering how much you can do with Unity (huge 3D worlds for desktop vs simple 2D mobile games) it is easy to use. The Unity Editor is also very strong. Every game requires 1 or more scenes. That makes sense. Each scene requires at least one object inside – typically many. I still feel more comfortable if I could just bind a script to the scene (with no objects) and completely script the experience. Perhaps with time I’ll change my mind on that.

Community – I strongly DISLIKE that Unity has a history of many programming languages. Three are in use  today. Perhaps for some there are benefits, but for me the obvious choice is C# and coming across tutorials, code samples, and projects in another languages (JavaScript or Boo) is a hassle.

Documentation – The Unity3D website, its documentation and its help section are all FANTASTIC. At the time of this article 5 of the 9 ‘learning modules’ have complete code and HD video. There is also one complete game project with 60-70% coverage so far with step-by-step tutorials. This is all new since Unity 4.x.

Next Steps

*See ‘Member Resources’ below.

NOTE: Source-code is already available for download. However, videos are NOT yet available.

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?