WackyToaster's Forum Posts

  • Taps are defined gestures and also have single and double-taps. Basically, after the first tap, the engine cannot know yet if you want to perform just a single tap, or a double-tap. So it has to wait for a brief moment to see if you perform a second tap. That brief waiting period can make it feel a little bit laggy and wonky, which can be totally fine depending on the usecase.

    "Is touching object" fires instantly, because It doesn't have to wait for anything. You probably need to add a "Trigger once" though.

    Most likely that solves your issue, but we don't know for sure. There could still be an issue with your eventlogic.

  • I very much understand the problem, but sometimes having access to the code could just be helpful.

    If I encounter some edgecase in my project, right now my only option is to file a bugreport. And then maybe I get a fix. It could also get hit with a "difficult" which usually means I can expect this bug to be in limbo for the next couple of months. Or it gets shot down as wontfix because it's just an accepted quirk and fixing it would break every other project. A last resort would be to somehow work around it with event logic or game design, but that could easily just be impossible. And if that's the case, I'm just screwed.

    Meanwhile, I could theoretically just tear open the code and put the fix where I'd need it myself. Obviously with the full understanding that if I break something here, I don't get (official) support.

    Put it behind developer mode, make a big box that says "If you touch this, no support!". Make it a per-project basis so if I actually break it, I can just revert to the original plugin/behavior script. I'd argue anyone bold enough to tinker around with the code is smart enough to understand the ramifications.

  • Seems like that plugin has no javascript interface (yet?)

    At least the binary data object has though. construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/binary-data

    So what you'd have to do in the meantime is create a little (async) helper function in the eventsheet that you call just for encrypting.

    runtime.callFunction("encrypt", [params]).then(() => {
    	// send via websocket
    }
  • I don't think there is.

    You can probably do it like so with events:

    1. Set global var "gettingLayouts" true

    2. Access the current layout name with the LayoutName expression and write it into the array

    3. Use the "go to next layout" action

    4. repeat until you run out of layouts, set "gettingLayouts" false, then go back to the first layout

    Quite convoluted and ugly, I'd not do it this way. Simpler would be to not dynamically create that array I suppose, but that means you have to update it by hand every time you add/remove a layout.

  • Perhaps the problem is the game design, if you're doing something inefficient like nested loops. It depends on your project and it's hard to say more without seeing exactly what you're doing, but Construct is definitely capable of handling 1000 objects smoothly.

    The type of game usually boils down to requiring a ton of collision checks.

    • all enemies with player
    • all enemies with all enemies
    • all enemies with all player projectiles
    • (optional) all enemy projectiles with player

    Doing this every tick, for 1k enemies is heavy. That's another thing that could be done... limiting the tickrate of the collision detection. Instead of doing it every tick, doing it, say, every 0.033 seconds which is equivalent of doing it at 30 fps. 30fps may be perfectly sufficient for this, but you'll have to interpolate the movement otherwise it will also move at 30 fps.

  • I haven't played that game, but just from taking a brief look at it... are you sure there are "several thousand enemies" at once? The game states that it has thousands of different enemy types, but that doesn't mean there's a thousand of them running around on the screen at a time. It looks very much to be in the same ballpark as vampire survivors of having maybe a few hundret or so.

    I think some things that can help you are possibly:

    1. web workers for multi-threading construct.net/en/make-games/manuals/construct-3/scripting/guides/creating-workers

    2. Object pooling

    I'd say you could try and split the enemy logic up into batches of ~200 and put them in individual workers. Though admittedly I have no idea if that is a nonsense idea or a good idea, I have no experience in that regard. It just seems like one of the things I'd try and see if it works or not. :V

    And object pooling to avoid having to create hundrets if not thousands of instances every second.

  • Yes, it's pretty much dead. The original creator vanished, so...

    It seems that the plugin technically still works, if you can get your hands on it.

  • 1000 moving objects are quite a lot. Even vampire survivors has "only" about 250 enemies visible at once with very simple logic/sprites, and that game starts chugging hard still if a lot is going on even on reasonably strong machines. It's quite the CPU bottleneck. But I'm curious how your testing goes and if you can achieve better performance like that.

  • Quite easily so. HTML Element -> Insert content

  • Hah, I knew it!

    It's just something that happens, especially if you're not used to it working this way. In usual programming no reference get deleted, it just starts throwing errors. Construct prevents throwing errors by also removing the reference. If I think about it this way, I'd probably prefer the latter, but I can see why the first one also makes sense.

    Either way, before deleting something that has events attached, just do a "find all references" to check where you used the object in your events.

  • Yes exactly.

  • Error reports should go to the issue tracker here:

    github.com/Scirra/Construct-bugs/issues

  • The Audio object only needs to be added once. This is the plugin that plays audio. Your audio files are imported into the sounds/music folders (rightclick them)

    Then you tell the Audio plugin to play whatever sounds you want. Afaik this is not limited at all in the free edition.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's kinda odd, I'm looking and your code and it looks like it should work? Maybe... is "firstEmptySlot" a number variable? Maybe it's set to string and that messes it up?

    Either way, I've set it up slightly different (with a function, highly recommend) and tested it. This works 100%.

  • are there stability issues I should be aware of in construct? Is it possible to have too many events? Things along those lines because I don't think the issue stems from the event sheet.

    I'm not aware of any issues like that. 700 Events isn't exactly all that big, I've seen users with projects having several thousand (iirc even 10000+) events.

    My guess would also be, something mucked up an event somewhere, perhaps just on accident and unnoticed. Classic example: You deleted the boss. If you delete a sprite that is referenced somewhere in an even/action/expression, the action also gets removed. It has to since the referenced object doesn't exist anymore. This absolutely can break your event logic, and it might go unnoticed.

    Also, posting the project or at least screenshots of the events in question is always helpful.