Fast 2D rendering using Tilemap in OpenFL 4
The new OpenFL milestone update brings many changes, and perhaps one of the most important ones is the removal of Tilesheet class and the introduction of its new alternative - Tilemap.
In this tutorial I'll give you a quick overview of this new class and provide an example to render different moving tiles.
This tutorial is a direct follow-up to one of my previous tutorials Fast 2D rendering using Tilesheets in OpenFL, which is now obsolete.
JSON in Haxe: Parsing, encoding, replacing
Haxe includes built-in tools for parsing and encoding data in JSON format, which I'm going to cover in this tutorial.
JSON is a text format, so raw data is first loaded into a String object, which is then parsed by the haxe.Json class to produce a Dynamic object. If you already know what the structure of the JSON is going to be, you can produce a custom typed object instead.
Take a look at the example below:
Getting started with snowkit with luxe engine
Snowkit is an open-source system of tools, libraries and developers, which aims to provide a high quality workflow for Haxe developers.
The kit offers a set of libraries, which can be used to create Haxe frameworks, applications and games. In this tutorial I'll cover the installation of the 3 core components of the functional set - flow, snow and luxe.
Flow is a tool for building and managing Haxe projects. Snow is a toolkit for creating crossplatform apps and games on a low level. Finally, Luxe is a 2d game engine. The whole configuration can be compared to OpenFL as another means of creating cross-platform apps and games using Haxe.
Of course, in order to use snowkit tools and libs, you need to have Haxe installed.
Note that all of the components in snowkit are still under development, so future updates might change these steps a bit.
ListView in HaxeUI
HaxeUI's ListView control is a list of selectable items, similar in appearance and name to the ListView control in Android.
The list can be created and populated using an XML layout, or programmatically.
Like many HaxeUI components, ListView is scrollable (with the scrollbar appearance depending on the chosen theme).
Let's create a simple ListView populated by a few different items. I'm going to use an XML layout to do that, you might want to read my XML layout tutorial first.
Accordions in HaxeUI
Accordions are vertical menus that consist of panels which expand on click.
In HaxeUI they are easily created in layout XML. Each child of the accordion is considered a separate panel, which displays all of its content when selected. Only one panel can be selected at a time.
In the next example I'll create an accordion, consisting of 3 panels, where each panel has 3 buttons.
I'll use the XML layout approach to create the accordion, so I suggest you check out the HaxeUI layout tutorial first if you haven't.
Get updates and bonus content!