Laurent's Forum Posts

  • My game has a drog and drop function where an Object sprite can be droped on a Document sprite. Document sprite can have many zones. Object changes appearance (ie changes frame) dependong on the zone it is dropped on.

    I have made a system where the Document has 2 images point (0 and 1). When Object is dropped on Document, I check the distance between the Object sprite coordinates and the Document imagepoint.

    I have many objects and many documents so I put all of them in families Objets and Documents.

    My code is :

    + System: distance(Objets.X,Objets.Y,Documents.ImagePointX(1),Documents.ImagePointY(1)) < 100

    -> Objets: Set animation frame to 1

    + System: Else

    -> Objets: Set animation frame to 0

    So I'm testing proximity to Imagepoint 1

    My code works when a Document has ImagePoint 0 and 1.

    Some documents have no Imagepoint 1, only Imagepoint 0, and my code behaves like if Imagepoint 0 was Imagepoint 1.

    Is it Constructs that uses Immagepoint 0 if there is no ImagePoint 1 or something I did wrong ?

  • That's a very interesting way to achieve this ! That would be great.

    When do you think this can be implemented ?

    thank you :)

  • Installing a game to home screen is the best way for users to experience the best of a game but I see most of them don't know about this option and continue to use gmae in the browser.

    Is there a way to suggest this installation and trigger it directly from the game (with a button for example) ?

    Tagged:

  • Thanks for this very instructive topic !

    So you gave up xcode export to cordova export ?

    In tour second post, you write :

    I got Cordova installed

    Then cordova prepare (had to install several dependencies to get this to work)

    Could you detail the whole install process including the 'several dependancies' ?

    I'll in the process of making my own app in a few weeks and your progress are veray useful to me. thanks !

  • I am having exact same issue.

    Managed to get to build and run in xcode by removing reference to pod but this is not ideal

    And this way you're able to make a build accepted by apple store ?

    Can you detail the process of removing references ?

  • Hello,

    I try to create a ios game but I'm confronted to the usual missing pod problem in xCode.

    I saw dicussions* on the forum but I didn't manage to get it all. Maybe because the whole process in not clearly explained from a beginner's point of view.

    Could someone explain how to do it form the beginning, from ruby installation with the Terminal, to the "install pod" instruction ?

    The user Chadori seemed to get the all process right. Would them give us all a dearly needed tutorial ?

    thanks

    *here for example :

    construct.net/en/forum/construct-3/how-do-i-8/unsupported-swift-version-175969

    Tagged:

  • OK, I got it working. But result can make the game very very difficult this way.

    Sprites react differently to each other, depending on their speed.

    Thus, A moving on B stationary gives C

    and B moving on A stationary gives D

    This is clear when aiming at A with B, but when A and B are stacked in the game and a sprite is thrown onto the stack, A and B have 2 ways of reacting depending on the speed they take with the shock.

    This is unpredictable for the player and can be a nightmare when it comes to strategizing.

    I'm still experimenting because it's interesting.

  • I didn't manage to have it work with speed comparaison so I tried something to understand how Construct considers sprites and families.

    I have a sprite Token and an family Ball made only with a Token sprite.

    In this example, Token falls from the top of layout when clicked on. When it collides with another Token, test is :

    -Token on collision with Ball

    i made a test to see how Construct considers the sprites, as Token or Ball and then write either state on the sprite.

    Most of the time, faling sprite is considered as Ball and motionless sprite as Token.

    But it appears it is not that simple, because sometimes it can be the other way or even two Token or balls...

    File is here :

    dropbox.com/scl/fi/dhbsl4so4nob83ynz9rxw/jeu.c3p

  • How do I compare speed ? I found this formula (in one of your post I guess), will it do ?

    Speed = distance(0, 0, object.physics.VelocityX, object.physics.VelocityY)

    And most of all, how do I consider the two colliding sprite instances among all the instances that are in the game ? So far, I used the trick of having a sprite and a family with only this sprite but I guess there's a smarter way to achieve this.

  • Actually, since dragndrop is disabled on active sprite, I only have one event left : on collision

    Logic should consider two equivalent sprites that differ only by their velocity. Active sprite is the one with higher speed.

    What about something like :

    - when instance A of Sprite collides with instance B of Sprite

    - Compare instance A speed to instance B speed.

    - If instance A speed > instance B speed -> destroy both sprites and create instance Sprite C with animation frame 1

    - If instance A speed < instance B speed -> destroy both sprites and create instance Sprite C with animation frame 2

    result of speed comparison is not a problem but I have a hard time creating the mechanics to set this comparison up.

  • Actually, sprites are dropped from the top of the screen and pile at the bottom. So when falling sprite collides with another, its dragndrop behaviour is disabled since drop had occured. And more, when a sprite falls, it can shake the whole pile and create a chain reaction of collisions.

    So we can assume that maybe, active sprite is the one that has motion and passive the one that has not (sprite has physics behaviour). And if both are in motion, active one is the one with the highest speed

  • I'm making a craft game.

    Basically, when a sprite collides with another sprite, a new sprite is created.

    All elements of the crafting game are stored as animation-frames of a single sprite.

    Thing is who collisions with who is relevant :

    - water poored on fire = coal

    - fire thrown on water = steam.

    So I need to know which sprite is active and which one is passive.

    So far, I have a sprite 'Element' and a family made of this unique sprite called 'Elements-fam'.

    When I check:

    - 'Element': on collision with "Elements-fam"

    Am I sure that Element is the active one and Elements-fam the passive one ?

    Note that :

    - passive sprite can be in motion

    - after collision, passive sprite can be considered as an active sprite if collision with active sprite sets it in motion. A chain reaction may occur

  • You can use the Advanced Random plugin to create a probability table.

    Thanks.

    Do you have an example for this ? I had a look and it seems quite obscure to me

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Choose expression is very interesting but every item in it has the same probability to come out.

    Is there a possibility to add probability so that when Choose(a,b,c) is called, I have 50% chances to have 'a' and 25% chances to have 'b' or 'c' ?

  • I found a way to have it working using family

    - Red sprite is in Red family

    - When Red sprite collides with Red family instance, create a new sprite at the middle of Sprite and Family instance position. Construct uses coordinates of both elements involved in collision and everything works fine :)