igortyhon's Forum Posts

  • I think you answered your own question.

    Attach another sprite with the player's image to the inventory; this is a common practice in games.

  • Hello,

    It seems like I can't turn off and on checks for mouse click like I would any other code.

    Let's say you have a variable that if its value is true a segment of code should run and if false it shouldn't. It seems to be that any mouse click triggers in the code runs independent of the variable value, being inactive but taking up performance as if they were active.

    Does anyone have a solution for this?

    Thanks!

    Do you mean a condition like this?

    Yes, Construct3 will go to the trigger every time, then check the variable, and not perform the action.

    If you really want to isolate this trigger, you can place it in a group and disable this group when not needed. But it is better to focus on optimizing collisions, spawning, and physics, as these are always worth optimizing.

    There is nothing wrong with this, and you should not worry about optimizing it, because every game engine will have similar costs.

  • ...

    How to determinate car hit was front or rear? I used car speed for that. If car speed is positive then on hit it's front. If car speed is negative then it's a front. Any better ways?

    updated "code"

    https://www.dropbox.com/scl/fi/9fdkeqr6nnagfgzapetr9/Car-Hit-Obstacle-2.c3p?rlkey=ms0heiqj9hpxtoj1c4vuvjovl&st=t6sqfiya&dl=0

    It is easy to determine whether the obstacle is in front or behind by knowing the angle between the car and the obstacle, as shown in the screenshot.

    Why don't you like this method?

  • Hello. Do you want to simulate damage so that the power of the car decreases when it collides with an obstacle?

    Then you need to reduce the current and maximum speed of the car and return it after receiving a repair booster.

    And it drives backward when it collides with an obstacle behind it because you programmed it that way; it's not a bug. I showed you how to fix it.

  • I usually work with Unity, and for a browser game I just set it to 10vw and 100vh and it stretches perfectly. But here I can’t get it to work.

    I bought a Construct 3 license to develop what I need, and I’ve already done everything except this part. I never imagined something so simple would be so complicated. I think I’ll go back to Unity. It’s really disappointing because Construct is a lot of fun, even though I’ve been a Unity developer for over 10 years.

    Although I don't understand why you would want to distort the image.

    In Construct, we scale images without distorting them.

    You might like this option, where the background image will adjust to the size change, and the controls themselves will be positioned without distortion.

    Here's an example.

    dropmefiles.net/en/kTHz73CwDW

  • And you're not upset that when you stretch or compress the canvas via “js,” everything gets distorted? You're only concerned about the inaccuracy of the input?

    Writing text explaining how to do everything takes a long time. It's easier to make corrections in your example and post them here.

    I watched the video in your example and there is nothing secret about it, so please post the “*.c3p” file here.

  • ...The stretch mode makes the entire image appear on the screen, and that's what I need.

    Hello. You think this is what you need, but it is suitable for website content, not for scaling the game's appearance. You are simply distorting the game's dimensions.

    You need to use construct3 events to customize the appearance.

    You can create a small example of a “*.c3p” file and post it here, and we will assist you.

  • I got it working with your lerp idea! It seems really cool. When you say not very good do you mean performance wise?

    These are minor details, and Construct3 can handle them well. As an artist, you are free to do this and even more.

    In terms of performance, it won't be immediately noticeable, because if there are 10 or 100 such health bars on the stage, it won't change much, but if there are more than a thousand of them, it could potentially harm the project.

    I am more concerned about the logic of this, because every time our game will need to go through each health bar even when it has not changed.

    Wouldn't it be better to change the amount of health when receiving damage from the enemy and start a “tween” to decrease it? Or only increase health when we drink potions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The option using `lerp` linear interpolation is not very good, as it requires performing this action every tick even if the health parameters have not changed. If you don't know how to do this in TS, you can simply subtract half a pixel from the length until it becomes necessary; this is not visible to the naked eye.

    But it would be better to use “tween” only when necessary during health loss.

  • It is very bad practice when the variable is equal to 7, the code will try to run the ad 60 times per second until the level ends.

    Why don't you set the ad to run when you click the button that appears when you win?

    -

    At the start of the level, you have an action that creates an interstitial ad but does not display it. This is normal practice, but it would be better if you didn't just try to create an ad, but checked at the start of the level whether the ad is loaded, and if not, only then load the ad.

    -

    I recommend making these changes for the interstitial ad and checking in the tests that the test ads should be displayed.

    I recommend removing the banner completely for now, then adding it later, because it is not displayed during the test and is more difficult to test.

    I think AdMob will see that you are not flooding it with unnecessary requests and will start showing ads.

  • Everything seems fine from the admin side.

    Let's now check the Construct3 code.

  • Here are two options.

    I often use the “tween” behavior to change the size of the health bar.

    fex.net/s/a4tnnzy

  • I played around a bit but didn't see any ads.

    Check the number of calls to the app-ads.txt file to see if Google can find this file.