Using HaxeFlixel with multiple screens

  • Hi everyone,

    I'm trying to build a game that works on two monitors connected to one pc.
    Each monitor is shown to a different player, but the displays are connected through some kind of interactivity.

    Is it possible to do so with HaxeFlixel?

    I would want basically to use some kind of hardware (like a graphics card or os feature) to have the two displays be just one big display.
    Then, I can inside HaxeFlixel render on correct parts of the big virtual screen so they show on the actual two separate screens.

    Note that I will know the exact resolution of the screens and will not need to support any other resolution (this is for an on-site museum display).

    Anyone know if I can achieve this with HaxeFlixel?


    1. Create a very big window size, like 1920 * (number of monitors), say 2 = 3840 in your Project.xml.
    2. Place said window where the first monitor is at. Since the window would be very large it will span across multiple monitors.
    3. Use Windows or your OS to arrange how these monitors should appear.
    4. In your game, set up multiples FlxCamera

    You gave me an idea for my local multiplayer game. It should work. Wondering if it would be taxing for the CPU/GPU tho.

  • @claudio-ficara Thanks!

    That's what I was hoping was possible.
    I'll give it a try very soon.

    The use of FlxCamera is to separate the screens is a very elegant advice.
    Specifically as some screens will be rendered on both screens at different times.

    Glad to give you an idea, hopefully it will not strain the CPU/GPU even though it's double the processing.


  • A continuation question: is it possible with 3 screens as well?...
    I'm doing a game for a museum and they want a 3rd screen to be shown to the audience.


  • @Claudio-Ficara I ended up doing so on ubuntu with 3 monitors.
    However, when I run the haxeflixel compiled c++ program, it takes up only one monitor and doesn't span on the others...
    Any idea how to make it aware of all 3 monitors?

    Probably an ubuntu-based question, but so far I couldn't find anything in google or the settings that resolved this...
    Or perhaps it's something in the Project.xml definition?...


Log in to reply
