Skip to content

Commit 37441d5

Browse files
authored
Merge pull request #284 from Bloodninj/fix-spelling
Fix minor spelling issues on HF 5.9.0 blog post
2 parents 8d8f143 + 66ee76a commit 37441d5

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

content/blog/18-Haxeflixel-5-9-0.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ layout: blog-post
44
postDate: "January 24, 2025"
55
---
66

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+
89
- A new FlxInputText to replace the old Flixel-UI.
910
- `FlxG.assets`, for customization to Flixel's asset management (hot-reloading!).
1011
- 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
1314
## When will Flixel 6 be released?
1415

1516
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:
17+
1618
```
1719
haxelib git flixel https://github.com/HaxeFlixel/flixel.git release6
1820
```
21+
1922
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.
2023

2124
## New and improved FlxInputText
2225

2326
Special thanks to [Starmapo](https://github.com/Starmapo) for completely redoing `FlxInputText` from the ground up! New features include:
27+
2428
- 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.
2529
- Double pressing on the text field will select the closest word at that position.
2630
- 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
4650
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!
4751

4852
## AssetFrontEnd
53+
4954
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+
5056
```hx
5157
public dynamic function getAssetUnsafe(id:String, type:FlxAssetType, useCache = true):Null<Any>
5258
```
5359

5460
Here are just a few neat uses for this:
5561

5662
### Simplifying asset paths
63+
5764
The above example that loads the hero sprite can be simplified to `sprite.loadGraphic("hero")`, like so:
65+
5866
```hx
5967
// Edit the simplified id before passing it to the old method
6068
function path(id:String, type:FlxAssetType)
6169
{
6270
// for flixel assets, just pass them to the old method
6371
if (StringTools.startsWith(id, "flixel/") || StringTools.contains(id, ':'))
6472
return id;
65-
73+
6674
return switch type
6775
{
6876
case BINARY: 'assets/data/$id'; // expects extension already'
@@ -87,24 +95,31 @@ assets.getAssetUnsafe = (id, type, cache = true)->oldGet(path(id, type), type, c
8795
```
8896

8997
### Hot-Reloading
90-
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+
91101
```
92102
-DFLX_CUSTOM_ASSETS_DIRECTORY="assets"
93103
```
104+
94105
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.
95106

96107
### Automatically append sound file extensions
108+
97109
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`
98110

99111
## Collision, Tilemaps and Tiles, Oh my!
112+
100113
Plenty of improvements, features and helpers have been added. Let's go over a few
101114

102115
### FlxTiles
116+
103117
- 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
105119
- Improved debug drawing
106120

107121
### FlxTilemaps
122+
108123
- Tons of new helpers: `getMapIndex`, `getRow`, `getColumn`, `getTileIndex`, `getTileData`, `tileExists`, `setTileIndex`, `getColumnAt`, `getRowAt`, `columnExists`, `rowExists`, `getColumnPos`, `getRowPos`, `getColumnPosAt`, `getRowPosAt`, `getTilePos`, `getTilePosAt`, `getAllTilePos`, `forEachMapIndex`, `getMapIndexAt`, `tileExistsAt`, `columnExistsAt`, `rowExistsAt`, `getTileIndexAt`, `getTileDataAt` and `setTileIndexAt`
109124
- Overloaded various existing helpers to allow easier usage
110125
- 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
117132
We also broke apart Flixel's collision tools into smaller parts that can be used to customize the collision of any FlxObject.
118133

119134
### Misc shout outs
135+
120136
- `FlxSave`: Allow custom handling of parsing errors ([#3286](https://github.com/HaxeFlixel/flixel/pull/3286))
121137
- Gamepads: Add `acceptMode` and "mapped inputs" ([#3276](https://github.com/HaxeFlixel/flixel/pull/3276)) ([#3280](https://github.com/HaxeFlixel/flixel/pull/3280))
122138
- 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)`
124140
- `FlxStrip`: Add support for blendmodes ([#3213](https://github.com/HaxeFlixel/flixel/pull/3213))
125141
- `FlxBasePath`: A simpler FlxPath without all the BS([#3153](https://github.com/HaxeFlixel/flixel/pull/3153))
126142
- Various FlxDebugger improvements
127143

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

Comments
 (0)