Skip to content
AdamAtomic edited this page Sep 13, 2010 · 62 revisions

I’m going to try and document the API changes and bug fixes for each release on this page. I may miss whole releases occasionally, especially if they just have bug fixes or something, but hopefully most of the major stuff will be accounted for here. TLDR: it’s a change list!

v2.43 (currently on dev + beta)

> various minor fixes

v2.42 (currently on dev + beta)

> FlxTilemap.overlapsPoint() actually works now
> hopefully fixed bugs with FlxObject.overlapsPoint()
	- and by extension with FlxButton + scrolling
> experimental mouse wheel support
> simplified the random numbers interface
> reorganized some quad tree stuff a bit

v2.41 (currently on dev + beta)

> dev console now just traces frame timing if FlxG.mobile == true

v2.40 (currently on dev + beta)

> fixed another stupid bug, this time with non-solid tilemaps and their bounding boxes

v2.39 (currently on dev + beta)

> fixed stupid bug in preloader wooooops

v2.38 (currently on dev + beta)

> Don't have to "Force" an animation to play() if it is both not looped AND finished
> Optimized rotatePoint() and getAngle() with non-trig shortcut maths
> NEW FUNCTION - FlxObject.hitSide()
	- called by BOTH hitLeft() and hitRight()
	- shortcut since horizontal collisions usually share logic
	- can still override hitLeft() or hitRight() independently
	- MAY CAUSE FUNNY BEHAVIOR IN GAMES THAT PREVIOUSLY ONLY OVERRODE hitLeft()
		> Don't forget to call super.hitSide() and not super.hitLeft()
> FlxEmitter.createSprites() has new parameter "Bounce"
	- automatically assign a bouncing behavior to particles
	- uses new class org.flixel.data.FlxParticle
> Various general optimizations (should help with mobile versions)
> FlxTileblock extends FlxSprite now
	- has new function loadTiles()
	- can still call loadGraphic() but has less options
	- render times drastically improved (Mode dropped from 3ms to 0ms)
	- supports rotation, scaling, tinting, etc
	- implicit support for non-square tiles too
> FlxG.mobile - flag this to disable non-mobile features
	- currently only disables some stage events and the sound tray
> FlxButtons can no longer be pressed while game is paused
	- set FlxButton.pauseProof to true to work while paused
> Fixed annoying problems with bounding boxes
	- sprites with offsets appear properly now
> FlxKeyboard has NUMPAD keys now
> FlxTilemap only renders when necessary
	- tiles are cached to a screen-sized buffer
	- only redrawn when the buffer can't cover the screen
> FlxU got some new color utilities!
	- FlxU.getColor() - generate a uint color from RGBA components
	- FlxU.getColorHSB() - generate a uint color from HSB components (thanks, trashpaint!)
	- FlxU.getRGBA() - return an array of RGBA values from a uint color
	- FlxU.getHSB() - returns an array of HSB values from a uint color
> hopefully made FlxU.random() a little safer
	- deprecated mutate() in favor of fixSeed()
	- BUT you can still mutate seeds like this: fixSeed(seed+mutator);

v2.37 (currently on dev + beta)

> Started adding support for shape drawing
> Added rudimentary gamepad abstraction
> Improved sprite animation code
> Fixed sprite overlap bug

v2.36 (currently on dev + beta)

> altered collision logic when fixed objects collide
	- if both objects are moving, treated as not fixed
	- if only one is moving, the static one stays fixed
	- if neither is moving, no collision
> FlxTilemap changes
	- pngToCSV is now imageToCSV()
	- all pngToCSV() functionality is in new function bitmapToCSV()
	- bitmapToCSV() works like imageToCSV() only with any bitmapData object
> improved/simplified bounding box stuff

v2.35

> FlxEmitter: smarter default delay value
	- 3 seconds for explosions
	- 0.1 seconds for streams
> FlxG.showBounds
	- set to 'true' to show bounding boxes
	- still misses some objects, re-toggling usually fixes
	- NO automatic hotkey for this option/behavior, but code is easy
		> if(FlxG.keys.justPressed("B")) FlxG.showBounds = !FlxG.showBounds;
> FlxU: changed default quad tree world size + position
	- now set to FlxG.width by FlxG.height at 0,0
> FlxSprite: optimized loadRotatedGraphic()
> FlxText: now supports non-embedded fonts

v2.34

>fixed focus lost/gained mouse cursor behavior
> trying out new movement update logic (more robust at low framerates)
	- see http://www.niksula.cs.hut.fi/~hkankaan/Homepages/gravity.html

v2.33

> New class!  FlxMonitor.as
	- Stores and averages a window of values
> FlxConsole updates
	- Developer console now shows millisecond timing
	  for a variety of processes
	- Game updates, game rendering, flash idle time, etc
> FlxG.framerate is a getter/setter now
	- Change SWF framerate at any time

v2.32

Stability patch, converted back to 60 FPS SWF using onEnterFrame instead of a Timer.

v2.31

Mostly bug fixes and optimizations - turns out it was unstable :(

v2.30

> Flex SDK 4 text compatibility resolved
> FlxG: new variables "framerate" and "frameratePaused"
> FlxGame: simplified render loop, framerates improved
> FlxGame: switched game loop to use a timer
	- browser plugin efficiency improved
	- AIR and Flash Player framerates improved
> FlxPanel: fixed bug where buttons weren't working right
> FlxPreloader: new variable "minDisplayTime"
	- optional, display preloader even if game is loaded/loads quickly
> FlxText: fixed "flat white rectangle" initialization problem
> FlxText: fixed documentation problem with ShadowColor variable
> FlxTilemap: fixed and optimized preCollide()
	- Not much of a framerate difference as far as I can tell
	- Corrected "walk off left side but hit right side" behavior
> FlxTilemap: added warning message to log if setCallback() is called
> FlxU: new functions startProfile() + endProfile()
	- Prints execution time to debug console with given label
	- Suggested Usage:
		var pf:uint = FlxU.startProfile();
		ExpensiveFunction();
		FlxU.endProfile(pf,"Expensive Function");
> FlxU: new variable quadTreeDivisions
	- controls granularity of quad tree

v2.23

> FlxSound changes/additions:
	- new variable 'playing'
	- new variable 'name'
	- new variable 'artist'
		> NOTE: these currently only work with streamed sounds!
> better volume hotkeys support on numpad keyboards
> better support for wrapped text
> FlxTilemap changes/additions
	- setTile and setTileByIndex perform simple bounds checking now
	- follow() has new parameter Border
		> specify more or fewer tiles to be visible around edge of map
		> handy for blocking things off or adding visual padding
> included some light game loop optimization
> fixed site locking in the preloader

v2.22

fixed bug in FlxObject.overlapsPoint(), updated FlxSprite and FlxButton accordingly

v2.21

worked on FlxGroup's helper functions a bit:
- new functions countOnScreen() and getFirstNull()
- all functions deal with null member array entries correctly now
  actually remove array entry if you hate messing with 'null' entries

v2.20

fixed bug with negative angles and the baked rotated sprites

v2.19

fixed bug where origin was only initialized for FlxSprite objects

v2.18

fixed bug in FlxSound.fadeIn() (referred to fadeOutTotal instead of fadeInTotal)

v2.17

v2.15 inadvertently broke FlxButton, because i'm an idiot!
fixed flxbutton and corresponding flxgroup bugs

v2.16

fixed bug in FlxTileblock.render() when creating tileblocks with "empties"

v2.15

fiddled with group-on-group collisions a bit more

v2.14

Bugfix for baked, rotated sprites being reloaded

v2.13

Minor changes to solveX/solveY to help with groups

v2.12

Minor changes to FlxEmitter (also fixed jets in Mode demo)
Attempted to correct group-based movement and collision behavior
Changed order of FlxEmitter.start() parameters - delay comes before quantity now!
New preloader, no more logo animation

v2.11

Removed moves=false defaults from all classes.
That was old code intended to help with the quad trees
but with doesn't matter nearly as much now.  User can
still opt to set moves=false if they want to automatically
bail on the sometimes-pricey updateMotion() calcs.

v2.00

I may have missed a few things, but this is the gist of it:

> NEW CLASSES:
	- FlxGroup (formerly FlxLayer), 
		> designed to functionally replace Layer and Array
			as a superior organizing element for flixel stuff!
	- FlxCore renamed to FlxObject
	- also FlxBlock renamed to FlxTileblock
	- FlxPoint, FlxRect
> FlxCore has all movement/physics code
	- FlxText+FlxTilemap+FlxEmitter+FlxSound+FlxGroup have full movement now
	- FlxEmitter variable name changes (minVelocity -> minParticleSpeed)
	- new variable wontMove skips automatic motion/physics updates
		> FlxTileblock, FlxTilemap, FlxText and FlxSound all default to true
> FlxSprite only adds display/animations
> FlxG split into FlxG and FlxU
	- FlxG has sound, input, camera scroll, logging, special fx
	- FlxU has trig + random helpers, collision stuff, etc
> FlxSprite has new variables frame, frameWidth, and frameHeight
	- formerly specificFrame(), _bw and _bh
	- also new variable onFloor
> Core functionality (updating motion, updating animation) can now be
	called outside of super.update() or super.render()
	- of most classes anyways, might have missed some?
	- should help with accessing buried functionality though!
> FlxStates should be created not in their constructor but
	in their new function FlxState.create()
> FlxEmitter extends FlxGroup now (formerly FlxLayer)
	- no more FlxEmitter.loadSprites() function
	- you have direct access to FlxEmitter.members and can use
		FlxEmitter.add() to add a new sprite
	- can still use FlxEmitter.createSprites() utility
	- supports baked sprite rotations
> FlxSprite has a new function, loadRotatedGraphic()
	- load in a sprite or frame of a sprite sheet
	- automatically create a baked, rotated sprite sheet
	- supports anti-aliasing
	- massive (10x+) speed increase over Flash rotation
> Dumped ALL collision functions in favor of some new stuff in FlxU:
	- FlxU.collide(FlxObject,FlxObject)
		> collides any two FlxObjects (including FlxGroups)
		> ORDER INDEPENDENT
		> works great with tilemaps!
		> calls solveXCollision/solveYCollision
	- FlxU.solveXCollision(FlxObject,FlxObject)
		> actually resolves a collision on the X axis only
	- FlxU.solveYCollision (obvious)
	- 99% of the time all normal people only need to use FlxU.collide,
		not call solveXCollision or solveYCollision directly.
	- FlxObjects have some weird new variables that help these functions work:
		> colHullX, colHullY, colVector, and colOffsets
		> also a new function FlxObject.preCollide()
		> see FlxTilemap() for some strange uses of colVector + colOffsets
> FlxConsole shows real framerate, not slowdown-adjusted number
> FlxMouse stores both world and screen coordinates now
> FlxButton extends FlxGroup now, fixed annoying scrolling bugs FINALLY
> FlxObject.overlaps rewritten to use proper screenspace coordinates
> Added BACKSPACE to FlxKeyboard
> Mouse cursor is a FlxSprite and member of FlxG.mouse now
> User sound preferences saved automatically
> FlxText has optional 1-px shadow (see Mode)

v1.54

Couple of bugfixes:
> Problems with the way FlxG allocated bitmaps and monitored the cache corrected
	- You can allocate unique bitmaps from files now (as advertised!)
> Bug with FlxLayer causing the pause screen to be offset oddly

v1.52

Various bugfixes
> new function FlxTilemap.ray()
> new variable FlxG.dilation (for slow motion!)

New documentation: FlxTilemap.ray & FlxG.dilation

v1.51

Massive documentation overhaul and minor bugfixes.

v1.50

fiddled with FlxSave some more
- new function FlxSave.bind() actually creates the save

v1.49

> Bug fixes to FlxCore and FlxSprite's
	.overlaps() and .overlapsPoint() functions
> FlxButton class checks for changes to its scrollFactor
	reference and updates its members now
> added FlxTilemap.getTileByIndex()
> modified FlxTilemap.loadMap() to accept tile height
	- optional extra parameter
	- collisions and rendering support differing
		widths and heights now too
> added FlxTilemap.overlaps()
	- just checks to see if the provided object
		overlaps any collision tiles
> modified FlxSave.write(), FlxSave.forceSave(),
	and FlxSave.erase() to return booleans
	- if flush fails an error is logged to console

v1.47

HOLY CRAP FLXTILEMAP UPDATE-A-THON

- FlxTilemap was updated to match the rest of
  the flixel library.  That is, it has a simple constructor,
  and then it's up to you to call FlxTilemap.loadMap()
- New variables!
	> FlxTilemap.auto
		- set this to FlxTilemap.AUTO or FlxTilemap.ALT
		  before calling loadMap() to auto-tile your environment
	> FlxTilemap.startingIndex
		- change the index of the first tile in your graphic
	  	- don't need dummy tiles anymore
	  	- change this BEFORE calling loadMap() (see below)
	> FlxTilemap.drawIndex
		- like the old constructor parameter
		- used for skipping dummy tiles
		- change this BEFORE calling loadMap() (see below)
	> FlxTilemap.collideIndex
		- all tiles above and equal to this tile
		  will react to collisions.
		- can be changed at any time!
	> FlxTilemap.ImgAuto & FlxTilemap.ImgAutoAlt
		- sample tilemaps you can use with the auto-tiler
		- nice for prototyping and stuff
- PNG parsing
	> similar to arrayToCSV(), you can call pngToCSV() now
	> pngToCSV() can scale up and/or invert a black and white
	  collision map (handy for mixing with the auto-tiling)
- Auto-tiling options
	> flixel has 2 auto-tiling modes, both based on
	  16-tile binary tiling systems.
	> the main mode (FlxTilemap.AUTO) has good support
	  for thin walls and floors, but doesn't draw
	  interior corners (good for platformers)
	> the alternate mote (FlxTilemap.ALT) can draw
	  interior corners but at the expense of thin walls
	  (better for top down/adventure games)
	> You can find auto-tiling templates in org/flixel/data/
		- autotiles.png
		- autotiles_alt.png
		- these correspond to the two auto-tiling modes!
- Combining the PNG parser and auto-tiler is really fun!!
	> load a PNG to auto-tile the walls, then load the SAME
	  png file inverted to auto-tile the floors
	> Also try generating arrays of 1s and 0s procedurally!
- setTile() and setTileByIndex() will re-assign tile values
  if the tilemap is set to auto
  	> just set auto to false after calling loadMap() if
  	  you want to change your map differently later!
- changed setTileCallback() to setCallback()
- new function getTile() is self-explanatory!

v1.46

Fixed bug where FlxState.bgColor was not properly initialized

v1.45

> FlxG.setBackgroundColor() replaced with static var FlxState.bgColor
> new function FlxState.preProcess()
> new demo - FlxBlur
> updated Mode source for new background color method
> misc optimizations to sprite rendering (trying to get all 'new's out of the main game loops)

v1.44

> new public variable FlxSprite.origin - defaults to sprite's midpoint but can be altered

v1.43

> Misc optimizations for post-processing system
> New function FlxSprite.unsafeBind() (don't use it, it is UNSAFE)

v1.42

> FlxTilemap tile sheet bug fix (line 191)
> New post-processing system!
	- see FlxState.screen and FlxState.postProcess()
	- new example project FlxBloom demonstrates basics
	- FlxSprite.pixels was changed to be a getter and setter
	- pixels is _pixels
	- _pixels is now _framePixels
	- updated FlxText accordingly
	- obviously we'll need some utility functions for other fx,
	but I wanted to get the basics up ASAP

v1.41

haha, there was a silly bug where the pause screen
would scroll with the level.  woops!  All fixed now.

v1.40

HOLY CRAP YOU GUYS THIS IS IT

Enjoy :D

> changed some more stuff from private to protected
> added in-line documentation to FlxSave class
> FlxLayer children take the layer's X and Y values and/or scrollFactor now
> Any sprites added to FlxEmitter automatically take FlxEmitter's scrollFactor
> WARNING!!  MASSIVE COMPILER ERROR APPROACHES!!
	- Heavily refactored some of the class constructors
	- They are much more portable to Objective C!
	- Affected classes include FlxBlock, FlxButton, FlxEmitter,
	  FlxGame, FlxSprite, FlxText, and FlxTilemap.
	 - Sucks, I know, but should be the only major refactor forever
> New function! FlxSprite.fill(Color:uint);
> FlxSound.proximity() has option to pan sound in stereo now
> override FlxGame.pause (a FlxLayer) to make your own custom pause screen
> disable default volume and pause keys with FlxGame.useDefaultHotKeys = false
> Updated FlxTeroids, FlxInvaders, and flx.py for flixel v1.40
> Fixed a rotational position bug in FlxTeroids

v1.37

> site locking via setting FlxFactory.myURL in Preloader.as
	- only works in release mode
	- this was annoying before because it would lock out your own computer!
> new class FlxSave is a simple save game utility
	- see Mode.MenuState's constructor for simple play count implementation
	- I have no idea what sorts of stuff we need in this class yet!!

v1.36

> new function! FlxG.changeBackgroundColor()
> fixed bug with non-flipped sprite sheets
> added support for tile sheets to FlxTilemap
	- updated Mode's alt play state to demonstrate

v1.35

> New sound system and sound class FlxSound
	- allows for MUCH more granular control over sound playback
	- loop any sound, not just the global music track
	- use FlxSound.proximity() to control sound volume by distance from a FlxCore object
	- use FlxSound.fadeIn() and FlxSound.fadeOut() to manually cross-fade different sounds
	- let FlxG create your sounds for you using FlxG.playMusic, FlxG.play and FlxG.stream
	- FlxG.playMusic will automatically store a looping, surviving sound in FlxG.music (similar to old system)
	- streaming audio from URLs now fully supported
> Improved and exposed pause controls
	- game can be paused very easily now using FlxG.pause variable
	- changed useDefaultSoundControls() function to useDefaultHotKeys variable
		> 'p' now defaults to 'pause' if using default hot keys
> flx.py
	- updated to suit v1.35 changes
> Mode, FlxInvaders and FlxTeroids should all compile against the new flixel build

v1.34

FlxSprites support sprite sheets now using rollover indices.
If you're using sheets, you NEED to specify the sprite's width if it's square,
and both width and height if it is not square.  This differs from sprite sheets,
where you can skip specifying the width altogether if the sprites are square.

v1.33

FlxCore has a destroy() function called by FlxLayer

FlxButton overrides this function to fix the event problem it was having

NOTE: I may have forgotten to properly label 1.33 in FlxG, my apologies!

v1.32

Fade, flash and collision bug fixes

v1.31

Update FlxCore.collideX() and FlxCore.collideY() to fix weird adjacent motion bug

v1.30

FlxArray
	- getRandom() wrongly refers to length, not A.length
	- class itself deleted and relevant functions moved to FlxG

FlxEmitter
	- use reset instead of manually setting X and Y during emit

FlxTilemap
	- callbacks/checks for specific tile indices etc
	- accessors for altering tilemaps on the fly

FlxG
	- FlxG.debug flag tells you if you're running a release build or not
	- debug console updated to automatically indicate debug vs release
	- calling follow sets the camera position but ignores boundaries

FlxPanel
	- support panel prints a reminder to the debug console if you try to show it before it's initialized

FlxSprite
	- new boolean 'antialiasing' controls quality of rotation
	- fixed problems with facing, randomFrame, specificFrame and calcFrame
	- facing is now a uint, with static consts for UP and DOWN

FlxText
	- now extends FlxSprite and caches to BitmapData
	- single lines of centered pixel text no longer blur

FlxCore
	- added new array collision functionality (is reverse from FlxG's array functions)
	- flicker forever bug fixed

General
	- documented all functions, stopped using Array.length in loops, and made most private variables protected