K1kk0z90's Recent Forum Activity

  • EDIT: When the game has been exported, the Button's background image is correctly viewed. The problem is only when previewing in Construct 3! Any ideas why it happens? Thank you in advance! :)

    Hello,

    I'm trying to customize the look of a Button using CSS. In particular, I want to replace the button image with a custom one. Here's what I am doing:

    1. Create a buttons.css file included in the project
    2. Write only this rule in buttons.css: #button { background: url(button.png) no-repeat; }
    3. Import a button.png image as another included file
    4. Create an instance of a Button object with ID "button"
    5. At start of layout, use the Browser object's Load stylesheet from "buttons.css" action
    6. When I play the game, the button's image is not the default one anymore, but it is a white square image, instead of the provided button.png image.

    Any advices? Other CSS rules, such as "background-color: red;" work correctly, so the problem only seems to be with background image. Also, I managed to make the buttons.css work outside of Construct 3, so it should be syntatically correct I think.

    Thank you in advance for your help! :)

    EDIT: When the game has been exported, the Button's background image is correctly viewed. The problem is only when previewing in Construct 3! Any ideas why it happens? Thank you in advance! :)

    Tagged:

  • Ashley Ok, I'll file a bug report. Thanks! :)

    Noah. Thank you very much for your tip! I've just done a quick test and it seems to work well! :D

  • Hi all! :)

    I have a PNG image, which consists in a gradient of transparency: the bottom of the image is fully opaque, and transparency increases towards the top of the image, which is fully transparent.

    When I import it into Construct 3, I see it different than the original image, like if it has been compressed. See the attached image for a comparison between the original image (top) and the same image imported in Construct (bottom), both with a black background, to view the gradient better.

    Any ideas? Maybe there is a setting for images compression that I need to change? Thank you in advance for your help! :)

  • Multiplication has higher precedence than subtraction, so the two equations newt posted are in fact identical.

    If you use a formula like that though the offset eventually becomes a huge negative number, like -10000. That could cause precision issues on the GPU. The best way is to add wrapping with the % operator so the number always stays within a reasonable range.

    Thanks a million Ashley, wrapping with the % operator did the trick. :)

    The formula became:

    (TiledBackground.ImageOffsetX - Speed * dt) % (TiledBackground.ImageWidth)

  • Parallax1Background.ImageOffsetX - Speed * dt

    Is different than:

    Parallax1Background.ImageOffsetX - (Speed * dt)

    Really? I thought that multiplication had precedence over sum, like in all programming languages. Thank you for telling me, I didn't imagine this.

    Anyway, I've just tested the same project on Chrome for Android, and the issue doesn't present. I had this issue on Safari for iPad. Maybe I should file a bug to Construct Team.

  • Hello,

    I’m trying to achieve an auto-scrolling background. To do it, I’m using the following action:

    [System] Every tick: [TiledBackground] Set image X offset to TiledBackground.ImageOffsetX - Speed * dt

    It works but, as time goes by since the start of layout, it begins to stutter. It begins to be noticed after about 45 seconds, and after 75 seconds it becomes very apparent.

    Any ideas about why it happens? Maybe it isn’t the correct way to implement an auto-scrolling background. Any suggestions?

    Thank you in advance for your help! :)

    Link to a minimal Construct 3 project presenting the issue: 1drv.ms/u/s!ArZid5DzDvUXk51aS1m9NLwsiFnSRw

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you both for your answers.

    I've just bought C3 and I'm going to use the new C3 runtime then. :)

  • I read that the new Construct 3 runtime dropped support for Canvas2D, and that it only supports WebGL.

    The best way to monetize HTML5 games is by making mobile web games and sell licenses for them. Is the new runtime still good for making mobile web games, even if it doesn't support Canvas2D?

    Thank you in advance! :)

  • You need to tween a value, say, from (sprite.angle) to (sprite.angle+200). And then while the tween is running, set sprite angle to Tween.value

    You can even make multiple rotations using this method - tween from 0 to 3600 will rotate the sprite 10 times.

    Thank you for your answer and sorry for the late reply: these days I'm very busy and I have little free time only during weekend.

    That's a good idea, but I don't know how to do it with LiteTween. Do you think it is a good addon or do you suggest me a better plugin/behavior for tweens?

    Thanks. :)

  • Hello,

    I need to make a Sprite rotate towards a certain angle using an easing function for a specified duration. Additionally, I would like it to always rotate clockwise, even when it would involve to rotate for a larger amount.

    At the moment I am using the LiteTween Behavior (https://www.construct.net/en/forum/extending-construct-2/addons-29/behavior-litetween-48240). The problem I am facing is that if to reach the target angle the sprite needs to rotate for a smaller amount counter-clockwise, then it does it, while I want it to always rotate clockwise.

    Any ideas about how could I do it? Do you suggest an alternative Behavior/Plugin for tweens?

    Thank you in advance for your help! :)

  • Yeah! I've just re-downloaded C2... Congratulations for the success Scirra !

  • I've just downloaded last release but I can't find the "Hide address bar" option. Will it be back in next release?

    Thank you for your answer.

K1kk0z90's avatar

K1kk0z90

Member since 25 Dec, 2009

None one is following K1kk0z90 yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies