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

    elegant-twilight-61392

    12/21/2022, 5:14 PM
    if you want to only show it if itll be visible, you want to know if the current aspect ratio of the window matches your game or not
  • a

    able-printer-41379

    12/21/2022, 5:16 PM
    besides the window stuff, does a sprite have a variable that makes it not change positions when the window's size has changed
  • e

    elegant-twilight-61392

    12/21/2022, 5:16 PM
    youll have to do that yourself
  • e

    elegant-twilight-61392

    12/21/2022, 5:17 PM
    "makes it change position" in what way? you have to define that yourself
  • a

    able-printer-41379

    12/21/2022, 5:18 PM
    not really change positons, the x stays the same but the sprite moves to the right whenever it changes the size
  • a

    able-printer-41379

    12/21/2022, 5:18 PM
    which is really a problem cause then it'll cover the whole game
  • r

    rhythmic-caravan-3597

    12/21/2022, 5:19 PM
    @able-printer-41379 Forgot to ask! Is your original problem with the maximization and such resolved or is there still issues with it?
  • a

    able-printer-41379

    12/21/2022, 5:20 PM
    i'll probably not use that method cause the main problem is the sprite's positions
  • e

    elegant-twilight-61392

    12/21/2022, 5:20 PM
    https://github.com/LeotomasMC/chroma-fighters/blob/main/source/DebugDisplay.hx#L487-L491 i think this is similar to what you want
  • a

    able-printer-41379

    12/21/2022, 5:21 PM
    thanks! i'll try it
  • r

    refined-flag-94330

    12/23/2022, 12:23 AM
    Do any of you know how to draw a MovieClip object onto a BitmapData object from the top left and not center
  • r

    refined-flag-94330

    12/23/2022, 12:24 AM
    Here is my code
    Copy code
    var clip = Assets.getMovieClip ("player:");
    var bitmapData = new openfl.display.BitmapData(Std.int(clip.width), Std.int(clip.height),true);
    bitmapData.draw(clip);
  • c

    curved-tiger-81069

    12/23/2022, 2:23 AM
    is there any haxelibs that arent
    haxe-gif
    that also load and play gifs?
  • c

    curved-tiger-81069

    12/23/2022, 2:24 AM
    since from what i have tried i cant seem to get a gif to load without removing the part that throws the error, and even when doing that one of the two gifs i tried was slower than normal
  • r

    refined-laptop-39041

    12/24/2022, 1:43 AM
    format
  • r

    refined-nail-22981

    12/24/2022, 9:32 AM
    hey guys! I was trying to install https://github.com/openfl/starling but I am getting this error ?
    Copy code
    haxe
    @MacBook-Pro StarlingProject % npm install -g yo starling-framework-generator
    npm ERR! code E404
    npm ERR! 404 Not Found - GET https://registry.npmjs.org/starling-framework-generator - Not found
    npm ERR! 404 
    npm ERR! 404  'starling-framework-generator@*' is not in this registry.
    npm ERR! 404 
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/mymac/.npm/_logs/2022-12-24T09_27_26_612Z-debug-0.log
  • h

    hallowed-ocean-84954

    12/24/2022, 7:23 PM
    Don't know about the npm install but if you have no particular reason for using js you could try the haxelib version
  • s

    sticky-electrician-40291

    12/25/2022, 7:56 PM
    good morning, is anyone here familiar with the away3d library?
  • e

    elegant-twilight-61392

    12/25/2022, 8:11 PM
    if you have a question about it, just ask it
  • e

    elegant-twilight-61392

    12/25/2022, 8:12 PM
    dontasktoask.com
  • s

    sticky-electrician-40291

    12/25/2022, 8:20 PM
    fair
  • s

    sticky-electrician-40291

    12/25/2022, 8:21 PM
    if anyone here is knowledgeable, how does someone get away3d to render a simple cube?
  • s

    sticky-electrician-40291

    12/25/2022, 8:22 PM
    i see a lot of stuff in the examples, but it's mostly more complex stuff like particles, skyboxes, and the likes
  • c

    curved-tiger-81069

    12/26/2022, 1:48 AM
    heya so i was reading up stuff to try using format to read gifs but from all i can understand the only way to use it would be using
    sys.io.File.read()
    since it returns an
    Input
    object, is there a different thing that returns the same thing since iirc
    sys.io.File
    doesnt work on html5 (do correct me if im wrong tho)
  • h

    hallowed-ocean-84954

    12/26/2022, 4:07 AM
    openfl Assets will read files - probably getBytes is what you want - never tried format so I don't know what input type it wants
  • c

    curved-tiger-81069

    12/26/2022, 4:08 AM
    Input
    as in haxe.io.Input https://api.haxe.org/haxe/io/Input.html
  • h

    hallowed-ocean-84954

    12/26/2022, 4:14 AM
    hmmmm... so probably some path via BytesInput and load bytes into that - but I've not quite figuring out how
  • h

    hallowed-ocean-84954

    12/26/2022, 4:33 AM
    yeah so this is gonna be a bit ugly. There is a recipe in this post . You'll have to create a Bytes object of the right size and iterate over the ByteArray returned by Assets.getBytes() and copy them over. I don't know how well this works given that that Bytes.set() takes an Int but the post above suggests it did work when they tried it. Once you have the Bytes object should be able to give that to BytesInput() and then you can pass that to the format code. Or at least that's one possible route. I have not tried it, but if I had to do it that's what I'd try.
  • h

    high-magician-37091

    12/30/2022, 9:16 AM
    is cacheAsBitmap still used? I tried calling this method, and my game crashes
  • e

    enough-lawyer-1858

    01/01/2023, 3:53 AM
    Ive got a question, how do you draw a bitmap through shader fill? Im asking this because I was trying to copy how flixel renders images through quads, but it crashes all the time the second I drawQuads
1...262728...57Latest