dop2000's Forum Posts

  • You need to decide if all these sprites will be separate objects, or if it can be a single sprite object with multiple animations/frames.

    If you need to spawn many different objects without duplicates, you can name them like Obj1,Obj2,Obj3... and use "System Create by name" action:

    Repeat 20 times
     : Create by name "Obj"&loopindex at (random(1920), random(1080))
    

    If this will be a single sprite - create this sprite, and then set a frame.

    Repeat 20 times
     : Create Sprite at (random(1920), random(1080))
     : Set Spirte animation frame to loopindex
    

    Instead of random position you can use invisible "spawner" sprites - then when creating a new object, pick a random unoccupied spawner.

    jjc001 Creating a family instance will pick a random family member, but this method may produce duplicates. And OP said he needs each sprite to be created only once.

  • Yeah, so basically rays are cast at angles +1,-2,+3,-4...-60, or -1,+2,-3,+4...+60. This is to decrease the number of collision checks and to randomize turn direction. I don't know if you've noticed, but I also decreased LOS angle, otherwise all boids would form a single flock after a few seconds.

    As for the movement, I think Bullet is pretty lightweight. If you move boids with events, I doubt there will be much improvement in performance.

  • how could I get it to be put to all the texts of the project?

    You can add all text objects into a family. And then do "TextFamily On Created -> TextFamily set web font"

  • Then why are you posting in Construct 3 forum?

    construct.net/en/tutorials/how-to-use-a-web-font-in-construct-2-1334

  • I played a little with your project, check it out:

    dropbox.com/s/zansxeb6jmx3lea/TestBoids_2.c3p

    Not sure if this works better or worse, but maybe you can use some of my ideas.

  • Something like this:

    For "n" from 1 to len(text)
     Set textMirrored to textMirrored & mid(text, len(text)-loopindex, 1)
    
  • What exactly doesn't work? It works perfectly fine for me.

  • Are you using Desktop version of the C3? NWJS will not work in the browser! Also, try exporting the project for NWJS.

  • In this case you need to check which side of the screen is touched. If the left side is in touch, you can move the character. If the right side is touched, you can detect the swipe using your method or expressions Touch.SpeedAt, Touch.AngleAt

    But if you both sides of the screen can be in touch at the same time, you need to loop through all active touches. I have something similar in this demo, take a look:

    howtoconstructdemos.com/two-virtual-thumbstick-capx

  • Do you use the same finger to move and to attack?

  • You can make layout size as big as you want. Scroll it using "System Scroll To" action, or add ScrollTo behavior to your character.

    If you mean manual scrolling with touch, check out this demo:

    howtoconstructdemos.com/scroll-by-dragging-the-screen-with-touch-or-mouse

  • You need to import the font into the project. And then use the imported font in all text objects.

    .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • IAP plugin doesn't save anything, it's your job to handle consumable and non-consumabe purchases in your game - for example, when an item is purchased, add it players's inventory and save between sessions. (either to local or to cloud storage)

    Google Play and Apple Store keep track of purchases, and you can request "Restore purchases". But, of course, they do not share this data. It's again your job to keep track of purchases made on different platforms, if you want to allow players to play on multiple devices under one account.

  • I guess the only solution is to release another version in C2, which will load all Webstorage keys and re-save them with Local Storage.

    Then wait a few days/weeks and publish a proper C3 update. Some players may still lose their data (those who skipped that C2 version), but most players should be ok.