I am using Dwebgl, the lag mostly seems happen on animation and alpha, so I may just remove those for the html5 version of the game.
Posts made by MintPaw
Terrible performance in html5
I wasn't expecting amazing performance, but I can't seem to hold 30fps on a screen with 5 FlxSprites static on screen, granted some of them are 800x600 and one is animated, here's a snippet from the profiler. Any guess to what I should look into optimizing?
RE: need sprite to follow the path of the tiles but stay touching the tiles.
Check here, that won't compute gravity or anything, but you can have it give you a list of nodes to visit and figure gravity yourself.
RE: I can't set up Haxe
said in I can't set up Haxe:
This is most likely something set up with you Linux distro, some kind of permissions system you may have set up accidentally or boss/parent may have set up. If you post the full error message it can surely be fixed since haxe doesn't require root permission.
It's likely that you're trying to set up the lib directory in /lib, /opt, or /usr/share when you don't have permission. If you set it up in your home directory it should work fine, don't try sudo haxelib setup though, else you'll have future issues with the .haxelib file being created in /root rather that /home/username and will always have to compile with sudo.
RE: FlxCamera layering
But there's too much text to be displayed in the field alone, you have to scroll to reveal more text.
I've been trying to do this for months and made several post on the forums and on Github, there's no way to limit the amount of text visible in an FlxText field, not without extending it and changing it massively.
RE: Any way to get a world swipe start/end position?
FlxTouch seems to be missing the screenX, screenY, x, y different properties that are in the documentation
For simplicity, is there any reason you can't just subtract the screen values from FlxG.camera.scroll?
RE: FlxCamera layering
The actual text field is far off-screen, I've set up a second camera with a transparent background focused on it, but with its viewport on-screen so I can scroll the camera and give the appearance of a scrolling text field. More specifically, I'm using this implementation of scrolling areas.
The problem is now can't render sprites on top of the text because cameras are seemingly on top of all other objects.
Basically when I open some kind of menu it's displayed behind the scrolling text field, I guess I could offset the menu off-screen so it appeared on the scrolling text camera, but that's a pretty big change.
I've been trying to set up a scrolling text field for some time now and finally managed to do it by rendering it off screen and using a separate FlxCamera to render it in place, then scrolling the FlxCamera.
But I now realize that this is going to prevent anything from every being layered on the camera, if I had know that then I could of just used an openfl.text.TextField directly. How would I go about layering the FlxCamera within the states members? Looking at it, it looks like I might be able to use copyPixels or drawPixels to draw them onto an FlxSprite. Is that a reasonable thing to attempt? I'm worried about significant performance issues if I go down that route.
This if for the Flash target if that's relevant.