So how to run openfl in hybrid mode and difference between hybrid and next

Hello in one of reply to my question i had been asked if i run in legacy mode or hybrid, to be truthful i was not sure about what it mean until i read few thing about it, currently i had upgraded haxe with haxe upgrade so it should be newest version of all libraries i use (haxeflixel, openfl) so i tried to run my main project in haxeflixel in hybrid mode but it shows errors (by adding -Dhybrid to windows target) after reading on net and not founding any answer to it i decided to create new openfl project and tried to run both (with and without -Dhybrid) targets with empty projects and i’m still see an errors with Dhybrid although if it is a true what documentation said the openfl 3.9 should run by default in hybrid mode so i’m not understand something here.

So my question how to i check in what mode openfl compile since it’s probably somewhere overwrite the default openfl setting but since in empty projects i only have openfl and lime so i’m lost.

BTW. the errors running in hybrid mode are:

cmd: “i:\HaxeToolkit\haxe/haxelib” run lime build “project.xml” windows -Dhybrid -release -Dfdb
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/net/URLLoader.hx:274: characters 16-34 : openfl.utils.ByteArray has no field readFile
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/net/URLLoader.hx:353: characters 34-48 : openfl.utils.ByteArray has no field asString
Export/windows/cpp/haxe/DefaultAssetLibrary.hx:498: characters 7-27 : Type not found : lime.utils.ByteArray
I:/HaxeToolkit/haxe/lib/lime/2,9,0/lime/Assets.hx:37: lines 37-883 : Defined in this class
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/display/BitmapData.hx:556: characters 2-18 : openfl.utils.ByteArray has no field checkData
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/display/BitmapData.hx:595: characters 3-19 : openfl.utils.ByteArray has no field setLength (Suggestions: set_length, get_length)
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/display/BitmapData.hx:672: characters 3-19 : openfl.utils.ByteArray has no field setLength (Suggestions: set_length, get_length)
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/utils/ArrayBufferView.hx:68: characters 2-18 : openfl.utils.ByteArray has no field bigEndian
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/utils/ArrayBufferView.hx:71: characters 10-24 : openfl.utils.ByteArray has no field getData
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/utils/Float32Array.hx:119: characters 2-18 : openfl.utils.ByteArray has no field setLength (Suggestions: set_length, get_length)
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/gl/GL.hx:918: characters 81-101 : openfl.utils.ByteArray has no field getByteBuffer
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/_legacy/gl/GL.hx:918: characters 129-144 : openfl.utils.ByteArray has no field getStart
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:228: lines 228-777 : Field endian has different type than in openfl._legacy.utils.IDataOutput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:228: lines 228-777 : openfl.utils.Endian should be String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : Field get_endian has different type than in openfl._legacy.utils.IDataOutput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : Void -> openfl.utils.Endian should be Void -> String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : openfl.utils.Endian should be String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : Field set_endian has different type than in openfl._legacy.utils.IDataOutput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : value : openfl.utils.Endian -> openfl.utils.Endian should be value : String -> String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : openfl.utils.Endian should be String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:605: lines 605-615 : Field writeBytes has different type than in openfl._legacy.utils.IDataOutput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:605: lines 605-615 : bytes : openfl.utils.ByteArray -> ?offset : UInt -> ?length : UInt -> Void should be bytes : haxe.io.Bytes -> ?offset : Int -> ?length : Int -> Void
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:605: lines 605-615 : openfl.utils.ByteArray should be haxe.io.Bytes
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:228: lines 228-777 : Field endian has different type than in openfl._legacy.utils.IDataInput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:228: lines 228-777 : openfl.utils.Endian should be String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : Field get_endian has different type than in openfl._legacy.utils.IDataInput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : Void -> openfl.utils.Endian should be Void -> String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:763: lines 763-767 : openfl.utils.Endian should be String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : Field set_endian has different type than in openfl._legacy.utils.IDataInput
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : value : openfl.utils.Endian -> openfl.utils.Endian should be value : String -> String
I:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/utils/ByteArray.hx:770: lines 770-774 : openfl.utils.Endian should be String

so what i see is that openfl try to use legacy version even if it has hybrid parameter.

So I still need help with running hybrid mode (or in other words v3) since to be truthful i begin a new project in openfl with addition of haxe ui, which will use mix of movieClips and sprites (basically movieClips for animations up to few characters and rest will use sprites(like world map)) but the problem is even if i compile without any parameters it’s still some classes reads from _legacy (like Lib where it use version from legacy), also if i add movie clip to scene it will slow down (to 5fps from 60 whilst with moving MovieClip on -legacy version drops to about 30-40 depends on target) so my hint is that openfl doesn’t support moving movieClips since even on legacy adding 10 movieClips without moving them slows down application to 5 fps, so is there a way to improve fps when we have multiple movieClips on screen?? (Like in flash i read that it can support about 50 movieClips without any problems with drastically dropped fps). Maybe it’s need some changes in project.xml, or in haxe settings. To be truthful maybe version downloaded by command haxe upgrade isn’t the best for me, so any way to get stable version of newest openfl??(Or give me a revision from github which is stable).

And again how to run a v3 openfl?? I ask because it was answered in my other topic that a renderer is better in v3, so i believe that it’s something wrong with my installation since for me it runs slow without any parameters (and with -Dhybrid it shows a problem in legacy libraries)

Legacy is the old version of lime, next is the new one.
And hybrid is between the two, it’s the api of legacy but running on the code of next.

I wouldn’t recommend using it, if you need the old api use legacy otherwise use next.

Several framework (like haxeflixel, haxepunk, haxeui) make legacy the default because they’re not fully compatible with next.

I see thanks for clearing things about difference in version, i thought the next was something between the old version and new and hybrid was new one, but since you said otherwise it explain why i have a problems with running hybrid since probably it wasn’t a complete product (although i only think that because i don’t think something in middle is good thing either make a new better one or just keep updating old one, something which mix new and old one feels like it was made to help with promotion of new version).
As for haxe ui i saw that it set legacy version in it’s xml but i’m yet to try run it with next since i thought the hybrid one mode was the newest one (and to be truthful the haxe ui has components that i would love to see in my game (like list views etc.) since i try to make turn based 4X strategy.
As the remaining question is why rendering movie clips on -next version is so terrible slow i mean movieclip wasn’t even animated so it shouldn’t slow down so much (And to be truthful i plan to make game compatible with all desktop system and with flash (but this version will not allow modding) so i test on windows target).

Are you using a lot of .graphics draws?

No i don’t do any graphics.draw yet it’s a movieclip that it’s made in flash (currently only single frame since i’m yet to create any animation) but the problem might lies that it has nested movieclips (which also are single frame) to be truthful i plan to add morpher to characters so i would use draw with displayobject data but i believe it should be faster than making draw command for every curve (it’s something that i read for flash but i believe that it should be truth also here). To be truthful i think it’s something with base function for vector drawing since in legacy which should be worse it runs faster (although still frame goes down to 30-40 for one movie clip from 60), also the vector drawing in new version is graphic or cpu based calculation?? Since i have amd radeon it might be problem with hardware.

Ahh one thing define a “lot” it’s 10, 100, 1000 … calls since to be truthful i want to know how complicated shapes it can support?? (Also how it’s read movieClip it’s get by flash read display data?? if yes it might be a problem with flash creating more information than needed to draw shape (I said probably in other topic that 10 anchor path, after retrieve data by method i get about 25-30 anchor points even though currently it’s the most complicated shape on my movie clip but if we add all shapes on mc we would get paths with about 500 anchor points (since for simple calculation i would say that anchor points are tripled, but maybe for less anchor points it’s create more additional data so it might be even more).

Legacy has support for sprite.graphics (which basic primitives in Flash will use) in hardware, but it is not accurate compared to our new code, however, we use software always on the newer code, so it depends on how often it needs to redraw for how expensive it is