WackyToaster's Forum Posts

  • As for adding some margin outside of the canvas, I don't think Construct likes that. But construct games can run in an iframe, so you could add a custom index.html that has the game running in an iframe and add the margin to the iframe. I think that should work, but I'd not want to bother with it.

    Instead adding it in the game should be very much possible and not too hard. First there's the anchor behavior construct.net/en/make-games/manuals/construct-3/behavior-reference/anchor which I found has some quirks to it, but overall is useable.

    Setting the spacer manually there's a couple of things to think about:

    - You can detect device orientation in the browser plugin "is portrait/landscape" construct.net/en/make-games/manuals/construct-3/plugin-reference/browser

    - The plugin also has the request fullscreen action, which offers different scaling modes that you may have to take into consideration. That is likely why your bar changes size when resizing. You might want to refer to this construct.net/en/tutorials/supporting-multiple-screen-17

    - There are system expressions to get the desired full width/height/etc. of the viewport. ViewportBottom(layer), ViewportLeft(layer). ViewportRight(layer), ViewportTop(layer), ViewportMidX(layer), ViewportMidY(layer), ViewportWidth(layer), ViewportHeight(layer)

    - You have to pass a layer into these, so I recommend creating a layer on top specifically just for your bar. And most likely you'd want to set it up for UI-type stuff so with parallax 0,0 and scalerate 0 construct.net/en/make-games/manuals/construct-3/project-primitives/layers

  • Thanks! I should try out typescript at some point. But would that mean in typescript I can't have a base class with subclasses like I used to? Or is there a different way to achieve what I'm trying to do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just noticed that subclassing changed at some point, probably here construct.net/en/make-games/releases/beta/r362

    Ensure InstanceType namespace exists at runtime

    Now subclassing appears to reference the specific object the class is supposed to extend, as in this case the Player instance.

    class PlayerInstance extends globalThis.InstanceType.Player
    

    However it used to be like this (if the player is a sprite)

    class PlayerInstance extends ISpriteInstance
    

    This code seems to still work, is it fine to keep using it like that? I like being able to extend a generic sprite instead of the specific sprite of the player object. Or am I just misunderstanding something here?

    The reason is I do tend to further subclass my subclasses, so both the player and enemies might derive from a base class with shared functionality, e.g.

    	class Entity extends ISpriteInstance...
    	class Player extends Entity...
    	class Enemy extends Entity...
    
  • Newest project. I actually went events only since it's a very simple game. No need for js :)

  • Here's an in-depth post about it + a section about solutions

    construct.net/en/blogs/ashleys-blog-2/surprising-difficulty-1528

    Generally you'd want to avoid cutting sprites off directly at the edges, that's why the image editor in Construct adds a 1px transparent border around sprites by default. If that doesn't help, you can use the higher downscaling quality.

  • Problem: I wish to store the images in a prepared sprite like - "Load from URI(Sprite.CurrentImageAsURI)"

    Why'd you like to store it in a prepared sprite? Is there a reason you cannot use an ajax request to load the image? If you only want to load the image once, you can store it inside a binary data object and load it from there.

    And for changing a variable to change the theme, that's also possible with this approach. You can request a URL with ajax rather than a file, that you can point to the local resources by string and just add the global variable in the name. So you'd request "stringsub("./tiledfile{0}.png", globalVar)

    This would request e.g. tiledfile1.png or tiledfile2.png or tiledfileVolcanotheme.png, etc.

    I wouldn't attempt approach 2.

    Yeah, mobile is a fickle beast. Apple is cooking their own soup entirely and break things on a whim and android has a billion versions each with different browsers and other minute differences like notches and stuff. I'm honestly a little surprised that anything works at all. But I cannot imagine this to be a Construct-exclusive issue, but other engines simply have the resources (possibly even a small dedicated team) to work around whatever compatibility issue pop up. And the big mobile companies have practically infinite money too to just toss at these issues until they are solved.

  • There's a thread for this

    construct.net/en/forum/construct-3/general-discussion-7/windows-security-block-181649

    But it sounds like you may have found a potential culprit. Maybe post in the other thread instead since there's already discussion happening.

  • It can be fun from time to time but I personally don't watch too much of that type of content usually. I think Randy is fun to watch and he has that typical australian humor to it. youtube.com/@randyprime/videos

  • It's probably just a false positive as usual in these cases? But even virustotal doesn't show a single false positive for me. There's also the possibility that something actually injected the trojan into the file (some weird browser plugin, your system is compromised,...)

    This never popped up for me but it appears to be quite a common thing actually according to reddit.com/r/computerviruses/comments/x1af2y/any_chance_that_trojanscriptwacatachml_is_not

  • I kind of wanted to say that you can simply work around it like this

    I feel like it should work but it absolutely doesn't. I also tried a sprite and it also does not behave as expected. I also tried pick by overlapping point instead, which also doesn't work. It seems to be weirdly offset from what is visually seen on the screen at best. I'm not sure exactly what is going on there but it might warrant a bug report?

  • What resolution did you make your game? In the project properties you have the "Viewport size" setting that you can adjust to your needs. Or as an alternate solution, you can scale your sprites down to the size you want them to be in (but I'd recommend the first approach)

    Tacker hitting the bullseye. The current steam release pipeline is far from ideal and it's straight up missing like 80% of the available features. Considering that releasing a game sort of by default means "release it on steam" it should be a seamless and fleshed out process but it's neither seamless nor fleshed out. Greengrinds patches up at least some of that but should it really take a 3rd party addon for that?

    Getting the micro:bit plugin is not exactly a tradeoff in my favor because I have never even heard of this thing before and I have no interest in it either. Don't get me wrong, it's cute and all and maybe it was like an afternoon project after a heavy bugfixing spree to get something easy out... but even then it's a questionable allocation of resources considering we've been told time and time again that these resources are in short supply.

    I'd totally be down if Construct would stop new features for maybe a couple of months and double down on robustness of existing features in the meantime.

  • I believe if you are using the latest Greenworks/Greengrinds addon and NWJS 82 or higher, you don't have to add any of those libraries.

    I don't? Now I'm just confused :V

  • It's in the platform info plugin.

    Platform Info: expressions 'FramesPerSecond' and 'TicksPerSecond'