exalted's Forum Posts

  • oosyrag cheers!! your example did the trick!!

    I will probably try to do it with a global variable (instead of a timer) in order to control other conditions as well.

    Thanks a lot for this help!

  • oosyrag I understand the logic but I struggle to implement this.

    Is it possible you could give me an example with a .c3p file?

  • I am crafting a platform game.

    The idea is that if the player performs an action before it’s allowed, by some other condition (such as being on the ground to be able to jump), the action will still happen. To achieve that effect, we should start a timer when the button is pressed and if the condition is met between the moment in which the input was sent and the moment the condition is reached (touching the ground) is less that the timer defined by our tolerance, the action still happens (we jump).

    How to effectively implement this on Construct 3 ? (Best practice)

  • Same here

  • I post further information about this in the following topic I created: construct.net/en/forum/game-development/distribution-and-publishing-26/publishing-game-pc-steam-156579

  • Good news! I found out (by trial & error) that if the "Touch" Input is not valid in the project, then the aspect ratio and the scaling does not break if windows button is pressed or if you click inside the screen!!

    And it works like a dynamic resolution change with the above script, by forcing windowed borderless fullscreen! This is not possible if you want to build a game with mouse controls. However our game is a platform game and no mouse controls are needed!

    For anybody who wants to have similar results you can follow this topic construct.net/en/forum/construct-3/how-do-i-8/fullscreen-via-nw-jshotkeying-155346

    If you choose "scale outer" in your projects configuration settings, then your game will cover all resolutions and at the same time it will keep the vertical or horizontal alignment depending on the user's screen resolution. This is amazing because for example in ultra wide screens the game will cover all of the field on left and right but at the same time it will keep the height of your configuration!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello all,

    I post here because me and the team I am working together are facing a big problem regarding publishing our game in PC (Steam).

    The problem we are facing is the absence of any resolution change option for the final user/gamer who eventually will play our game.

    Now I know all about aspect ratios and the options to scale in or out etc. But this is not the nature of out problem. Ashley explains well in his article construct.net/en/tutorials/supporting-multiple-screen-sizes-77 how to create a game to fit in multiple resolutions, but if you publish a pc game you need to have the option to change the resolution.

    I have dig a lot into this and so far my understanding is that we can not change user's screen resolution by using NW.js exports. NW.js was originally made to help people to compile their website into a desktop app. It is not a dedicated compiler in order to make games.

    The real problem here is these two facts:

    1. Our NW.js exported game can not detect user's screen resolution.

    2. Our NW.js exported game can not change user's screen resolution.

    So I tried to find some ways to work around this and the only "near to a solution" I found was using a script that makes our game play in windowed borderless fullscreen. It kind of works by having fullscreen and the same aspect ratio in any resolution. But if windows button is pressed or if you click inside the screen with your mouse, then it breaks. You can follow the topic about this script here: construct.net/en/forum/construct-3/how-do-i-8/fullscreen-via-nw-jshotkeying-155346

    The result is that we can not publish our game in Steam. The original resolution of our Game is 1920x1080, we have put a lot of effort so far to build our game, but this problem is driving us crazy. Not to be able to change user's resolution in-game raised a big red flag for further development.

    If you have any suggestions to work around this problem please let me know.

  • loneDreamer

    Hey how are you?

    Do you have maybe an idea on how we can make the borderless windowed mode to be persistent?

    What I mean is that with this code on any mouse click or on clicking the windows button on keyboard, the fullscreen mode breaks and then it is never fullscreen again and reacts like it is on kiosk mode.

    Is there any change we can set this to be always on windowed fullscreen even if a user hits the windows button?

  • Credit is due elsewhere, the code is not mine. I'm glad everything work out.

    But you shared this code with the community and you took the time and effort to explain to me step by step how to implement the code..

    So I give all the credit and appreciation to you, for helping me out with this! Thanks again and wish you best of luck with your project!

  • First of all thank you very much for writing such a detailed explanation on how to add your code. The way you walked me through this made it clear and understandable, I had an easy task to implement your code thanks to your effort and your consideration into this.

    The script worked perfectly and affected my project the way I desired it to affect it. I will share my test results for other people that would like to have same results:

    I tested my game on following desktop resolutions:

    1920x1080 (default resolution of my game)

    1920x1200

    1680x1050

    1600x1024

    1600x900

    1440x900

    1366x768

    1280x1024

    1280x768

    1024x768

    I tested as well in 4k resolution and in HD wide screen resolutions.

    With your code the Window size of the game keeps it's aspect ratio (in any resolution!!!) and at the same time if you set your game in Configuration Settings in the option "Fullscreen in browser" to "Scale outer" you will have a full screen rendered game in any resolution without changing the scale of your game and keeping the aspect of your originally design, whatever your default resolution is. This is an amazing workaround to this problem dealing with resolutions in NW.js exports, that what I was hoping for!!!

    loneDreamer hats off!!! I appreciate your help a lot and wish you the best!!!

    This method ignores as well the "Scale and layout" option of the windows display settings! Many pc users set this option to 125% or 150% in order to have bigger letters on their screen, but unfortunately this affects Construct NW.js exported projects to scale as well and breaks the design of the game. But with your magic code this is not a problem anymore!

  • I am very much stuck I think.. I downloaded Node.js and then exported my construct project with NW.js.

    But after that I feel helpless because I am a noob with these software Node.js.

    I open the Node.js and all I have is a black command screen.

    I don't know how to use it with my NW.js export and where to find index.html in order to use your code.

    It is such a shame that NW.js does not allow us to change the resolution in-game and I think that this is a feature that any game engine should have. I am making a game with resolution 1920x1080 and trying to give opportunity for example 1366x768 resolutions to play my game. This is essential and if someone wants to publish a game on Steam (like me for example) it becomes a frustration.

    So I started searching for solutions, I think maybe this is possible by using "windowed fullscreen" because regarding my tests I get these resolution change results if I resize my game in a window. So maybe this is a workaround if we can have this result in a borderless windowed fullscreen.

    Ashley should as well come-in this topic and explain us how we can publish on Steam without having this essential option to change the resolution for desktop users like any game engine does.

    Thank you for replying loneDreamer and I would like to ask you if you can explain me how to add your code like you would explain it to a 10 years old. I am not familiar with software like Node.js and need help with this.

  • Are you trying to set your game into windowed fullscreen? If yes, this is something that I want to achieve as well. The code you shared here, where exactly do you add it? You add it after the export or before?? and where?

  • Bumping..

  • I am convinced now that this is a C2 bug, therefore I started a new thread on the bugs section here:

  • Problem Description

    This thread is in continuation of my recent post viewtopic.php?f=146&t=168777&p=1016256#p1016256 posted in General Construct 2 section. I decided to post it here on the bugs section because now I believe that it is a C2 issue.

    I am developing an endless jumper and I need to implement Tilt controls (like in Doodle Jump) in order to move the player left or right.

    I realized that the best method to do this, is by using “acceleration X with gravity”. The result was great and it worked fine with my mobile and with some other mobiles as well.

    However the feedback from other mobile users was not so great. The acceleration X was always at 0 (zero) for them and the player did not move at all. I told all of my testers to try Doodle Jump, so I can check if it is a problem of their device and their feedback was that Doodle Jump tilt works fine on their device.

    Right now the devices I can confirm about X Acceleration (with gravity) are:

    Working: Motorola Moto G 3rd Gen, Motorola Moto G 1st Gen, Alcatel C7 Pop

    Not Working: Motorola Moto E 1st Gen, THL T6 Pro

    About the Gamma Orientation I have found this link: http://www.sizzle-games.com/Tilt/ which is a Construct 2 example with Gamma Orientation. Now it is clear that the problem is from Construct 2 regarding the Gamma Orientation. If you watch the Gamma values and try to lift up your mobile facing you (in 90 degrees) like a desktop monitor, then the values are unpredictable. The result was the same in every apk that I have tested and in every device.

    Thank you in advance.

    Attach a Capx

    Not needed, you can reproduce it with the original C2 Infinite jumper Template as well.

    Description of Capx

    -

    Steps to Reproduce Bug

    Just try it

    Observed Result

    • Gamma Orientation give unpredictable values if the device is faced on 90 degrees.
    • Acceleration X (with gravity) is not working on all mobile devices

    Expected Result

    • Gamma Orientation should give the right values if faced on 90 degrees.
    • Acceleration X should work on all devices with accelerometer.

    Affected Browsers

    -

    Operating System and Service Pack

    Windows 7 Ultimate (64-bit), Service Pack 1

    Construct 2 Version ID

    Release 221(64bit)