Triggering other events, Performance and GUI

0 favourites
  • 4 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hi,

    I just started with Construct a few days ago, and I'm already making good progress. Finally I have a tool where I can develop my ideas into a real game in an amount of time I'm comfortable with =). However, I have a few questions:

    1. Trigger other events

    Is there a way to trigger one event from multiple others without using global variables? Lets say I have an event that reloads a weapon, and I want to trigger it by pressing the R key as well as when I'm trying to shoot but don't have enough ammo. I have split my project into several event sheets to make it more organized. I have one for player controls, where the manually reloading event is triggered, and one for weapons, where the check for ammo event is located as well as the reloading event itself.

    The best possible solution for me would be to have an action like "trigger event X" that I can use in multiple locations (and event sheets), but it seems there isn't such a thing? Am I missing something or do I really have to set a global variable, like "DoReload"?

    2. Performance on conditions

    Coming from more traditional game frameworks like Unity, where I had to do actual programming, I also always try to take performance into account. Putting an event with a condition like PlayerHealth < 0 into a sheet does ring some alarm bells for me, as it seems construct is now checking every tick if this condition is true. Naturally I would only check for this when for instance the event is triggered that reduces the player health, but this gets more and more complicated the larger the project gets (at least without the ability to trigger other events like described in question 1). Should I be concerned about performance in those cases, or does Construct do some magic to reduce the impact those checks have on performance?

    I'm still not quite sure how the performance of html 5 games in a browser concerning game logic is, compared to lets say a stand alone Unity game.

    3. GUI sprites & text

    What is the best way to make GUI sprites and text? I just put them into an own layer named GUI, and give them the anchor behavior. However, when I move around in my top down shooter, those elements stay in place on the screen (perfect), but jitter (not so perfect). I'm using chrome and I think I somewhere have red ("lost" the tab with the website unfortunately) that this seems to be the issue, but I'm wondering if there are any other (better) ways to make the GUI, and/or if there will be a fix for that issue in chrome?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 4. Having to put every object into the layout regardless if it is used on startup or not

    One additional question that is bugging me. I have some particle effects that I'm using for weapons. Obviously, they are not needed in the layout on startup, but it seems that I have to place one instance of each particle effect anyway, otherwise the game will give me a big error window when I load it. Is there a way to not place these objects in the layout, as it unnecessarily clutters my layout and I have to make sure that they are not doing anything I don't want to and cannot be seen by the player at the start of the game (not that difficult with particle effects but more difficult with enemies for instance).

  • 1. Put your Reload event into a Group (right-click on Event Sheet, select Add Group to create, call it Reload, then drag your event into it), then in other Events you can use the Action called System->Set group active.

    2. Performance of conditions isn't much of a worry, most of the performance is due to visual things. Check out Performance Tips if you need to improve your games performance. If you're not seeing a performance drop, don't worry about it.

    3. Try setting Parallax to 0,0 for the layer with GUI as well as Anchoring the objects

    4. Move the objects to the grey area outside your layouts design area and maybe give them the Destroy outside layout behaviour. This way the object is part of the layout but won't affect the game.

  • Thanks for the quick and helpful reply!

    Will try out your suggestions and report back later :).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)