Twinspire is a 2D rendering and application framework written in two different languages.
The goal of Twinspire is not to be another engine, but rather to supply a set of tools that perform trivial tasks and leaving the rest of the development to the developer.
The following features in the Core library include:
- Application creation
- Multiple back buffers
- Custom preloaders
- Dimensions and a Managed stack
- Extensions to the
kha.graphics2.Graphics
class, supporting repeat and patched images, multiline text, sprites, and the original kha extensions. OurGraphics2
extension class also expands existing draw methods with nativetwinspire.geom.Dim
support. - Manage containers and manage children, enable automatic scrolling, infinite scrolling, scroll-drag and more.
- Automatic event system that handles Dimension dragging, proper mouse focus system, text input and user input via
activities
. - Completely separate event and graphics contexts for proper order of operation.
- Options for Scene Management.
- Basic animation support through
Animate
class. - Unique
Id
s. - Manage resources by groups.
- Filter resources with wildcards (
*
). - Load and unload resources from memory, individually or in groups.
- An improved version of
StringBuf
. - Customisable
Menu
options for gamepad support. Units
class for measuring distanceTextBuffer
class for multiline, multi-formatted text support.
Not all features in Twinspire Core are complete, but the features in the list above are considered to be in working order.
- Automated Event Simulations for user inputs.
- Automated Physics Simulations for any game event loop.
- Physics and Maths implementations
- Custom scripting support with interoperability between both Haxe and ODIN.
You will require Git
to install Twinspire on your computer. It is recommended to use it in conjunction with Haxelib for easier updating:
haxelib git twinspire-core https://github.com/twinspire/Core.git
Alternatively, you can use git clone
but you will have to setup a haxelib dev
environment yourself.
You can now use the recently added Twinspire Core CLI tool to create new projects and setup a quick example:
haxelib run twinspire-core create "My Project"
Use the CLI help
command for more information, or omit the create
command for CLI documentation.
It is not currently recommended to use ODIN. It is expected to have better support when the Haxe version is updated.
The WIKI page contains tutorials and information on how you can get started with using Twinspire.
Most of the WIKI is up-to-date but some information may be missing. In most cases, the API is well documented and you should be able to find most of the information you need when building applications there. A detailed Quick Start guide is also available, but only describes basic concepts. Invariably, Twinspire Core is generally quite simple for what it does and most things should be self-explanatory, but feel free to write an Issue for help. The Haxe forums or Discord may also provide help.
If you find a bug or an issue, please use the issue tracker here.
This library is licensed under MIT.