ErekT's Forum Posts

  • gillenew Thanks

  • Working on multiple AI's. They'll cooperate to get ya:

  • Off the top of my head, this is something you might be able to achieve with a surface shader maybe? Like, render the screen to a surface then scale that surface to zoom in and out. It would be an extra toll on the gpu for sure, but if it's the cpu that's struggling you'd be offloading that at least.

    Just a thought, no idea if it would help.

  • Are you using it with low quality fullscreen scaling? If you do that you'll force the render texture to draw at canvas size, which should boost performance somewhat if your gpu is struggling.

  • Okay, this took a bit longer than expected! The program is done, save a couple of kinks to iron out. I have the documentation and another example capx to sort out. It's a bit involved to set up so I wanna make sure everything is arranged to make it as easy as possible for users to integrate into their projects. For now, here's a small demo of the system in action:

    https://www.dropbox.com/s/lzg06qfltawad ... o.rar?dl=0

    Run 'Game.exe' (and make sure your virus scanner doesn't gobble it up ;P). Arrow keys to select and enter to apply changes.

    Printscreen will take a screenshot and save it to the folder 'snapshots'.

  • That worked, thanks!

  • I'm having a bit of trouble here. This...:

    https://ibb.co/jerPHv

    ... sets the text to zero. I've tried with StringValue as well but still nothing.

    Here's the xml in question:

    <?xml version="1.0" encoding="UTF-8"?>
    <Resolutions>
        <Res>
            <x>1920</x>
            <y>1080</y>
        </Res>
    </Resolutions>
    [/code:2ogelpwa]
    How do I use this to get at the numbers x and y exactly...?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The sprite is rotated yeah? Though sprites snap to game resolution integers with pixel rounding on, everything is still drawn at screen resolution so when you rotate a sprite, the sprite gets rotated with as much pixel precision as the screen resolution allows, basically. That's probably where your lines are coming from. If you want to avoid that you can try using low-quality fullscreen scaling instead.

  • Heya,

    well... not sure how I'm gonna tackle that to be honest. I have no idea how to inject a developer or version ID into a blitzmax program. Maybe I can ask around...

    In the meantime though..:

    I got in-game screenmode switching working reliably now. Finally! So that means you'll be able to switch between resolutions and between window and fullscreen modes from within your game, just like in any native engine

  • Ouch! I hadn't considered that. Why would the antivirus even pick up on it? Hmm...

    Good news is, I'm working on a new version that allows communication between BMSwitch and nw.js builds. What that means is you'll be able to set resolutions and switch between fullscreen and window modes from within the game itself! It also means the Launcher.exe becomes a bit redundant, and if that's the only one virus scanners get freaked out by I guess I could just ditch it for the new version.

  • Okay, here's how to use it.

    Export your game with nw.js and place Launcher.exe and Game.exe in the win32/64 folder.

    Run Launcher.exe and select a resolution and screenmode. Then press either launch or exit, in both cases your choices get saved. After pressing launch the game will run with your choices applied. If you want the 'window' choice to work though, you'll need to set up some events at the start of your game like I've done in the test.capx example.

    If you've run the launcher once and don't want to change resolution or screenmode again you can just run Game.exe directly with your saved settings.

    EDIT:

    Oh, and you need to turn kiosk mode off in build settings or you won't be able to cancel fullscreen in C2.

    -----------

    Quick breakdown of what the different cfg files do:

    launch.cfg:

    Used by Game.exe to get the name of the executable (nw.exe), the desired resolution to run in, the delay in seconds before switching to the desired resolution, and the time in seconds to display a black background while the game loads. (The last one doesn't work properly so I'd leave it alone for now.)

    You should only change "nw.exe", and the two last lines in launch.cfg. The resolution values get overwritten every time launcher.exe gets run so there's not much point changing those.

    mode.cfg:

    fullscreen/window toggle. 0 = fullscreen, 1 = window. Set by launcher.exe. Read by Game.exe (tells it not to switch resolution in window mode) and by your nw.js build (check out the capx to see how).

    osH.cfg/osW.cfg:

    Reference values. Allows C2 to read the resolution selected in launcher.exe. Best not mess with these.

    osDH.cfg/osW.cfg:

    Same as above but for system resolution.

    res.cfg:

    This is the file where you set up all the different resolution choices you want to make available to the player.

    ui.cfg:

    You can set your own names for launcher.exe's window and buttons here.

  • Okay here it is! No proper readme in there yet. I'll write one up when I feel less lazy <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    https://www.dropbox.com/s/r1nwmlpav9629 ... 0.rar?dl=0

    New in this build:

    Window mode – you’ll need to set up a couple of things in your game’s events for it to work. See the testbuild capx inside the archive for an example.

    Future plans (v2.0):

    Switch resolutions in-game, switch between window and fullscreen in-game, and restore system resolution when the game is minimized (Alt-TAB).

    Mac/Linux support.

    Customizable launcher with various graphics and layout options.

  • Sure thing! I'm looking into license options atm for something as permissive as possible; no need to credit me, use however you like etc. Might just go with public domain to minimize the amount of headache

    I do plan to offer another version in the future with support for mac/linux and more customization options for the launch window, including using your own graphics, buttons, layout style etc, which will be commercial. Small fee, the price of a cup of coffee or two probably. You'll be able to use that however you like as well, with the exception of re-selling the software itself.

  • Nah I don't think it's your windows version. I have one win7 and one win8.1 system to test on, and it works as intended on both of those.

    What this does is simply change the system resolution temporarily, forcing everything (including your game) to run in that resolution for as long as the target process (your game) is running.

    Have you tried lowering the resolution manually through Control Panel/Display to see if the scaling gets stretched the same way? If it doesn't, then the problem is on my end. But if it does, then maybe it's something to do with the way your display/display driver handles non-native resolutions. For instance, many if not most laptops will stretch everything to fit the screen by default, instead of scaling to fit aspect ratio.

  • Anonnymitet:

    Thanks <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Here's the updated version!

    Test build (Launcher.exe and Game.exe is in here):

    https://www.dropbox.com/s/b2ehi0odblvz4 ... d.rar?dl=0

    Test capx:

    https://www.dropbox.com/s/w7ikvdcyxc2ue ... .capx?dl=0

    Some notes:

    The program consists of two files. Launcher.exe and Game.exe. Launcher.exe is the UI part. This is where you choose your resolution and window/fullscreen (which doesn't work atm <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">). Game.exe reads the resolution set in Launcher.exe and switches to it before executing nw.exe. So you don't need to run the launcher itself every time you want to run your game.

    Both Launcher.exe and Game.exe will create a new folder "cfg" inside your build folder and fill it with some txt files if they don't exist already. You can edit these to configure the button texts, window title text, and the resolutions you want to make available to the user. Launcher.exe will check the resolutions listed in 'res.cfg' against the ones available to the system you're running on, so it'll only list valid resolutions (as reported by the system).

    'ui.cfg' is where you can set the texts displayed in Launcher.exe to your liking. Pretty straightforward stuff. At the bottom of 'ui.cfg' you'll see the line 'Game.exe'. Set that to whatever you want to rename Game.exe to to point Launcher.exe in the right direction.

    Please let me know how it works out for ya and what system you're running on <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    EDIT:

    Almost forgot.

    In 'launch.cfg' you'll see this:

    nw.exe (change this if you want to call nw.exe something else)

    1920 (current resolution as set by Launcher.exe)

    1080

    2.50000000 (delay in seconds before switching resolution. Tweak to suit your game's loading time)

    0.000000000 (time period in seconds to display a black screen while loading. The nw.js game window will display on top of it so you can safely leave it high if you want)