this is apparently a newly discovered lime issue, with a fix underway. Will post info when I get it

Geokureli
@Geokureli
Posts made by Geokureli
-
RE: Struggling Framerate on Basic Html5 Game
-
RE: Struggling Framerate on Basic Html5 Game
Apparently if I set the framerate to 60, it runs at 60 on html, for some reason. I consider this a solution, but it raises more questions...
-
Struggling Framerate on Basic Html5 Game
I'm getting shitty framerates in a pretty simple game, I'm porting my old flash Flappy Bird clone to Haxe just to test some tools. IE: 320x512px (at 2x scale) game with a scrolling tilemap and 1 flx sprite
Flash stats:
Html5 stats:
What confuses me, is that html5 appears to have a significantly faster update and draw time, yet the FPS is never above 25. I tried -Dwebgl, any other advice?
Using latest chrome
flixel: 4.3.0 [git]
lime: 2.9.1 [6.4.0] git
openfl: 3.6.1 [8.3.0] git -
RE: HaxeFlixel forum broken on mac safari
Oh yeah, I had default on, it breaks when i change to something else. Chrome too
-
Ignoring requested haxelib "openfl" version "3.6.1"
I added <haxelib name="openfl" version="3.6.1" /> in my project.xml. I see this when I build:
Warning: Ignoring requested haxelib "openfl" version "3.6.1" (version "7.1.1" was already included) Please run 'haxelib set openfl 3.6.1' (Flixel is currently incompatible with OpenFL 4.0.0 or newer).
I have other projects that use latest openfl, and I don't want to keep setting my version back and forth via haxelib, how can I set this project to use 3.6.1 and still be able update my openfl version all willy-nilly for non-flixel projects?
Note: I have both 3.6.1 and 7.1.1 locally
-
RE: FlxReplay during normal gameplay
figured it out on stack overflow I can just extend FlxReplay to manipulate different inputs and use those to control the objects while FlxG.mouse and keys control my player.
package com.geokureli.testbed.misc; import openfl.display.Sprite; import flixel.input.keyboard.FlxKeyboard; import flixel.system.replay.FrameRecord; import flixel.input.mouse.FlxMouse; import flixel.FlxG; import flixel.system.replay.FlxReplay; import flixel.ui.FlxButton; import com.geokureli.krakel.State; /** * ... * @author George */ class TestAny extends State { var replay:Replay; public function new() { super(); } override public function create():Void { super.create(); replay = new Replay(new FlxKeyboard(), new ReplayMouse()); var replayData:String = "0\n"; var i:Int = 200; var order = [2,1,-1,0]; for (i in 0 ... 1000){ replayData += '${i}km100,100,${order[i % 4]},0\n'; } trace(replayData); replay.load(replayData); add(new FlxButton(50, 30, "test", function(){ trace("click"); })); } override public function update(elapsed:Float):Void { if (replay != null) { replay.playNextFrame(); if (replay.mouse.justPressed) trace("replay click"); if (replay.finished) { replay = null; trace("done"); } } super.update(elapsed); } } class Replay extends FlxReplay { public var keys (default, null):FlxKeyboard; public var mouse(default, null):FlxMouse; public function new (keys:FlxKeyboard, mouse:FlxMouse) { super(); this.keys = keys; this.mouse = mouse; } override public function playNextFrame():Void { if (_marker >= frameCount) { finished = true; return; } if (_frames[_marker].frame != frame++) return; var fr:FrameRecord = _frames[_marker++]; if (fr.keys != null) keys .playback(fr.keys ); if (fr.mouse != null) mouse.playback(fr.mouse); } } class ReplayMouse extends FlxMouse { public function new() { super(new Sprite()); } }
side question: why does FlxMouse have a private constructor?
-
FlxReplay during normal gameplay
I have a bunch of objects in my game that are controlled via FlxReplays. and they are preventing me from using the mouse and keyboard, I know that's supposed to be the point, but is there a way to play the next frame of replay and then revert to what they were before?
Example:
package com.geokureli.testbed; import flixel.FlxG; import flixel.FlxState; import flixel.system.replay.FlxReplay; import flixel.ui.FlxButton; class TestBed extends FlxState { var replay:FlxReplay; public function new() { super(); } override public function create():Void { super.create(); replay = new FlxReplay(); replay.load("0\n0km100,100,0,0\n100km178,240,2,0\n101km178,240,1,0\n102km178,240,-1,0\n103km178,240,0,0\n"); add(new FlxButton(50, 30, "test", function(){ trace("click"); })); } override public function update(elapsed:Float):Void { if (replay != null) { replay.playNextFrame(); if (FlxG.mouse.justPressed) trace("replay click"); if (replay.finished) { replay = null; trace("done"); } } // --- REVERT INPUTS HERE super.update(elapsed); } }
I'm unable to click the button while the replay is active. Im wondering if I could swap out the FlxG.inputs and FlxG.keys/mouse during all of the replays and then swap back the originals after. Or if I can target specific inputs for the replay to replay and use for that object, leaving the main player's inputs unaffected?