citron2010's Forum Posts

  • Do you need to do it every tick?

  • Move that red line down until it hits a sprite:

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

  • I don't think you can save the canvas directly to an array. IIRC, each canvas can only "hold" one image in its URL, so you probably need to save them to local storage then reference them in your array.

    EDIT - or load them straight into sprites - but that could cause memory issues if there’s many

  • In the MULTIPLAYER: REAL-TIME GAME example, I see that local prediction is enabled for the Peer sprite. When I play the game, I see that the sprite moves immediately on the peer and if I disable local prediction, then there’s a noticeable delay.

    So, what’s happening? I see that “on client update”, “inputs” is updated to reflect the peer’s button press states. Then every tick the peer also uses this value to move the sprite locally.

    With prediction disabled, it feels to me that “inputs” is updated once and should be sent to the host and actioned on the peer at the same time – but there’s a delay and I don’t understand why or how it's different to when prediction is enabled.

    I’m also not sure I understand WHEN “on client update” triggers!

    Any guidance would be hugely appreciated.

  • I think you can easily do it without an array. Give your pixel sprites two instance vars: “id” (integer and set it on all sprites from 1 to 64) and “pixel” (string - either “.” or “#”). Then on click pixel sprite, toggle its animation and the value for pixel. In the same on click, clear the text then do a “for each ordered by id” loop on your sprites and append the value of pixel to the text.

    Importantly, also append

    ”””BITMAP “

    before the value for pixel if id mod 7 = 1, and:

    “””” &newline

    afterwards if id mod 7 = 0

    Note the double quotes - to allow you to put quote marks in a string.

    (Edit - fixed the newline being in the wrong place!)

  • Is this on mobile browsers or Cordova exports? iOS and/or Android?

  • github.com/Scirra/Construct-bugs/issues/7684

    Workaround is to reduce the line thickness to 5!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think one way to do it would be to duplicate what you have, remove the simulate action from one and the set animation from the other. Then add the "trigger once while true" condition to the group with the set animation action.

  • I've narrowed it down to a very specific set of circumstances and raised it here:

    github.com/Scirra/Construct-bugs/issues/9125

    I do have a simple workaround so don't mind if it's fixed or not, but I'm certain there's been a change in behaviour that the sample project demonstrates. Maybe there's a more serious bug behind this?

  • First breaking release is r485

  • Could anyone's issue be related to creating objects at run time?

    I have a project that works perfectly in 476.4 but not in 487.

    Essentially, I have a JSON array that lists some images stored in local storage. I loop through the array and create a sprite for each entry and assign an incrementing instance var to the sprite. Once they're all created, I request the first image from local storage and load it into the first sprite, then increment the var and repeat until all are loaded.

    But in 487, the first sprite didn't load on local storage get.

    What I've found I need to do to fix is insert a wait 0 seconds after I've created the sprites otherwise the on local storage get doesn't trigger because it can't find the sprite.

    I can't replicate in a simple minimal project I just created from scratch and I can't upload my project as it is as it uses a private back end so I'd have to deconstruct it which might take a while.

    But the wait 0 workaround works for me, so I'm not too concerned - but just thought my findings might help others.

  • > I have this problem too. The solution for me was to untick HTML Layer. It wasn't needed in my case.

    > But if HTML Layer is needed Construct team need to do something to fix the problem.

    >

    > Please make a bug report on the github link in the post above.

    > Ashley needs to fix this

    Be good if you could add specifics or your issue here:

    https://github.com/Scirra/Construct-bugs/issues/9106

    paala

    Ashley pointed out that this had already been raised here:

    https://github.com/Scirra/Construct-bugs/issues/9057

    And he's raised it on the webkit issues board here:

    https://bugs.webkit.org/show_bug.cgi?id=312987

    I've just commented on that - so if you could too, it might bump its urgency.

  • thanks, helpful

    citron2010 but how did you do multiple languages with SpriteFont? Did you just use multiple seperate objects? And hide the ones that aren't being used?

    Because when generating the SpriteFont image, you normally need to use seperate font files for different languages, as the SpriteFont tools seem to only allow for one font file.

    It's my last bullet point:

    Then I used an image editor to merge that sprite font with my original one

    Literally just open the first, expand the canvas, then paste the second one at the bottom.

    To expand upon that, there's a little tip. Let's say that that I generate the first sprite font with 19 chars per row and have 100 characters - that's 5 rows of 19 characters and the final row has just 5.

    So when I use stmn.itch.io/font2bitmap to generate the second one, I insert 5 random characters at the start of the characters list.

    Then use an image editor to delete these from the generated sprite sheet.

    This means that the second sprite sheet's first character now starts at column 6 (not column 1) so it makes pasting the second at the bottom of the first easier.

    Then import the new sprite sheet in to the sprite font and append the new characters into the "Character set" property.

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/date

    The example linked there is doing exactly what you want.