alastair's Forum Posts

  • citron2010 You can add variables to a Sprite (with Global setting) and now you don't have to deal with the clutter of Global Variables.

    For instance you could have a global variable called "variable" or you could just put it on a sprite instead: Sprite.Variable (or s.variable for faster access)

    The benefit of using global sprites for variables (and behaviors) is that then you're free to have as many as you want. And they can be more organized. Because if you had 300 global variables, then if you start typing an expression it's going to show a huge list of variables which may not be relevant to your current event.

  • I find that with each project I get better at organizing and structuring them.

    Therefore, if you can, try finishing multiple short games. The more games you finish, the more experience you have. And the better you'll get.

    One problem I had with Angvik 2, because it took many years to make, I was stuck with old ways of coding that I'd felt like I'd out grown.

    But afterwards, I made a short game over a few months, Nestris Legacy, and that was really refreshing. I learnt a lot from working on it, despite it being a short project. And now I feel better equiped for the next big project I'm working on.

    I think you also get better at realizing how to make code that's more efficient. Using functions (and custom actions) more. Closing and opening groups more often, especially when that code doesn't need to be checked. I think optimization does help, with Angvik 2 it seemed fine for years, but then eventually performance gradually started getting worse and it was too late.

    I have two objects for "global stuff" - a sprite (invisible, global) and JSON. The sprite is for variables I use often, and JSON for everything else.

    The sprite also has Tween, Timer, and LineOfSight behaviors, so I can run occasional timers/tweens or cast a ray when needed.

    yeah this is the best.

    Also if you make it a single letter name. Then it can make it easier/faster to reference when you're typing expressions, especially when you end up using it so often.

    Also, the commmunity Discord, has a #tips channel which is filled with hundreds of amazing ideas.

  • There's a github issue talking about this exporter being broken with Steam:

    github.com/Scirra/Construct-bugs/issues/8328

  • I hadn't used Webview before because my previous projects used the NJWS extension.

    But now that NWJS is being retired, I have to look at it since it sounds like webview is the new primary export option.

    I noticed that you can't bundle the browser with the game, is that going to be safe long term in the years to come?

    Will my game still work the same way consistently, even if they change the way the browser/Edge works in later years? And what if future Windows versions change the way they do the browser? Will my game be safe?

    I've also heard that it's not good because it doesn't work with Steam overlay or something? If so that makes it unusable for me, because Steam is the primary audience.

  • Yeah that's annoying!

    I save my work to a Mega sync folder. And anything in that folder gets uploaded to their server.

    It even lets you see past versions of your save files.

    So I can not worry about what happens to my computer, and I can have multiple devices/computers share the same files.

  • It sounds like webview2 was more of an experimental thing, that hasn't really worked out. Particularly there was some issues with Steam too.

    So it's probably better to just stick with Electron and NWJS.

  • Oh now I remember now why I gave up trying to map all these devices:

    Many of these cheap controllers use the same parts inside, so they share the same Vendor and Device ID...

    Yet they have different button layouts, so how can you make it work?

    Here's one example from a couple of controllers I just checked:

    One of them has button "A" mapped to button index 2, and the other at 6!

    Making it impossible to give these controllers an official mapping. And I have more that do this kind of thing.

    It sucks but I don't know if there's much we can do. Except have custom control support for you game.

    To support these controllers DPAD, which use Axis 9 in Chrome, I could just have code that translates the axis values and make them register as button inputs for my game.

  • Most people use Xbox, PS4/PS5, Switch controllers.

    Those all have perfectly mapped inputs on Chrome, so they're consistent. (Firefox isn't as good here as my bug report above shows.)

    And I'm guessing popular alternatives like 8Bitdo and Logitech would also be mapped, but I haven't got them yet.

    But yeah a lot of the other generic ones like the PS1 or N64 controllers on Amazon, do not have proper input mappings yet.

    For Angvik 2, what I did was manually create an array of button inputs for many cheap no-brand controllers. I would use the gamepad ID string to detect which controller was being used. Basically making my own personal database of controllers. This way I could have heaps of gamepads that are usuable for my game, and they'd work by default.

    Some years ago, I think I may have reported some controllers to chrome and it got mapped, but I can't remember why I stopped doing that.

    Perhaps I should try submitting an issue to Chrome again, and see if they'll add more controllers. This way we can all benefit, having controllers work properly and easily for everyone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I saw a video where they could make very basic games with ChatGPT style prompts.

    And so it'll very likely be possible to make more eleborate games in the years or decades to come, through just simple communication with AI.

  • What method did you use to add your game to Steam Deck?

    Are you uploading to Steam itself, or just testing: where you right click on the game file in desktop mode and select "add to steam"?

    _____________________________________________________

    I haven't had any issues with input when adding non-steam games to the Deck.

    But when I uploaded my Angvik 2 linux depot to Steam I did get that issue you mentioned, but only for a while, then when Valve approved the game did it get fixed somehow (maybe they made controller input default instead of keyboard).

  • I forgot that skymen made a tool that can easily patch NWJS games so they work on laptops! It works well for me.

    You can download it here:

    github.com/ConstructFund/nvPatchUI

  • Do you think "tags" should be treated consistently throughout Construct?

  • I was confused with Timer tags.

    I didn't know if I made a timer "hello world" if it would be treated as two separate tags: "hello" and "world". (The manual doesn't clarify this.)

    Whereas in other parts of Construct, the tags do allow for a sentence like "hello world" to be treated as multiple words. From memory, sprite object tags, and the audio plugin tags, work this way.

    When I went to stop the tag "hello" it did not stop the "hello world" timer.

    (I suppose if it was changed it may be a breaking change for some projects? But's fine, there could just be a legacy setting for old projects.)

  • Would it work if Sheets had setting between Local and Global?

    For example, having the layoutsheet set as Local would mean it's refreshed when you change layout.

  • This is going to be fantastic, looking forward to it!