Skip to content

Flixel 5.0.0 Migration guide

George Kurelic edited this page Jun 1, 2022 · 23 revisions

Flixel 5.0.0 is the first major update to flixel since 2016. Since then, we've added many new features without messing up existing games but if you want to make a great game engine, you need to make a few breaking changes. In order to keep major version updates to a minimum, we ended up stock-piling a large list of fixes and features. This guide will help you utilize them in your existing Flixel 4 games.

How to Migrate

  1. If you're project is using an older version than 4.11, it might be a good idea to try 4.11 before 5.0
  2. [Talk about the beta, if we end up having a beta]
  3. Be sure to check out the changelog for a quick overview of every change that was made

FlxVector is Dead, All Hail FlxPoint #2557

It seemed silly to have 2 separate 2d position classes, so we took every method in FlxVector and moved them all to FlxPoint. FlxVector Still exists, but it's been reduced to a deprecated typedef of FlxPoint. Not many devs knew FlxVector existed, so hopefully this will expose more devs to cool features like length and degrees getter/setters, or math helpers like dotProduct and bounceWithFriction.

As a bonus, we've also added math operators, like +, +=, -, -=, * and *=.

Angles at 0˚ Point Right, Not Up #2482

There used to be some inconsistencies regarding angles, almost every math utility would point right at 0 degrees, but not everywhere. Notably FlxSwipe and FlxPath treated 0 degrees as up. If you're using a FlxPath on a sprite with autoRotate enabled, you'll need to change your sprite to face right at 0 degrees. (actually wait, I should make an offset property to solve this more easily)

Clone this wiki locally