Hmm, I’m not sure exactly what render case you are hitting (perhaps something about alpha plus colorTransform or vector graphic rendering?)
…but alpha should apply to children, say you have a big parent sprite and you set it’s alpha to 0, it should make the sprite (and all its contents) invisible at once
it was a name clashing, there was a class that inherited from display object and implemented a alpha variable plus setters and getters that was actually only meant to be used for drawing a alpha-ed rectangle. But OpenFL used this alpha for rendering too.
I have a very important question, does anyone have any hints how to debug memory usage in browser? The game starts with 400-500MB and after playing a while it can gain 2GB or even more.
Any hints? What is important to know for memory management with OpenFL in browser?
@singmajesty Will try to debug memory usage later.
The game seems to be pretty much completely ported now. The only problems I see now are memory usage and those textfield input bugs, which means that some of them do not accept input.
Any hint regarding those textfields? Can we somehow collaborate on that?
Well there are some minor things that I still have to do. But the biggest parts are done.
E.g. what I found out a hour before is that I have to convert chat server to use WebSocket protocol or is there any support of having sockets using TCP without WebSocket protocol?
Initiate client from dynamic data. We used flash vars for that with flash version. Is there any equivalent in OpenFL?
Well this week I will set up a test server and then the bug hunting and fixing can begin
1.) You will need to use WebSockets, unless you use a hidden Flash Player plugin, but that is increasingly not possible to do, and eliminates the purpose of porting for HTML5 to begin with
I believe the big differences with WebSockets is handling the handshake (to confirm that web sockets are available) and you do not have full control over data frame sizes, you may also need CORS headers, depending on how it is accessed.
2.) We should support Flash variables, if you add them to your embed script. That’s what the parameters: {} object is in our default embed, it should populate loaderInfo.parameters similar to Flash
A test case would be great, please publish it, or send privately if you need it to be private, or prefer
I just send you a test case for those textfield issues.
I will try the flash vars equivalent tomorrow. Thank you for the tip.
Yes. I will have rewrite the chat server a bit to be WebSocket compliant.
Is there a way to tell OpenFL/HTML5 from where to load its assets stuff?
I am setting up the game start up process. For some reason I have not 100% the same folder structure like the default.
You can specify { rootPath: "path/to/assets/root" } in your HTML embed script, if this is a runtime issue. Otherwise you can customize the project.xml if it’s a compile-time issue
Initializing project…
Using project file: project_tutorial.xml
Reading Lime config: /Users/andreas/.lime/config.xml
Using target platform: HTML5
Running command: UPDATE
Warning: Could not find template file: default/icon.svg
Warning: Could not find icon path: null
Warning: Could not find template file: html5/template
Warning: Could not find template file: haxe
Warning: Could not find template file: html5/hxml
Running command: BUILD
Running command: haxe Export/html5/haxe/debug.hxml
Error: Could not process argument Export/html5/haxe/debug.hxml (file not found)
Package name must start with a lower case character
Andreass-Air:pirates_code_hx andreas$
There is no package with unusual char or something.
another question. There is no support for Linux-ARM right? I installed Haxe/OpenFL on a pretty capable ARM computer but compiling the project fails due to:
Uncaught exception - Could not find NekoAPI interface.
…
Uncaught exception - load.c(237) : Failed to load library : lime.ndll (lime.ndll: cannot open shared object file: No such file or directory)
We assume right now that we’re using Linux x86 or x64, unless you use A.) a source version of Lime and B.) run lime rebuild linux -rpi, but that also tries to link the Raspberry Pi graphics libraries instead of using X windows.
I’m sure it would be possible to improve our Linux platform code, though, to add support for ARM. It looks like we properly choose the correct default architecture, based on your host architecture, but there are some assumptions in our tooling that would have to be tidied a little:
Changes to this file are possible if you lime rebuild tools, then run again. Happy to help, but I don’t have a Linux ARM OS to test on at the moment