witty-island-52596
02/21/2023, 8:00 PMwitty-island-52596
02/21/2023, 8:00 PMkind-restaurant-65061
02/21/2023, 8:03 PMwitty-island-52596
02/21/2023, 8:06 PMwitty-island-52596
02/21/2023, 8:07 PMmammoth-plastic-35593
02/21/2023, 8:45 PMFlxBitmapFont
where it is just set to null instead of being put
into the pool (https://github.com/HaxeFlixel/flixel/blob/dev/flixel/graphics/frames/FlxBitmapFont.hx#L99)
Is that intentional? I'm basically doing a cleanup pass in my code base and noticing some of that in various flixel classes.kind-restaurant-65061
02/21/2023, 8:48 PMkind-restaurant-65061
02/21/2023, 8:48 PMkind-restaurant-65061
02/21/2023, 8:49 PMhallowed-holiday-15370
02/21/2023, 8:51 PMWidth * height
squares in your game? don't add new ones - just make the max you'll ever need, kill
them, and revive
them as neededkind-restaurant-65061
02/21/2023, 8:53 PMwitty-island-52596
02/21/2023, 9:46 PMkind-restaurant-65061
02/21/2023, 11:16 PMhx
package;
import flixel.FlxSprite;
import flixel.system.FlxAssets.FlxGraphicAsset;
class Tile extends FlxSprite
{
public var type:Int;
public var col:Int;
public var row:Int;
public function new(?X:Float = 0, ?Y:Float = 0, ?SimpleGraphic:FlxGraphicAsset, r:Int, c:Int, t:Int){
super(X, Y, SimpleGraphic);
row = r;
col = c;
type = t;
}
override public function update(elapsed:Float){
super.update(elapsed);
}
}
kind-restaurant-65061
02/21/2023, 11:17 PMhx
package;
import flixel.FlxState;
import flixel.FlxSprite;
import flixel.FlxG;
import flixel.math.FlxRandom;
import flixel.group.FlxSpriteGroup;
class PlayState extends FlxState
{
var tile:Tile;
var bg:FlxSprite;
var tilesMatrix:Array<Array<Tile>>;
var COLS:Int = 15;
var ROWS:Int = 15;
var xInit:Float;
var yInit:Float;
var z:FlxRandom;
var r:Int;
var w = 25;
var h = 25;
var mRow:Int;
var mCol:Int;
var matrix:Array<Array<Int>>;
override public function create()
{
super.create();
z = new FlxRandom();
yInit = FlxG.height/2-(h+1)*ROWS/2;
xInit = FlxG.width/2-(w+1)*COLS/2;
matrix = new Array();
tilesMatrix = new Array();
for(col in 0...COLS){
matrix[col] = new Array();
tilesMatrix[col] = new Array();
for(row in 0...ROWS){
r = z.int(0, 2);
if(r == 0){
tile = new Tile(xInit+(w+1)*col, yInit+(h+1)*row, "assets/images/yellow.png", row, col, 0);
add(tile);
matrix[col][row] = 0;
tilesMatrix[col][row] = tile;
} else if(r == 1){
tile = new Tile(xInit+(w+1)*col, yInit+(h+1)*row, "assets/images/red.png", row, col, 1);
add(tile);
matrix[col][row] = 1;
tilesMatrix[col][row] = tile;
} else {
tile = new Tile(xInit+(w+1)*col, yInit+(h+1)*row, "assets/images/blue.png", row, col, 2);
add(tile);
matrix[col][row] = 2;
tilesMatrix[col][row] = tile;
}
}
}
}
}
kind-restaurant-65061
02/21/2023, 11:22 PMwitty-island-52596
02/22/2023, 1:01 AMwitty-island-52596
02/22/2023, 1:01 AMsquare-angle-35096
02/22/2023, 1:05 AMsquare-angle-35096
02/22/2023, 1:05 AMwitty-island-52596
02/22/2023, 1:06 AMsquare-angle-35096
02/22/2023, 1:06 AMwitty-island-52596
02/22/2023, 1:07 AMwitty-island-52596
02/22/2023, 1:08 AMsquare-angle-35096
02/22/2023, 1:08 AMsquare-angle-35096
02/22/2023, 1:08 AMwitty-island-52596
02/22/2023, 1:08 AMwitty-island-52596
02/22/2023, 1:09 AMsquare-angle-35096
02/22/2023, 1:09 AMsquare-angle-35096
02/22/2023, 1:09 AMhallowed-ocean-84954
02/22/2023, 4:48 AMlime test hl -debug
and it's fine. Go back to vscode and build and it's still wrong. I hit this with HaxeUI intermittently - still haven't found the cache - usually just blowing away Exports/hl is enough but that doesn't explain how powershell is getting clean builds. Unless that cleans the relevant cached bits too. Actually just clean the export and it still built incorrectly so that ain't it.