Prototyping & Unity3D

Overview

I’ve been involved in quite a number of projects that required the development of prototypes in a very short period of time. These prototypes were meant to be developed to evaluate the viability of the ideas and sometimes to serve as a proof that the application can be developed given the constraints. I recently gave a talk on rapid prototyping and Unity 3D at the Entelect DevDay. The talk was comprised of some basic theory of prototyping, as well as an overview on Unity 3D. The twist in my talk was that the presentation was a prototype that I built with Unity 3D and the content of the prototype illustrated the topics on prototyping that I spoke about. This article will highlight some of the theory and concepts of prototyping, as well as showcase the Unity 3D game that illustrated the said concepts.

ScreenshotPrototyping

In this section of the talk, I cover the concepts around software prototyping, and some general theory and strategies in tackling the development of a prototype.

What is Software Prototyping?

Prototyping is the process of creating incomplete versions of the proposed software. That sounds bad, it’s incomplete! Well, the aim of prototyping is to simulate only a few key aspects of the solution to evaluate the viability of ideas in terms of cost, and complexity. Often projects are taken on without completely understanding the effort behind achieving the requirements – prototyping can assist in the analysis of these requirements and assist in learning more about the problem domain.

Why Prototype?

  • Early user acceptance testing: Users get a chance to use and experience the product early in development. This will result in early feedback from the user base and thus allow for changes to be implemented earlier rather than later. It’s a known fact that the cost for a change in a project increases significantly in later phases of development.
  • Realise requirements and constraints that were not previously considered: By simulating some of the functionality for a product, the developer may realise side effects, constraints, or additional requirements that were not thought about. This assists in achieving a more complete and robust solution.
  • Better cost, time, and complexity estimates: By realising additional requirements and constraints early, as well as receiving user feedback early, one can make better complexity and time estimates – this overall results in better costing estimates.
  • Slaying the dragon: In software development, we speak about slaying the dragon – where a single team of heroes attempt to slay a large project/dragon. With software prototyping, we try to make slaying the dragon more like shooting fish in a barrel by tackling smaller or more complex features first.

The Process of Prototyping

  1. Identify Core Requirements: These are the requirements for the product.
  2. Develop Initial Prototype: Prototype the features that are important depending on the goal of the prototype. If complicated features with unknown possibilities exists, then tackle these first. If there are many simple features, try simulate an experience across all these features without delving into the complexity in each.
  3. Evaluate and Review the Prototype: The developed prototype should be reviewed with the target user group. The performance of the features and usability should be evaluated and measured.
  4. Revise and Enhance the Prototype: Given the feedback from reviewing the prototype, enhancements and changes can be made.
  5. Repeat: If time permits, or there still exists unknowns, the above process should be repeated.

Dimensions of Prototyping

Horizontal Prototyping

  • The aim is to provide a broad view of the entire system.
  • There will be little complexity in individual features.
  • This approach is good for websites and instances where a general feel for the product needs to be achieved- Typically applications that are targeted to the public, or applications that require intensive usability testing.

Vertical Prototyping

  • The prototype will focus on a small set of features, even one or two features.
  • The chosen features are explored and researched completely.
  • This approach is good for products where an obscure algorithm is used or something unusual or unorthodox is attempted. This is useful for applications where complex logic and processing is required.

Types of Prototyping

  • Throwaway Prototyping: This is also known as close-ended prototyping. Rapid Prototyping involves creating a working model of various parts of the system at a very early stage of development, after a relatively short investigation. This kind of prototyping is useful to show users what the feature will look like, however, the code base or project is not necessarily used for the production version of the application.
  • Evolutionary Prototyping: The main goal when using Evolutionary Prototyping is to build a very robust prototype in a structured manner and constantly refine it. The prototype forms the heart of the production application and additional features are added to it.
  • Incremental Prototyping: In incremental prototyping, parts of the system are developed as separate prototypes and plugged together to form a complete application. It is important to develop the interfaces for the separate components early, as integration may turn out to be a nightmare.
  • Extreme Prototyping: Extreme Prototyping is employed mainly for web applications. Usually in 3 phases.
  1. Static HTML is created – this gives users an instant tangible feel for the product.
  2. Thereafter, the service layer is simulated – this includes business rules and logic.
  3. Lastly, the actual service layer is developed – this involves creating a data layer as well as plugging into the front end HTML views.

This gives users an early view of the application without having actual functionality behind it as the backend will gradually come together as the process moves along.

Advantages of Prototyping

  • Reduced time and costs: By exploring the requirements and constraints, effort is better estimated.
  • Improved and increased user involvement: User involvement is important and prototypes clear up misconceptions, expectations, as well assists in gathering user feedback from early stages of development.
  • Realise oversights, additional requirements, and constraints.

Disadvantages of Prototyping

  • Insufficient analysis: The confidence in a prototype could result in further analysis of features to be abandoned. This could result in part of the system being well defined whilst the remaining parts are vague and incomplete. This can be controlled through correct processes in requirements analysis.
  • User confusion between the prototype and the finished system: If the final system is completely different to the prototype, users may be confused in how the application operates. This can be avoided by following the correct prototyping principles.
  • Expenses of implementing prototyping: Although prototyping saves cost in the actual development phase, there will be costs involved in implementing a prototyping phase. A prototyping phase should only be included in projects where it makes sense.

Unity 3D

Unity 3D is a cross-platform game engine with a built in IDE and designer. Unity 3D allows for the development of games and interactive multimedia-rich applications. The approach is write once, deploy everywhere! Unity 3D allows for applications to be deployed to platforms such as iOS, Android, Windows, OSX, and even consoles. Unity 3D also has great support for running your application within a browser using it’s custom plugin.

Concepts

Unity employs typical object oriented concepts when building applications. Objects have a representation by some image/sprite, 3D model, or sound. Objects also have components with different behaviour attached to them – by plugging components to objects, we can achieve any behaviour we want. Unity 3D comes bundled with predefined logic for typical game related functionality such as physics, player controls and effects – but what about custom functionality?

Code

Unity allows you to write functionality with and imperative language and scripting language, namely C#, and JavaScript; using the MonoDevelop Environment. MonoDevelop is a cross platform IDE. This means that you can write Unity applications on a range of platforms such as Windows, Linux, and OSX.

What’s the point if we don’t develop games?

Unity can be useful in prototyping a basic idea and testing viability across different platforms, e.g. mobile devices. Screens can be easily mocked up and small pieces of page navigation etc. can be added to receive early user feedback. Although unity is a game engine, you can develop almost any kind of interactive application with it, fast…

…and of-coarse, Unity 3D can be used to develop games! Almost everyone that’s a dev now had a dream to develop the next Super Mario or Duke Nukem in their youth.

Demo

During my talk, I then delved into the practical aspects of creating a new Unity 3D project, scenes, and objects. I also explained the use of components, assets, and creating custom components using C# and JavaScript.

Credit

Leave a Reply