peter568's Forum Posts

  • We're making an RPG styled game with lots of functions for story events. They're not run consecutively; just called once when they occur in the plot. The idea is that the array we're using for storing dialogue also stores function strings that we call for certain scenes. So for example, a function for a scene with a character repairing a machine, a function for an earthquake scene with a rumbling camera and surprised NPC's, stuff like that.

    How heavily is performance or memory usage affected by putting a function in an event sheet, even if not being called at the moment? (basically

    And stemming off of that, what's an ideal number of functions in your game to stay below? 100, 200, 500, etc?

    I apologize if this is a stupid or redundant question lol

    Tagged:

  • Yeah that seems like a way more efficient way to do it.

    I found other responses to similar questions and figured it out by setting a local variable to the array string i want to call, then calling that. Worked perfectly. Thank you so much!

  • The title kinda speaks for itself. We're using a lot of functions in our game for one-time events and such, and it just seems impractical to have to manually map each function to a string before we're able to call it. Is there a more efficient way to get functions mapped, or even automate the process? If not I understand.

  • I don't understand what you would need 5000 sprite tiles for. Can you provide more details on the game and the sprites are for? Would there be a more efficient way to implement that?

  • Event Sheets automatically pick an instance if its part of a condition that checks that object. If no object is picked in the expression, all are picked.

    You can also use System conditions, which let you pick based on expressions, instances, UID/IID, etc.

    What are you trying to use instance selection for?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe export 1 sprite with a sharp edge and one with a soft/blurred edge? Then choose the animation based on whether or not it's being moved. That would also save on effects processing

  • No problem, DDP is one of my favorite shooters next to thunder force 3 and giga wing. Good luck on the game!

  • I think I get what you mean. You want auto-fire, but you also want the player to be able to manually rapid fire faster than the preset, right?

    What you could do is fire a shot when the button is pressed, and as long as that button is held, run a Timer behavior on an interval. Every time the Timer finishes, fire another shot. And when the player releases the button, stop the Timer.

  • Coming back to this now, I think the problem had to do with the naming used to call the JSON. I used 'request URL' and then checked a variable to determine which sheet to grab. It worked fine when I used 'request project file' and manually chose the file instead. Less efficient, but it did fix it.

  • Make a family with all the objects that you need to manage Z order for.

    Give the family a numeric variable to keep track of their Y position.

    Every tick, set that variable to their Y position, then update family's Z order.

    You can check on an 'every X seconds' interval or only when the character moves if you want to save on CPU usage

  • Late response but duplicating the family and checking that worked perfectly. Thank you to both responses!

  • Hi,

    I'm using a JSON script loaded in with AJAX to determine positions and spawn times for enemies. It works as expected on desktop browser, desktop nw.js export, and remote preview on android. But when exporting the game to APK and testing it, the json won't load and none of the enemies appear. JSON files I used for other parts of the game still worked as intended, though, so it seems to be an issue with just that one file.

    When using PC-mobile debugging, this is the error I found:

    What could be done to fix this? Does array size affect whether or not they work on mobile?

    Any help or advice on how to potentially troubleshoot this would be life-saving 🙏

    Tagged:

  • Is there a way to check if a sprite is overlapping another sprite of the same name or family? I'm working on a townbuilding game and want to prevent players from placing buildings/objects on top of each other.

    Tagged:

  • Ok.

    Would it still work if I only used 1 row for the array, and referred to the cell number instead?

  • Awesome, I have rebindable controls for keyboard working now and am in progress of setting up gamepad support.

    Is it possible to convert a gamepad's button index to the button name, in the same way the Keyboard behavior can convert a Key Code to a string? For example, show A/B/X/Y/L/R as the name of the button instead of the numerical index