https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    05/27/2019, 11:35 AM
    yeah, at first i thought it was haxeui-flixel, but then i replaced the "crates" with a flxsritegroup with a single flxsprite in it, and it worked just the same (as in didnt work, or worked strange)
  • b

    bright-gpu-74537

    05/27/2019, 11:36 AM
    then i remove the flxspritegroup and used just a flxsprite and that was fine, then i changed (hacked) haxeui-flixel to use a base of Flxsprite (rather than a group) and that also worked "fine" then... in the sense it collided correctly
  • b

    bright-gpu-74537

    05/27/2019, 11:37 AM
    sure... just thought i would test it with something "flixely" and collision seemed like the best bet
  • b

    bright-gpu-74537

    05/27/2019, 11:37 AM
    but i guess there is something about flxspritegroup that is very different to flxsprite
  • b

    bright-gpu-74537

    05/27/2019, 11:39 AM
    or, more likely, something i wasnt doing - but the fact that without haxeui, and a flxspritegroup the demo didnt work as expected surprised me
  • q

    quick-king-64105

    05/27/2019, 2:32 PM
    If components are treated as flxsprites stored in an flxgroup, it should behave normally. Whether that's actually doable is beyond me.
  • q

    quick-king-64105

    05/27/2019, 2:32 PM
    That is, make haxeui components be flxsprites
  • q

    quick-king-64105

    05/27/2019, 2:32 PM
    Then group them together in a parent flxgroup
  • q

    quick-king-64105

    05/27/2019, 2:33 PM
    The biggest problem would be render but... flxsprite's dirty flag, plus adjusting its sprite/graphics, might work
  • q

    quick-king-64105

    05/27/2019, 2:33 PM
    The actual internals there are going to look a little strange.
  • q

    quick-king-64105

    05/27/2019, 2:34 PM
    (Also, I have no idea if that even works with HaxeUI's expected model, either.)
  • b

    brave-kangaroo-30399

    05/27/2019, 2:36 PM
    Components can have children though, so it makes sense for everything to be a group or sprite group
  • b

    brave-kangaroo-30399

    05/27/2019, 2:36 PM
    If it’s a group, the outcome will be super kha-ish, but that’s fine tbh, more lightweight than sprite group
  • b

    bright-gpu-74537

    05/27/2019, 2:38 PM
    also, keep in mind that my initial foray into the flixel collision demo didnt work with FlxSpriteGroup, but that doesnt mean it cant... its either a) a flixel bug b) a flixel design or c) something i did wrong... and i would be heavily leaning to "c"
  • b

    brave-kangaroo-30399

    05/27/2019, 2:38 PM
    That’s kinda what I’m expecting 😉
  • b

    bright-gpu-74537

    05/27/2019, 2:38 PM
    yup, me too 😃
  • b

    brave-kangaroo-30399

    05/27/2019, 2:39 PM
    If it does work, im gonna leave the structure alone for a bit before doing the FlxGroup kha style thing
  • b

    brave-kangaroo-30399

    05/27/2019, 2:39 PM
    I think there are other features to add over an internal structure thing
  • b

    bright-gpu-74537

    05/27/2019, 2:40 PM
    makes sense, i mean, the only issue i had with the group is it didnt work... ... but then... ... "c" 😃
  • b

    bright-gpu-74537

    05/27/2019, 2:41 PM
    i think set_x and set_y probably need to be override too... and there were some other "strangities" that i do think come from haxeui-flixel... but im sure you'll notice what i mean when you start playing with the collision sample
  • b

    brave-kangaroo-30399

    05/27/2019, 2:42 PM
    Oh wait
  • b

    brave-kangaroo-30399

    05/27/2019, 2:43 PM
    So you expect component.x to work the same as .left?
  • b

    brave-kangaroo-30399

    05/27/2019, 2:43 PM
    Cuz that for sure won’t work
  • b

    brave-kangaroo-30399

    05/27/2019, 2:43 PM
    I’m mid-travel so I haven’t checked the demo yet, but I’ll be home soon enough
  • b

    bright-gpu-74537

    05/27/2019, 2:45 PM
    well, again, my "expectation" is mainly just high level... in the sense that i would "expect" to be able to integrate haxeui into flixel, and in that respect flixel animates .x and .y
  • b

    bright-gpu-74537

    05/27/2019, 2:47 PM
    so in that collision demo, i would have expected that i could replace the "crates" with haxeui buttons (not hard - ignoring the FlxSpriteGroup thing) and then they collide, rotate and move... collide wasnt hard, move needed an override (which screwed up other things, but i think that could be fixed with a bit of maths in the override) and the rotate i think worked also
  • b

    bright-gpu-74537

    05/27/2019, 2:48 PM
    but yeah, im sure you'll see what i mean when you have a mess around... and you are no doubt in a better position to just be "yeah, well, x/y/z needs to happen in ComponentImpl"
  • q

    quick-king-64105

    05/27/2019, 3:52 PM
    Insofar as what Ian's describing, an FlxGroup of FlxSprites appears to achieve all the required checklist points. * It must have a drawing surface which it manages (FlxSprite manages that for individual components, and at a higher level FlxGroups manage that for their children) * It must have physics handled by the implementing system if any are present (physics apply to FlxSprites, and at a higher level physics interactions such as collision handling can be performed on FlxGroups) * locations should be co-integrated between HaxeUi and implementing backend (FlxSprites have an X/Y ; Groups are lacking parity here and would need additional work). It appears what is missing is an object which correctly composes itself of multiple FlxSprites in a way where it also, in turn, behaves exactly as an FlxSprite. This may explain why FlxSpriteGroup was chosen; it tries to do that (?) . A better alternative would be an implementation of a FlxGroup which contains the requisite behaviors, and specific implementations of specific entities may need to be reduced to single FlxSprites. (Should a button's text be a separate object from a button's background? Etc. kind of questions)
  • q

    quick-king-64105

    05/27/2019, 3:53 PM
    ... Always a reminder that my experience is old, and I may be wrong on specific details.
  • q

    quick-king-64105

    05/27/2019, 3:54 PM
    Ian, a concrete checklist may make it simpler for implementers to see where the best place, architecturally, to slot it in may be, if you have one in mind.
1...404142...1687Latest