Is this the one you’re looking at?
Yes, at the same time I found out that Starling’s C++ version is far from the Openfl native version.
Far in what way? Very different? Better, worse? More features, less features?
More is the performance difference, Starling’s performance will be very weak on the Android platform of C + +, drawing 4 or 5 will consume a lot of CPU.
I understand that DOMElement is the new method, I just can’t figure out how to implement it, particularly without more complete documentation.
If I simply replace DOMSprite with DOMElement it throws an error when trying to use with IFrameElement…
js.html.DOMElement does not have a constructor
Emmm, I am using Android Studio to modify some information, such as AndroidMainifest.xml and the main activity of the code, as long as I run a Command + Shift + B compiler, everything will disappear. How to correctly modify or extend your own Android project?
Do you mean that the OpenFL native output is much slower than the C++ version of Starling (I forget what it is called) or that it is faster? Android is very different than desktop in performance, but there already are large projects using OpenFL Starling/C++ successfully
It sounds like there is an import conflict, perhaps you could use the in
keyword for your imports
import openfl.display.DOMElement in OpenFLDOMElement;
import js.html.DOMElement;
...
var element = new OpenFLDOMElement ();
You can also use openfl.display.DOMElement
instead of using an import
You would have to override your template.
Lime and OpenFL have templates
directories. This works like a class path. You can add your own templates
directory, and the tools will allow you to override individual files from OpenFL or Lime, such as your AndroidManifest.xml.
Add <template path="templates" />
to your project.xml, and a “templates” directory (you can also put it in a different place in your project structure, if you prefer).
Look at the Lime templates directory structure and mirror it in your own, until you override the file you want. For example, “templates/android/MainActivity.java”
I’m very sorry, I mean Openfl’s native performance will be faster, Starling is slow.
Thank you!
Excellent, yes that works, didn’t spot import openfl.display.DOMElement as an option, was still working with the js route
Was Neko ridiculously sped up? I think I am getting 3x the fps when testing my project.
Why HTML5 fonts are particularly vague?Is there a way to make it look clear?
If you were using Tilemap
or drawTriangles
, then yes
I believe this is a general HTML5 issue. We use webfonts, and canvas text APIs to render. You could use bitmap fonts, or perhaps there are other ways to make it behave better, like generating a different version of a webfont, or disabling CSS scaling of your project in your output HTML. There should be other topics here on the forums as well about <window allow-high-dpi="true" />
This is very useful.
I encountered a very strange phenomenon: In the case of an FPS of 60, moving the stage object will cause some jitter. Is this correct?