Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Felgo Games Components Reference

The Felgo Games are available with the following import statement in your QML file:

 import Felgo 4.0

This is a list of all the Felgo components grouped into functional groups.

Felgo Plugins for Games (and Apps)

Felgo Plugins add platform-specific features and 3rd party SDK integration available from QML.

AdMob Plugin

Integrate with AdMob to monetize and promote your apps & games with ads.

Amplitude Plugin

Integrate with Amplitude to get insights into your app's usage.

Apple Sign In Plugin

Let your users authorize with their Apple ID account on iOS devices.

Chartboost Plugin

Integrate with Chartboost to monetize and cross-promote your games with ads.

Facebook Plugin

Integrate with Facebook to help you build engaging social apps and get more installs.

Firebase Plugin

Add Google's Firebase for user authentication and access to the Firebase Realtime Database.

Flurry Plugin

Integrate with Flurry to get insights into your app's usage.

GameCenter Plugin

Integrate with GameCenter to send your games' highscores to Apple Game Center on iOS devices.

GoogleCloudMessaging Plugin

Integrate with Google Cloud Messaging Push to send cross-platform push notifications and increase your users' engagement.

HockeyApp Plugin

Integrate with HockeyApp for beta distribution & crash reports.

Notification Plugin

Schedule native local push notifications in your app.

OneSignal Plugin

Integrate with OneSignal Push to send cross-platform push notifications and increase your users' engagement.

Soomla Plugin

Integrate with Soomla to offer in-app purchases and a virtual economy model within your app.

Wikitude Plugin

Integrate with Wikitude to create augmented reality apps.

Note: For testing the plugins on mobile and source code examples, see the Felgo Plugin Demo. When you develop your own game and want to add plugins to it, a Felgo license is required.

Felgo Core Components

These components every game will contain. Most important are GameWindow, Scene, EntityBase and EntityManager.

AppItem

Root Felgo element usable with existing Qt applications

EntityBase

Base class for custom game entities

EntityManager

Manages all entities derived from the EntityBase component

GameWindow

Default root Felgo Window containing all other components and Scenes

GameWindowApplicationWindow

Root Felgo ApplicationWindow containing all other components and Scenes

Scene

Root element for a single game view

Storage

Storage item provides a persistent and offline storage for arbitrary key-value pair data

Utils

Provides often-needed functionality like generating a random number between 2 values

Context Components

The Context Components are global properties that are available in all QML files. They can be used to open native dialogs and browsers, network requests, dynamic QML component creation and provide system information.

FileUtils

Singleton provides file operations like reading, writing and listing files

NativeUtils

Singleton allows opening native message boxes, input dialogs and browsers

Qt Context Objects

The Qt Context Objects page contains information about often-used functionality of the Qt element, for network requests and useful JavaScript elements.

SpeechToText

Singleton allows to convert recorded spoken audio into text

ZeroConf

Singleton allows discovering network services via Bonjour/ZeroConf

Visual Components

These components are used for efficient rendering in games and to handle multiple screen sizes. Most important is MultiResolutionImage for handling different screen sizes and aspect ratios. And GameSpriteSequence or GameAnimatedSprite for animated sprites.

Camera

Enables to follow an object, or be moved around freely

GameAnimatedSprite

Plays a single sprite animation stored as a series of frames

GameSprite

Element defines a series of sprite frames within an image for a GameSpriteSequence

GameSpriteSequence

Contains a list of GameSprite elements and allows switching between them with only one active at a time

LineItem

Can be used to display colored single and segmented lines

MultiResolutionImage

Changes the used image based on the display size to improve performance and memory usage

ParallaxItem

Allows to create parallax movement effects

ParallaxScrollingBackground

Allows to create an endlessly scrollable background, usable by SideScroller games for example

PolygonItem

Allows to display polygonal primitives with color

RubeRevoluteJoint

Represents a Box2D RevoluteJoint as defined in the JSON file from the RUBE level editor

In addition to the above list, also these Qt Quick Components are useful.

Image The Image element is used to display image files.
BorderImage Useful for resolution-independent buttons, similar to Android's 9-patch images.
Text The Text element allows displaying text on screen.
Rectangle The Rectangle item provides a filled rectangle.

Input Components

These components allow entity movement with a keyboard or a virtual controller for touchscreens.

JoystickControllerHUD

Element provides an input controller for a virtual joystick for moving entities, also called a virtual D-pad

SimpleButton

Represents a basic rectangular button with a clicked handler that can be used during development

SpinBox

Allows the user to select from a set of preset values

StyledButton

Has a gradient, radius and border and an optional flatStyle, ready to be published in games & apps

TwoAxisController

Input controller with keyboard support for moving entities

In addition to the above list, also these Qt Quick Components are useful:

MouseArea Allows mouse and touch input handling.
MultiPointTouchArea Allows multi-touch input handling.
Flickable Provides a surface that can be swiped.
Keys Allows key handling, including the Android soft keys like Back.
TextInput Displays a single editable line of text.
TextEdit Displays multiple lines of editable formatted text.

The Qt Quick Controls contain more input elements like native-looking Buttons, CheckBoxes and view components like TableView or StackView. See the Qt Quick Controls QML Types for more details.

Physics Components

These components add physics behavior to a game. They can either be used for collision detection, or for moving entities based on physics. The physics engine used by Felgo is Box2D.

Basic Physics Components

BoxCollider

Physics body with a rectangular shape

CircleCollider

Physics body with a round shape

PhysicsWorld

Simulates a physics world and contains all physics bodies

PolygonCollider

Physics body with a polygonal shape set up with at least 3 vertices

Fixture Components

To create custom physics objects which use more than the default behavior of BoxCollider, CircleCollider or PolygonCollider, combinations of these Fixture types can be used inside a ColliderBase object:

Box

A rectangular physics shape

Chain

An empty chain of points, or empty polygon (loop)

Circle

A circular physics shape

Edge

A flat edge between two points

Fixture

Abstract base class of all fixture types

Polygon

A filled convex polygonal physics shape

Joint Components

To link multiple physics objects together, the following types of joints can be used:

DistanceJoint

Keeps the distance between 2 bodies constant

FrictionJoint

Top-down friction between 2 bodies

GearJoint

Connects 2 Joint objects together

Joint

Abstract base class of all joints types

MotorJoint

Keeps the relative translation and rotation between 2 bodies constant

MouseJoint

Used to manipulate bodies with the mouse or touch input

PrismaticJoint

Allows relative translation of two bodies along a specified axis and prevents rotation

PulleyJoint

Keeps the total distance between a body, 2 points and another body constant

RevoluteJoint

Forces two bodies to share a common anchor point around which the bodies rotate

RopeJoint

Restricts the maximum distance between two points

WeldJoint

Glues two bodies together keeping a constant relative angle

WheelJoint

Allows relative rotation and translation of two bodies along a specified axis

Advanced Physics Components

The above components will be used most of the time. These components are for advanced use:

Body

A physics body which consists of one or more Fixture elements

Box2D

Contains static properties of the Box2D physics engine

ColliderBase

Base component for BoxCollider, CircleCollider and PolygonCollider. All physics colliders including BoxCollider, CircleCollider and PolygonCollider inherit from ColliderBase

Contact

Information about a physics contact event

DebugDraw

Draws a debug view of the physics components

Profile

A property group for getting profiling data about the current state and performance of the physics simulation

RayCast

A RayCast object that reports when a ray hits a Fixture

World

Represents a Box2D physics world including bodies and joints

Felgo & Qt Multimedia Components

These components allow to play audio and video files.

BackgroundMusic

Element allows playing long-lasting and looping background sound in wav, mp3 or ogg file format

GameSoundEffect

Element allows playing short-lasting and looping sound effects in wav file format

YouTubeWebPlayer

Embedded video player based on the YouTube Iframe-Player API

In addition to the above list, also these Qt Quick Components are useful:

SoundEffect Provides a way to play sound effects in QML
MediaPlayer Add media playback to a scene
Video A convenience type for showing a specified video
VideoOutput Render video or camera viewfinder
Camera Access viewfinder frames, and take photos and movies
QtMultimedia Provides a global object with useful functions from Qt Multimedia

Networking Components

These components handle network activities.

HttpImageUtils

Provides functionality for scaling and cropping an image file before uploading it with HttpRequest

HttpNetworkActivityIndicator

Convenience type to check pending requests when using HttpRequest

HttpRequest

Allows to implement networking features based on the SuperAgent library from VisionMedia

Promise

Offers an API similar to the Promises API in ES2017

XMLHttpRequest Element

The XMLHttpRequest object can be used to asynchronously obtain data from over a network.

View Model Components

JsonListModel for JSON Data Sources

JsonListModel allows to transform your JSON data into a QML ListModel for usage with e.g. an AppListView.

JsonListModel

A proxy view model for JSON data sources

SortFilterProxyModel for Sorting and Filtering

SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML. You can use it to apply filter and sorting settings to your QML ListModel items.

AllOf

Filter container accepting rows accepted by all its child filters

AnyOf

Filter container accepting rows accepted by at least one of its child filters

ExpressionFilter

Filters row with a custom filtering

ExpressionRole

A custom role computed from a javascript expression

ExpressionSorter

Sorts row with a custom javascript expression

Filter

Base type for the SortFilterProxyModel filters

FilterContainer

Abstract interface for types containing Filters

FilterRole

A role resolving to true for rows matching all its filters

FilterSorter

Sorts rows based on if they match filters

IndexFilter

Filters rows based on their source index

JoinRole

Role made from concatenating other roles

LocaleAwareSorter

Sorts rows based on a locale aware comparison of a source model string role

ProxyRole

Base type for the SortFilterProxyModel proxy roles

RangeFilter

Filters rows between boundary values

RegExpFilter

Filters rows matching a regular expression

RegExpRole

A ProxyRole extracting data from a source role via a regular expression

RoleFilter

Base type for filters based on a source model role

RoleSorter

Sorts rows based on a source model role

SingleRole

Base type for the SortFilterProxyModel proxy roles defining a single role

SortFilterProxyModel

Allows to apply filter and sorting settings to QML ListModel items

Sorter

Base type for the SortFilterProxyModel sorters

SorterContainer

Abstract interface for types containing Sorters

StringSorter

Sorts rows by comparing a source model string role with a localized collation algorithm

SwitchRole

A role using Filter to conditionnaly compute its data

ValueFilter

Filters rows matching exactly a value

AI Components

The AI components move entities towards a target point, with a constant velocity or along a path.

MoveToPointHelper

Provides information for a MovementAnimation or a ColliderBase about the direction and rotation when moving towards a target

MovementAnimation

Modifies a property with a constant velocity and acceleration

PathMovement

Interpolates an entity along a path and rotates it towards the target points

RUBE Components

The RUBE components allow loading of levels and Box2D objects created with RUBE, which stands for Really Useful Box2D Editor. You can use RUBE to create side scrollers like Badland or Jetpack Joyride, platformers like Super Mario, and other physics-based games.

RubeBody

Represents a Box2D body as defined in the JSON file from the RUBE level editor

RubeFixtureCircle

Represents a Box2D Circle fixture as defined in the JSON file from the RUBE level editor

RubeFixturePolygon

Represents a Box2D Polygon fixture as defined in the JSON file from the RUBE level editor

RubeImage

Represents an image as defined in the JSON file from the RUBE level editor

RubeParser

Creates QML items based on the description of a JSON file exported by the RUBE level editor

Slot Machine Components

The slot machine components allow to create slot games with Felgo.

SlotMachine

Component allows to easily implement a slot machine with multiple reels and rows. It also provides methods to spin or stop the slot machine and lets you access the visible items in each reel and row

SlotMachineModel

Allows to easily generate reels with randomly shuffled items for a SlotMachine

SlotMachineReel

Element describes a reel to be displayed within the SlotMachine component

QML Native Code Components

The QML Native Code Components allow to interact with the native platform.

You can show native views as part of your QML scene. You can also call native APIs directly from QML.

NativeClass

Represents a platform-native class

NativeObject

Represents a platform-native object

NativeObjectUtils

Allows you to interact with objects native to the mobile platform

NativeView

Allows to instantiate and display platform-specific views and widgets

NativeViewBinding

Defines the platform specifics for NativeView

Native App Integration

The Native App Integration components allow to integrate Felgo in native applications.

FelgoAndroid

Initializes the Felgo runtime from a native Android application

FelgoAndroidActivity

Integrates Felgo in a native Android application

FelgoAndroidFragment

Shows Felgo QML content in a native Android application

FelgoAndroidView

Shows Felgo QML content in a native Android application

FelgoIOS

Initializes the Felgo runtime from a native iOS application

FelgoIOSView

Shows Felgo QML content inside a native iOS application

Most useful QML Components

Item The Item is the most basic of all visual items in QML.
Animation The Animation element is the base of all QML animations lasting for a fixed time.
Timer The Timer item triggers a handler at a specified interval.
Loader The Loader item allows dynamically loading an Item-based subtree from a URL or Component.

See here for a full list of all QML components.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded