citron2010's Forum Posts

  • Thanks, R0J0! I'm trying to do it with Canvas instead :))

    I used a canvas layer for the baskets in:

    https://www.flippeeball.com

    The sides of the nets are each made up of three line-shaped sprites connected with revolute joints. The "knots" of the net are all sprites too and they're all connected up with distance joints - but distance joints are invisible so I draw between the knots using the canvas layer.

    As for your problem, I think this might work: make the spring from several segments connected with revolute joints. Then have two immovable/invisible sprites - one above the end of the spring and one below. Then attach distance joints from each to the tip of the spring. Actually, I think you might need a third - to the right of the spring's tip - to hold it taut.

    EDIT: Just realised that I don't think my solution will make the spring bend in a curve. Maybe you need multiple distance joints above and below. Or maybe you've solved it by drawing a curve that's not actually represented by a physics object.

  • alastair - many thanks for confirming all this - looks like I'll have to implement something similar to what you did!

  • This is really frustrating me - all I want is to be able to control a menu option cursor with controller D-Pads. I have two cheap PS1 lookalikes that report axis changes when the D-Pad is pressed (this happens in Construct, the Windows Control Panel applet, and in hardwaretester.com/gamepad on both Chrome and Firefox).

    But after reading this post, I now find that it's more common for D-Pads to report button presses - but even that seems inconsistent - the only other hardware I have access to are some Nintendo Switch joycons - for Left/Up/Right/Down, they report buttons:

    14, 12, 15, 13

    But Google's found the results for a "WII Classic D-Pad" is:

    12, 11, 14, 13

    (https://www.allegro.cc/forums/thread/608275/930495#target)

    And for a PS2 controller:

    15, 12, 13, 14

    (flickr.com/photos/73073372@N00/3896185001)

    So do I really have to take at least four different configurations into account?

    I feel that I must be missing some really obvious and simple way of handling this!

  • I had to switch to a sprite font for the same reason.

  • Not sure why that doesn't work. Are you saying that both are always triggered when you double-tap the screen?

    One workaround might be to ignore using "on (double)tap gesture" and instead use a combination of "On any touch start" & "TouchCount".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been testing using a couple of generic PS1-style controllers which report their D-Pad movements as axis changes.

    Just connected a pair of Nintendo Switch Joycons and noticed their D-Pads report button presses.

    So I either need to wait to see when/if that bug's fixed, or handle all cases manually.

    I now feel I need to get my hands on a modern PS controller and an XBox controller to check how they respond too.

  • Unless I'm missing something, I can't see how it would be possible to pick something that's just been destroyed.

  • I found this calculator invaluable:

    omnicalculator.com/physics/projectile-motion

  • BTW if set size 100x100 through object properties it will return 200...

    Same! I have no idea what's happening though.

  • Firstly, you need to square 64, so 64 x 64 = 4096

    So why does Construct think the density is 81? 81 is the square of 9, so I'm guessing Construct thinks the box is 9 x 9 for some reason - maybe it's resized in the layout?

    I'm curious too so am about to experiment, but if you can also upload the project, that might help.

    EDIT - I just recreated your steps and mine's reporting a mass of 81.9199979305! No idea why! I'll keep experimenting...

    EDIT 2 - added a sprite with size = 64 x 64 (instead of 1 x 1) and get the same mass...

  • I came across this issue whilst trying to enable UI navigation - the D-pad button's aren't buttons - at least as far as Construct is concerned. Instead you need to use gamepad.axis to detect if they're pressed.

  • Google "scrolling background" instead of parallax

  • I would check how often this save function is called. Can it be called when the app is resumed from the background? If this is the case and the app crashes at the same time, this definitely can corrupt the data.

    Make sure that you are not writing to LS too often.

    Oh - this might be really helpful. I DO write often - every second when a match (basketball/pinball hybrid) is in progress. This was an anti-cheat measure - before, if I was losing a game, I could force quit the app, restart and play that match again. I’ll increase the time between writes a little and see if that helps. Thanks!

  • How would I go about troubleshooting a crash (if in indeed that's what's happening) that only happens intermittently if the game has been in the background for a long time and other apps have have been opened (that presumably use up all the OS's RAM)?

    Can Xcode help with this?

    I wish I understood more about how Construct/iOS/Webview works with local storage...

  • You probably answered your own question, sounds like the app crashed so nothing was saved.

    I've just done a test on Windows (WebView2) - I figured out that local storage is written to this file:

    C:\Users\<username>\AppData\Local\<game name>\EBWebView\Default\IndexedDB\https_app.localhost_0.indexeddb.leveldb\000003.log

    And that file is updated as soon as I call: LocalStorage - Set Item

    So even if the app crashed, the data's already written to disk.

    Maybe iOS handles it differently? Maybe if the app crashes, the OS rolls back the local storage to a previous version? (It looks like that 000003.log file contains all previous entries, so in theory the OS could roll back).