⭐ NEW UPDATE (2024-01)
V0.5.9
| Announcements Page
djFlixel is a small library with some helpful tools for HaxeFlixel. It started as a helper for my personal projects. One of the first things that I implemented was a menu system and a text autoscroller. Then I kept adding things, like a tool to fade the screen to black, or a unified keyboard/gamepad checker. Later on I decided to open source and distribute it, why not.
The codebase is commented, and I hope that you may find it easy to use. Plus I made a demo showcase app that utilizes most of the parts of djFlixel; you can find the demo source files in the /demo
folder.
Checkout the HTML5 version of the DEMO here: https://john0032.itch.io/djflixel 👈 👈
haxelib git djFlixel https://github.com/john32b/djFlixel
A multi-page menu system. Best used for creating short game menus. It is simple to setup and use. Supports links, checkboxes, list selection, number selection. It offers a simple callback system to get events (like when an item was changed or focused). Also the visual style is customizable from the colors, fonts, animation times, tween offsets to custom cursors, etc. (Examples in the Demo project source code)
An autotype text object that supports a simple inline tagging system. Meaning that you can insert special tags in the source string that change the behavior on the fly, like adding pauses, triggering user callbacks or changing the character speed.
In the folder/package djflixel/gfx
you can find some tools for creating various effects like static, rainbow loader, starfield, text sine scroller, text bouncer etc. All of the effects offer many customization options. Checkout the DEMO, it provides examples on how to use most of these.
Some of the effects
djFlixel offers the public static class D.hx
for accessing some minor objects and helpers. It is available in the package djFlixel.D
What is included in D
:
D.ctrl
: Streamlined control polling. Check once and get gamepad/keyboard presses. Also able to change to change keyboard keymap on the flyD.snd
: Offers some sound functions, like playing assets with only the short filename or setting predefined volumes for soundsD.bmu
: General purpose openFL BitmapData Manipulation tools.D.gfx
: flixel/djFlixel specific Bitmap Manipulation tools.D.text
: Offers quick generation ofFlxText
objects with custom styles. Provides its own text styling struct. The entirety of djFlixel relies on this object to get and style text objects.D.align
: Tools to alignFlxSprites
. Align in relation to the screen or to each other or in columns, etcD.ui
: UI related helpers. Like an icon generator (built-in djFlixel icons)D.save
: Save functions helper.D.dest
: Helper object offering extra destroying functions, like tweens, or timers (Use it like FlxDestroyUtil)
There are other small tools in this libary. Like in the djflixel/gfx/pal
package you will find some Color Palettes, like DB32. Or a class DelayCall
which makes it easy to delay a function call. Feel free to explore the codebase and as always read the demo/
source, which utilizes most of these.
djFlixel has some built-in general use icons. Icons come in sized of 8,12,16,24
pixels wide and tall. Icons are accessible from the D.ui
object. Also, as with any other white bitmap, you can use the bitmap tools in D.bmu
to colorize these or apply shadows.
In the tool D.bmu
you can find a useful slice9 scaler, that works by tile-repeating the inner parts, It generates bitmapdata
objects so you can use it however you want.
🌻 NEW, Checkout the Source Code of FUTURE KNIGHT DX, a game that uses djFlixel for the Menu System among other things
https://github.com/john32b/futureknightdx
Please note that this is just a side project of mine, I cannot guarantee any support or bugfixes. This library is provided "as-is"
Yes, but only inside the the source code. 🙈 . For practical examples checkout the demo/
directory, it is an application that puts many of the components in use; it is heavily commented and I hope it explains things well. Also the library files themselves are commented. So feel free to dive into the codebase. 🦡
I have no plans to make a wiki or any other form documentation for this library.
- All updates and changelogs are in the Announcements page here on github.
- Old changelogs deleted, starting fresh. 🙊
- In the source files you will find two extra folders/namespaces
djA
(Target agnostic library) anddjfl
(Openfl library). Don't worry about those, they are partial personal libraries that are not published but djFlixel uses. So I am bundling the files needed to compile.
- It seems to be that some fonts don't work well in HTML5, they appear to produce taller text objects than the other targets, and this throws off all the automatic positioning a bit.
FlxMenu
andFlxAutotext
are affected. However I tried to implement a hack/fix for such cases. Readup onMPageStyle
andDTextStyle
, plus check thedemo/
sources for an application example.
I started creating this library in 2015-2016, recently I reseted the commit history to a fresh start. The older versions prior to 0.4 are available in the TAG releases here on GitHub.
Thanks for checking this out 😸,
John.
djFlixel | Author : john32b | License : MIT