citron2010's Forum Posts

  • I'm wondering whether the "drag and drop" behaviour might be easier to implement than swiping? If you don't mind the character being in intermediate positions whilst it's being dragged, you should be able to snap it into one of your three positions when the player releases. Or maybe make the draggable sprite invisible and have your character snap to it once it crosses a boundary between positions?

  • Trig functions in construct take degrees instead of radians. To fix your formulas just replace 2pi with 360

    Works perfectly - thank you.

  • Hi,

    I want to nerf my AI by adding small random values to some of its parameters but I want the random values to be normally distributed (not uniformly) so more of the time the parameter is close to its nominal value and values further from the nominal value have a lower probability.

    I'm therefore trying to implement the Box-Muller Transform:

    https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform

    And this is a sample project:

    https://drive.google.com/file/d/1VS9lSoW3fFDHSRw3vgaEauZ5tFR5db5T/view?usp=sharing

    This project generates two uniform random numbers which it then uses to generate two normally distributed random numbers using the Box-Muller transformation. It then displays the four numbers on screen then plots them (after multiplying by 100 then adding 100).

    But the second Box-Muller number appears to be too low.

    Anyone know why I'm not getting the kind of distribution shown mid-way down this page:

    https://blog.cupcakephysics.com/computational%20physics/2015/05/10/the-box-muller-algorithm.html

    Bonus question - anyone know any alternative approach? Is there anything in the new "advanced random" object I could use?

    EDIT - cleaned the project up a bit

  • Layouts: 3

    Event sheets: 4

    Total number of events: 450

    Total number of conditions: 487

    Total number of actions: 1223

    Total lines of JavaScript code: 0

    Object types: 166

    Families: 23

    Project was worked on in C2 for maybe six months years ago then restart in C3 six months ago, so 12 months in total. Project is very close to completion.

  • Layouts: 3

    Event sheets: 4

    Total number of events: 450

    Total number of conditions: 487

    Total number of actions: 1223

    Total lines of JavaScript code: 0

    Object types: 166

    Families: 23

    I feel like an amateur!!!

  • I’d been thinking of posting my project’s stats and asking everyone to share theirs. My projects relatively small compared to yours - I’d guess around 10%. Yours seems huge - I’d love to know how others compare.

    Has the saving time slowly increased as you’ve worked on the project or has it recently jumped up?

  • Another pro for sprite fonts is consistency across platforms. I had some issues where text objects looked different on mobile and a post here somewhere suggested switching to sprite fonts which I did and it solved the problem.

  • You could also try making the rope out of individual pixels spaced apart but joined with distance joints. You can then adjust the frequency and damping of these joints - at extreme values, you can get all sorts of weird behavior, so you'll need to experiment. Unfortunately, distance joints are invisible - so what I've done is drawn between the pixels using a drawing canvas that I clear every tick.

  • Touch should be enough, but bear in mind Touch can do more than just a mouse can. You might have already seen this quote from the manual:

    Use mouse input

    If enabled, mouse clicks will simulate touch events. Clicking and dragging the left mouse button will simulate a touch along where mouse dragged, and single clicks will simulate taps. This can be very useful for testing touch events work properly on a desktop computer with no touch input supported. However, only single-touch input can be simulated with a mouse, and a mouse is much more precise than a touch, so it is still best to test on a real touchscreen device.

  • Start a timer then only allow the action if the timer's "is timer running" expression is false.

  • This is the order of events according to the manual:

    On performing a successful purchase:

    1. On purchase success
    2. On transaction finished
    3. On product owned

    So I believe the safest option is to give the IAP only "On product owned"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe check the text input's "is focused" condition and move the other elements down it it's true?

  • I've only tested IAPs on iOS TestFlight so far and not on Google Play, but just wondering whether you're giving the IAP "on purchase success" when "on product owned" or "on transaction finished" might work better?

  • Could you place another sprite on top that starts at zero size then grows to entirely cover the original explosion?

  • Thanks to Ashley for solving this.

    If you request both permissions on iOS, it doesn't work but you only need to request one and both will be requested and, if the user agrees, will be granted.