https://linen.dev logo
Join Discord
Powered by
# flixel
  • e

    elegant-twilight-61392

    02/20/2023, 4:50 PM
    it can be hard to read when people type like this
  • w

    witty-island-52596

    02/20/2023, 4:51 PM
    Copy code
    hx
    titlestatebg = new FlxBackdrop(Paths.image('GameAssets/harharhar'));
    title.scrollFactor.set(0.2, 0);
    titlestatebg.velocity.set(200, 110);
    titlestatebg.updateHitbox();
    titlestatebg.screenCenter(X);
    add(titlestatebg);
  • e

    enough-lawyer-1858

    02/20/2023, 4:51 PM
    I don't think so it looks fun enough l m a o
  • g

    great-oyster-61535

    02/20/2023, 4:51 PM
    no
  • w

    witty-island-52596

    02/20/2023, 4:51 PM
    that's more christopher walken than shatner
  • s

    swift-hospital-19424

    02/20/2023, 4:52 PM
    thank you, my head was hurting with everything for the past 2 hours trying to fix this
  • w

    witty-island-52596

    02/20/2023, 4:52 PM
    just look at the constructor args
  • w

    witty-island-52596

    02/20/2023, 4:52 PM
    they say what they do
  • s

    swift-hospital-19424

    02/20/2023, 4:52 PM
    yeah
  • a

    able-printer-41379

    02/20/2023, 6:25 PM
    is there a way to use setPixel32 on flxsprites without causing any lag
  • h

    hallowed-holiday-15370

    02/20/2023, 6:47 PM
    Not really. If you are changing a ton of pixels it's going to be slow. You can try using other methods like
    copyPixels
    , etc to do larger pieces of an image instead of 1 pixel at a time. https://books.openfl.org/openfl-developers-guide/working-with-bitmaps/copying-bitmap-data.html
  • s

    shy-wire-69404

    02/20/2023, 6:47 PM
    use a shader maybe?
  • a

    able-printer-41379

    02/20/2023, 6:51 PM
    im mainly doing this to invert an image
  • a

    able-printer-41379

    02/20/2023, 6:51 PM
    using pixels
  • w

    witty-island-52596

    02/20/2023, 6:51 PM
    second time you've brought up setPixel32 as if it's the only bitmap manipulation tool
  • w

    witty-island-52596

    02/20/2023, 6:51 PM
    tell us your goal
  • a

    able-printer-41379

    02/20/2023, 6:51 PM
    ^
  • h

    hallowed-holiday-15370

    02/20/2023, 6:51 PM
    if the image is large, it is inherently slow.
  • w

    witty-island-52596

    02/20/2023, 6:51 PM
    i would use a shader
  • h

    hallowed-holiday-15370

    02/20/2023, 6:51 PM
    I think I've done it with another method, though, that wasn't slow.
  • h

    hallowed-holiday-15370

    02/20/2023, 6:52 PM
    let me see if I can find it
  • w

    witty-island-52596

    02/20/2023, 6:52 PM
    or color transform maybe?
  • w

    witty-island-52596

    02/20/2023, 6:52 PM
    there also bitmap locking
  • a

    able-printer-41379

    02/20/2023, 6:52 PM
    yep already did that
  • a

    able-printer-41379

    02/20/2023, 6:52 PM
    still laggy
  • a

    able-printer-41379

    02/20/2023, 6:52 PM
    im not sure of that
  • a

    able-printer-41379

    02/20/2023, 6:53 PM
    since inverting is substracting the color from white and setting the alpha back to the color's alpha value
  • w

    witty-island-52596

    02/20/2023, 6:53 PM
    can you share what you tried
  • w

    witty-island-52596

    02/20/2023, 6:55 PM
    and the images dimensions
  • h

    hallowed-holiday-15370

    02/20/2023, 6:55 PM
    ah no I'm remembering incorrectly - I used ColorMatrix to do greyscale...
1...946094619462...9809Latest