Joao Daniel 2022's Forum Posts

  • Wow, personal life, no one can help me, is it some mistake on my part that's so silly?

    Wow, my friend, you helped me so much! I’m super happy. God bless you for your precious time. If I could, I would give you 5 stars—you’re amazing!

  • Wow, personal life, no one can help me, is it some mistake on my part that's so silly?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone, I need your help to solve a problem I’m facing. I’m developing my game with a level editor, and I encrypt the level files so that players can share them locally.

    Here’s what I do:

    I save all the level data in a dictionary.

    Then I set the buffer:

    BinaryData: Set buffer to text UTF-8 Dictionary.AsJSON

    Then I encrypt it:

    Encryption: Encrypt BinaryData using AES-GCM algorithm, password "" (100,000 iterations, tag "en")

    Then I use this action to download:

    Browser: Invoke download of string BinaryData.GetBase64 with MIME type ".bin" and filename LevelName & ".bin"

    So far, everything works fine: the final file is encrypted and exported, and I can decrypt it normally when opening it in the game.

    However, on the Android version, it’s not working. I’m trying to share the final file using:

    + AJAX: On completed "saved"

    -> Share: Add file LevelName & ".bin" type ".bin" from BinaryData

    -> Share: Share text "Save" & LevelName (title "", URL "")

    But this is saving other types of characters inside the file, which I cannot read when importing it back into the project.

    Could someone help me with this, please?

    This is my game file when encrypted it is saved on PC

    and this is the file when I export it from the game on Android.. which is formatting to another type and then I can't load it into the game again

    If I download the dictionary json file without encryption using share, it saves normally but remains unprotected, I would like to save the encrypted file on Android without this problem. I tried all the modules, application/json, application/octet-stream, application/zip and nothing, it seems that the error is in the part that adds bynare when sharing, sorry I'm gentle in this data area so I would really like your help

  • Hello everyone, I have a question about the file system. Now with the new foundation of saving and loading local files, is it possible to share levels created in a level builder game?

  • blob: URLs are not shareable - they represent local data only. You can however use AJAX to load a blob: URL in to a Binary Data object, and then share the Binary Data object as a file.

    Hi Ashley! I managed to switch to the share plugin, and I put it in .mp4, but when I share it on whatsapp or telegram, I can even play it on the sharing screen in the apps, but it doesn't upload to the apps or anywhere else. not sharing always gives error when trying to share,

  • Hey guys! I'm having trouble saving a video file from the game recorder on android, I'm using the share plugin to get the url of the video record, but it gets a localhost link..... and not a video file, like can i fix this?

    Tagged:

  • Hi everyone, I'm new to the file hosting area, I don't understand anything about saving and loading files on a server, I noticed that in the construct there is no option to load a file on the device/computer, could this be possible in a future version of c3?

    is the following, I am creating a level maker game and in this game there will be an option to save a level so that other people can download and play when they open the game, can you tell me if there is any free site to host these files? And if not, can you point me to the best hosting sites at a lower cost? this is just the first step i will need help to implement the codes in c3, thanks for now ^_^

    Tagged:

  • > it worked but there is always a frame late

    So it is working! You need to adjust your animation, maybe remove the first frame, or move it to the end of the animation. I can't tell you the exact solution because you didn't share your project.

    Thank you very much, you are helping me a lot, I used your idea for the units not to overlap on top of each other, but for some reason when the ones that are moving when they pass over another one that is stationary, then what moves too so, any ideas for the unit that is moving instead of going over the other one just dodge to the sides until you find an exit?

  • The turret sprite (which is rotating) should be invisible.

    The animation sprite (with 32 frames) should be on top of the turret, and should not rotate.

    The "a" in my formula is the angle of the turret sprite.

    I understand what you mean with an invisible sprite to run with a turret and the cannon goes on top visible, I tried your method but the angle still didn't work, the frames were messed up, I did this:

    + System: For each Tank1_Arm

    + Tank1_ArmTurret: ArmUID = Tank1_Arm.UID

    -> Tank1_Arm: Set animation frame to round(((Tank1_ArmTurret.Angle + 360) % 360) ÷ (360 ÷ 32)) % 32

    it worked but there is always a frame late

  • You can't rotate the same sprite!

    The rotating turret sprite should probably be invisible. And then there is another sprite on top of it, which is playing the rotating animation.

    in fact the cannon is positioned on top of the tank and what is rotating is the cannon itself, really i don't know what's wrong

  • Try something like this:

    Set animation frame to round(((a+360)%360)/32)%32

    Where a is the turret angle.

    Hey! I did it the way you taught me but it's not working, the frames are all messed up and don't fit the angle

  • This is difficult. Try searching the forum, many people have asked this question.

    I have a couple of examples, but they are quite complicated and not very good.

    https://howtoconstructdemos.com/avoid-overlapping-while-moving-with-pathfinding/

    https://howtoconstructdemos.com/prevent-multiple-enemies-with-pathfinding-from-overlapping-easystarjs/

    Thanks for the examples I will study them.

    I managed to solve the 8-way angle problems, I need help solving this problem, I have 32-frame angle units, this image turret needs to adjust the frames along with the rotation of the "Turret" behavior, how can I do this?

  • dop2000

    Thanks man, now I need to know how I do it so that when I select several of the same unit, they move in groups side by side the same in age of empires

    media.moddb.com/cache/images/mods/1/24/23053/thumb_620x2000/New15.png

  • When moving angle between -45 and 45 : "right" animation

    Between 45 and 135: "down"

    Between 135 and 225: "left"

    Between 225 and 315: "up"

    i'm really not very good at math, i was trying to do the angle calculation in construct 3 which is different from a 360 ruler so i was struggling, thanks for helping me get my mind to work now i really got it working the angle in c3 and managed to do the calculations, God bless you

  • If you are controlling the character with keyboard keys, then 8direction will be the best choice. Otherwise you can use MoveTo or Pathfinding (if there are obstacles and units should walk around them).

    Check out this example:

    https://editor.construct.net/#open=pathfinding-groups

    All these behaviors have MovingAngle expression, which you can use to set the correct animation. See these tutorials:

    https://www.construct.net/en/tutorials/animation-management-8-712

    https://www.construct.net/en/tutorials/direction-based-sprite-251

    Hey! can you help me with these angles?