1.14.0.5
Hummingbird
A modern user interface library for games
Workflow Guide

About this document

The purpose of this document is to guide you through the UI development process. It goes over all the major phases and describes the software and technologies used. Please note that this a general workflow guide.

Introduction to Hummingbird

Hummingbird is a graphical user interface system specially designed for games. Game developers and UI artists can use standard modern HTML5, CSS3, and JavaScript to design and implement game UI and interaction.

Introduction_to_Hummingbird.png

Above you can see the basic functional diagram of Hummingbird. Essentially the result of the UI development (discussed further on in detail) is a HTML page that is placed inside of a Hummingbird View. The Hummingbird View is basically a HTML5 page and the JavaScript context for it. The View allows you to perform various operations on the page, such as resizing, navigating to a different URL, sending input events, executing custom JavaScript code and so on. The HTML content in the View is rendered by the Hummingbird Renderer (the Renoir graphics library) to a texture that is passed to the game engine which displays it in the game.

UI development

Major phases and tasks distribution in UI development

uiDevelopment.png

The HTML UI development process can be broken down in three major tasks – UI vector and bitmap assets design, UI composing and animation and UI programming. All three tasks can be carried out in parallel and the combined result is HTML page/pages that are displayed in Hummingbird view/views that are integrated in the game engine. The tasks are discussed in greater detail further on in the guide but in the diagram above you can see the team member involved and the software used for each phase.

UI vector and bitmap graphics assets creation

Although you can create basic shapes such as circles, rectangles, ellipses directly with HTML elements very often you'll need more complex shapes for your UI. These shapes are typically created as bitmap (raster) or vector images by UI artist or a graphic designer. Bitmap (raster) graphics images broadly speaking represent the image as rectangular grid of pixels. Bitmap images are used for all sorts of UI elements: artwork, photos and detailed UI elements. Their major drawback is that their quality degrades if they are scaled. Vector images on the other hand are based on geometrical primitives and scale perfectly regardless of the size of the UI. Furthermore the file size of the generated files is smaller than that of raster images. Hummingbird even supports SVG vector images that can be modified by CSS/JS at runtime (check the SVG images section for more information). The major drawback of vector images is that they are actually rendered at runtime and complex images might have effect on the performance. It is advisable to use vector images only when the UI has to be scaled for large resolutions or when you design simple shapes. On the diagram above you can see the software used for the different types of UI image assets.

Currently Hummingbird supports a subset of SVG Tiny. We plan to implement SVG Full in the future.

UI composing and animation

compositing.png

This stage is typically carried out by Web animator, Front end developer or 2D animator It has three main tasks:

  • Compose all the UI assets (vector and raster images, video, audio, external HTML/CSS/JS) in uniform HTML documents
  • Create and animate various UI elements (HUDs, Menus, Lobby, Health bars, progress bars, etc)
  • Setup the UI's layout, positioning and responsive scaling. There are many HTML editors that you can use for this stage. We advise the use of the Coherent Labs plug-in for Adobe Animate for Hummingbird.

UI programming

uiProgramming.png

This stage is very closely related to the UI composing and animation stage and it's typically carried out by a Front end developer or a JavaScript developer. It has three main tasks:

  • Setup the JavaScript part of the code for the data binding
  • Add additional functionality, interactivity, content and styling of the HTML pages using HTML5, CSS and various JavaScript libraries
  • Add additional animations with the Hummingbird JavaScript animation framework

In this stage you can use the Hummingbird Debugger in collaboration with the game developer to debug for HTML/CSS/JS errors.

[Planned] The Hummingbird Debugger is still in development.

Integration with game engine

This phase is typically carried out by a game developer. He is responsible for adding the Hummingbird View component and setting its settings in the game engine. Furthermore the game developer also writes the game engine binding code.

Responsive scaling

Adding responsive scaling functionality to your UI is essential to make it render properly regardless of the resolution. The best way to achieve this is using CSS vw/vh units or ems.