Congrats on the promotion, Richard!
boy will I look like a fool if you end up being a robot...
Congrats on the promotion, Richard!
boy will I look like a fool if you end up being a robot...
@jgedri said in Int must be Bool:
To that end, I wrote a function to check the value of currentRoom, which can apparently only be a boolean if I want to use it with FlxOgmo3Loader
What exactly do you mean by this? is this a property you are trying to add in the editor for a level or a restriction when using the code FlxOgmo3Loader? I'll need more info to help
Things are getting pretty out of hand, quickly. I see one of them (marysmith) was banned this past month, so I assume there are mods/admins here that are active. I don't know who the mods are but I want to start a discussion about the future of this forum.
I recommend Richard Bray be upgraded to Mod status, since he's pretty active here and seems to not be a robot. Also, we may want to consider some bot protection, perhaps a captcha at signup (recommended by lorb)
TBH I forget this forum exists, and will hopefully start checking more frequently, but perhaps we should have a bot that posts new threads in the Haxe Discord's #flixel channel? This forum is likely a front-line way of helping haxeflixel newcomers, and it seems neglected. Fixing it up could improve onboarding to our fabulous, welcoming community
this is apparently a newly discovered lime issue, with a fix underway. Will post info when I get it
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...
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
Oh yeah, I had default on, it breaks when i change to something else. Chrome too
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
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?