You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/18-Haxeflixel-5-9-0.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ layout: blog-post
4
4
postDate: "January 24, 2025"
5
5
---
6
6
7
-
After 8 long months since 5.8.0, I'm happy to announce the largest flixel release since I've taken over as lead. We don't like to go that far without releases, but new things just kept piling on. To name a few, we have:
7
+
After 8 long months since 5.8.0, I'm happy to announce the largest Flixel release since I've taken over as lead. We don't like to go that far without releases, but new things just kept piling on. To name a few, we have:
8
+
8
9
- A new FlxInputText to replace the old Flixel-UI.
9
10
-`FlxG.assets`, for customization to Flixel's asset management (hot-reloading!).
10
11
- Major additions to tilemaps, for both collision, iteration and general ease-of-use.
@@ -13,14 +14,17 @@ After 8 long months since 5.8.0, I'm happy to announce the largest flixel releas
13
14
## When will Flixel 6 be released?
14
15
15
16
The next release will be version 6.0.0, unless for some reason an urgent patch is needed for 5.9.0. For the current list of changes in Flixel 6, look [here](https://github.com/HaxeFlixel/flixel/blob/release6/CHANGELOG.md). Many devs are using 6.0.0 already, and you can too! Just run:
If you have been compiling with `no-deprecation-warnings` in your project's build command, now is the time to fix all of those, otherwise your project will not compile in Flixel 6. I also recommend using a haxe version of 4.3 or higher, which allows Flixel to suppress various internal deprecation warnings that were left in for backwards compatibility. If you have any issues with any of this don't hesitate to let me know, either in github or the Haxe discord's Flixel channel.
20
23
21
24
## New and improved FlxInputText
22
25
23
26
Special thanks to [Starmapo](https://github.com/Starmapo) for completely redoing `FlxInputText` from the ground up! New features include:
27
+
24
28
- Multiple characters can now be selected at once, either through holding and dragging the mouse or holding the shift key while moving the selection cursor.
25
29
- Double pressing on the text field will select the closest word at that position.
26
30
- You can select all of the text with Ctrl+A.
@@ -46,23 +50,27 @@ Check out these features in the new [FlxInputText Demo](https://haxeflixel.com/d
46
50
With the addition of `InputTextFrontEnd`, which controls the text input events used to power `FlxInputText`, creating other text inputs will be much easier, expect a `FlxBitmapInputText`, soon!
47
51
48
52
## AssetFrontEnd
53
+
49
54
If you're sick of doing `sprite.loadGraphic(Paths.image("hero"))`, well, you're in luck! FlxG.assets, is the new customizable interface that takes string asset paths and gives the desired assets. by setting the following dynamic method:
55
+
50
56
```hx
51
57
public dynamic function getAssetUnsafe(id:String, type:FlxAssetType, useCache = true):Null<Any>
52
58
```
53
59
54
60
Here are just a few neat uses for this:
55
61
56
62
### Simplifying asset paths
63
+
57
64
The above example that loads the hero sprite can be simplified to `sprite.loadGraphic("hero")`, like so:
65
+
58
66
```hx
59
67
// Edit the simplified id before passing it to the old method
60
68
function path(id:String, type:FlxAssetType)
61
69
{
62
70
// for flixel assets, just pass them to the old method
63
71
if (StringTools.startsWith(id, "flixel/") || StringTools.contains(id, ':'))
64
72
return id;
65
-
73
+
66
74
return switch type
67
75
{
68
76
case BINARY: 'assets/data/$id'; // expects extension already'
Sick of building the game just to see some asset change in the game? Simply add the Folling flag to your build command, and the compiled game will look at the source assets whenever it's run:
98
+
99
+
Sick of building the game just to see some asset change in the game? Simply add the following flag to your build command, and the compiled game will look at the source assets whenever it's run:
100
+
91
101
```
92
102
-DFLX_CUSTOM_ASSETS_DIRECTORY="assets"
93
103
```
104
+
94
105
Not only will this save time on dev builds in projects with many assets, but you can modify assets and see them in your game without recompiling.
95
106
96
107
### Automatically append sound file extensions
108
+
97
109
Define flag `-DFLX_DEFAULT_SOUND_EXT="ogg"` to allow sound asset ids to omit the extension. Useful when targeting multiple platforms that use different sound files. Can also use the flag to determine the desired sound extension, setting the flags value to "mp3" "wav" or "ogg" will use that extension. The default extension can be read via `FlxG.assets.defaultSoundExtension`
98
110
99
111
## Collision, Tilemaps and Tiles, Oh my!
112
+
100
113
Plenty of improvements, features and helpers have been added. Let's go over a few
101
114
102
115
### FlxTiles
116
+
103
117
- New dynamic `overlapsObject` method in FlxTile, can be extended or set to allow custom overlap detection for tiles whose hit shape is smaller than the tileGrid
104
-
- New `onCollide` signal, dispatched when overlaps are checked for collision reasons
118
+
- New `onCollide` signal, dispatched when overlaps are checked for collision reasons
- Overloaded various existing helpers to allow easier usage
110
125
- New `forEachOverlappingTile` method in FlxTilemap, to retrieve every tile that is overlapping the given object
@@ -117,12 +132,13 @@ Plenty of improvements, features and helpers have been added. Let's go over a fe
117
132
We also broke apart Flixel's collision tools into smaller parts that can be used to customize the collision of any FlxObject.
118
133
119
134
### Misc shout outs
135
+
120
136
-`FlxSave`: Allow custom handling of parsing errors ([#3286](https://github.com/HaxeFlixel/flixel/pull/3286))
121
137
- Gamepads: Add `acceptMode` and "mapped inputs" ([#3276](https://github.com/HaxeFlixel/flixel/pull/3276)) ([#3280](https://github.com/HaxeFlixel/flixel/pull/3280))
122
138
- Add `ACCEPT` and `CANCEL` input IDs that conditionally map to either `A` or `B` depending on `FlxG.gamepads.acceptMode`
123
-
- Add `gamepad.getMappedInput` to get an anum value of every possible gamepad input from various devices, i.e. `PS4(PS4ID.X)`
139
+
- Add `gamepad.getMappedInput` to get an enum value of every possible gamepad input from various devices, i.e. `PS4(PS4ID.X)`
124
140
-`FlxStrip`: Add support for blendmodes ([#3213](https://github.com/HaxeFlixel/flixel/pull/3213))
125
141
-`FlxBasePath`: A simpler FlxPath without all the BS([#3153](https://github.com/HaxeFlixel/flixel/pull/3153))
126
142
- Various FlxDebugger improvements
127
143
128
-
For more updates, follow HaxeFlixel on [BlueSky](https://bsky.app/profile/haxeflixel.bsky.social) or check us out on [Github](https://github.com/HaxeFlixel/flixel) and [Discord](https://discordapp.com/invite/rqEBAgF)!
144
+
For more updates, follow HaxeFlixel on [BlueSky](https://bsky.app/profile/haxeflixel.bsky.social) or check us out on [Github](https://github.com/HaxeFlixel/flixel) and [Discord](https://discordapp.com/invite/rqEBAgF)!
0 commit comments