winkr7's Forum Posts

  • Colludium

    thanks lots. So the inputs are still from 0 to 100 (except damping which is 0 to 1)?

    yours

    winkr7

  • Hello Colludium;

    The viscous behavior is supposed to clipped to 100 is that correct? If I set it to 590 it crashes the elastic demo.

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    // only added these two lines

    -> ctrl: LFJS Turn Viscous behavior ON for spawning

    -> ctrl: LFJS Particle system viscous strength: 590

    // end addition

    the console value is:

    ncaught (in promise) RuntimeError: float unrepresentable in integer range

    at wasm-function[513]:0x2aa3e

    at wasm-function[559]:0x3605e

    at wasm-function[445]:0x20694

    at wasm-function[94]:0x54b3

    You could set up a test program that walks through all the possible (and some not possible) values for all the variables and see what crashes it.

    thanks for your time

    yours

    winrk7

  • Colludium;

    Thanks for the quick response. It doesn't crash now, but the parameter doesn't seem to do anything. I assume it is clamped between 0 and 1.

    Still, it is best not to crash. I have the feeling they left out the division by zero checks and reasonable value checks in the interest of speed. Do I get the clamp values from the google site?

    thanks again.

    yours

    winkr7

  • Colludium;

    Hello, I found another problem.

    I am still using the elastic example. If I adjust the particle system damping parameter it runs fine with a value of 6 and bellow with interesting effects at 6. If I set it to 7 or above I get this error on the console:

    Uncaught (in promise) RuntimeError: float unrepresentable in integer range

    at wasm-function[513]:0x2aa3e

    at wasm-function[559]:0x3605e

    at wasm-function[445]:0x20694

    at wasm-function[94]:0x54b3

    at _0x3c5115.<computed> (blob:https://preview.construct.net/062ea27e-a403-4169-a558-2188caa1a6ee:1:76825)

    at _0x3442af.<computed>.<computed> [as Step] (blob:https://preview.construct.net/062ea27e-a403-4169-a558-2188caa1a6ee:1:132909)

    at LFJSInstance.Tick (blob:https://preview.construct.net/af3aadf6-b18d-4ea5-913e-69960c163866:2360:26)

    at C3.Runtime._BehaviorTick (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:25340)

    at C3.Runtime.Step (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:26912)

    at async C3.Runtime.Tick (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:25977)

    ==================================================================================================

    Here is the exact code I am running--I am only changing line 4.

    + System: On start of layout

    -> ctrl: LFJS World: fixed step rate

    -> ctrl: LFJS Set World Step 30 steps/sec FPS

    -> ctrl: LFJS Particle system damping: 7

    -> ctrl: LFJS Set particle as the particle object

    // The Elastic or Spring flags needs to be set before spawn otherwise they cannot be set later.

    When the particles are created they are bound to their neighbors.

    // This is all the Liquidfun documentation says about Elastic particles:

    Elastic particles deform and may also bounce when they collide with rigid bodies.

    From the cpp code, Elastic particles are connected in triads, or 3s.

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    -> ctrl: LFJS Set spawn color to rgba(250,140,30,255)

    -> ctrl: LFJS Create particle "tag", shape box at 160, 300, width 200, height 200, angle 0

    // This is what the documentation says about Spring particles:

    Spring particles produce the effect of being attached to one another, as by a

    spring. Particles are "connected" in pairs. Each particle is connected to the

    one that was closest to it at time of creation. Once paired, particles do not

    change "partners." The farther an external force pulls them from one another,

    the greater the power with which they collide when that external force is

    removed. No matter how far particles get from one another, the connection

    between them does not "snap."

    -> ctrl: LFJS Turn Spring behavior ON for spawning

    -> ctrl: LFJS Set spawn color to rgba(100,220,60,255)

    -> ctrl: LFJS Create particle "tag2", shape box at 440, 300, width 200, height 200, angle 0

    thanks for your time.

    winkr7

  • Colludium

    Thanks for the quick fix. You might want to consider the elastic reconstitution as part of the demo--it is really impressive to watch shapes rising up out of the sea.

    yours

    winkr7

  • I use it on android during my commute and on my PC. The cloud save makes it easy to pick right up where you left off on whatever machine you are on.

    yours

    winkr7

  • Hello Collodium;

    I was using your elastic particle demo (see below for exact code) and I thought I would see what happens when the elastic particle group loses elasticity and melts and then regains it. This works fine for one group (just "tag" or "tag2") and its fun to watch it jump back together.

    However when I do both at once it freezes and sends this message (see below) to the console.

    thanks for your time.

    yours

    winkr7

    + System: On start of layout

    -> ctrl: LFJS World: fixed step rate

    -> ctrl: LFJS Set World Step 30 steps/sec FPS

    -> ctrl: LFJS Set particle as the particle object

    // The Elastic or Spring flags needs to be set before spawn otherwise they cannot be set later.

    When the particles are created they are bound to their neighbors.

    // This is all the Liquidfun documentation says about Elastic particles:

    Elastic particles deform and may also bounce when they collide with rigid bodies.

    From the cpp code, Elastic particles are connected in triads, or 3s.

    -> ctrl: LFJS Turn Spring behavior OFF for spawning

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    -> ctrl: LFJS Particle group "tag" Rigid: ON

    -> ctrl: LFJS Particle system elastic strength: 100

    -> ctrl: LFJS Particle system spring strength: 100

    -> ctrl: LFJS Set spawn color to rgba(250,140,30,255)

    -> ctrl: LFJS Create particle "tag", shape box at 160, 300, width 200, height 200, angle 0

    // This is what the documentation says about Spring particles:

    Spring particles produce the effect of being attached to one another, as by a

    spring. Particles are "connected" in pairs. Each particle is connected to the

    one that was closest to it at time of creation. Once paired, particles do not

    change "partners." The farther an external force pulls them from one another,

    the greater the power with which they collide when that external force is

    removed. No matter how far particles get from one another, the connection

    between them does not "snap."

    -> ctrl: LFJS Turn Spring behavior ON for spawning

    -> ctrl: LFJS Turn Elastic behavior OFF for spawning

    -> ctrl: LFJS Set spawn color to rgba(100,220,60,255)

    -> ctrl: LFJS Create particle "tag2", shape box at 440, 300, width 200, height 200, angle 0

    ----+ (no conditions)

    -----> System: Wait 4 seconds

    --------+ (no conditions)

    ---------> ctrl: LFJS Group "tag" all particles set Elastic behavior OFF

    ---------> ctrl: LFJS Group "tag2" all particles set Spring behavior OFF

    ---------> System: Wait 4 seconds

    ---------> ctrl: LFJS Group "tag" all particles set Elastic behavior ON

    ---------> ctrl: LFJS Group "tag2" all particles set Spring behavior ON

    // here is the freeze this is the console text :

    dd5c0979-a104-4195-9e94-a6b37ce18f4c:1 Uncaught (in promise) RuntimeError: float unrepresentable in integer range

    at wasm-function[475]:0x239ac

    at wasm-function[514]:0x2b3cd

    at wasm-function[559]:0x36193

    at wasm-function[445]:0x20694

    at wasm-function[94]:0x54b3

    at _0x5bebeb.<computed> (blob:https://preview.construct.net/dd5c0979-a104-4195-9e94-a6b37ce18f4c:1:75982)

    at _0x49a3a9.<computed>.Step (blob:https://preview.construct.net/dd5c0979-a104-4195-9e94-a6b37ce18f4c:1:131885)

    at LFJSInstance.Tick (blob:https://preview.construct.net/7381ba8a-306d-4a33-abc7-1ceb43f5b5d1:2360:26)

    at C3.Runtime._BehaviorTick (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:25340)

    at C3.Runtime.Step (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:26912)

  • Hello;

    Does anyone have any suggestions about an effect I can use to make the collection of particles blend to a liquid look? I think I have seen effects that give a blob of particles more of an edge and smooth out the small gaps in the liquid.

    thanks

    yours

    winkr7

  • Colludium;

    Yes, it looks like it is working on the elastic demo and the create particles demo.

    thanks for the fix.

    yours

    winkr7

  • Colludium;

    Thanks for the response and the example. Am I looking for a very subtle difference between 1 and 99 solid on and off?. I tried every combination in the example you sent and they all look the same--including leaving solid on and never shutting it down. I also don't see anything in the For the Particles - Create Singles.c3p so I suspect maybe I never did the install correctly. I will try it from scratch on my home computer and see if that makes a difference this evening. I can see other people have gotten the jello-like behavior to work so it must be possible.

    thanks for your time.

    yours

    winkr7

  • Colludium;

    I am running your example Particles - Behavior Flags - Elastic.cp3.

    I am trying to get the particle groups to stick together and not flow away by adjusting

    the parameter "particle system elastic strength" a value from 0 to 100 (according to the documentation)

    I only added one line to the example (see below). It does not have any effect if it is 1 or 99.

    Can you explain how I make the block more stiff like a rubber box instead of a liquid?

    (I tried setting spring strength too.)

    (I noticed that Particles - createsingles.c3p does not create any particles I can see)

    thanks for your time

    winkr7

    // This is all the Liquidfun documentation says about Elastic particles:

    Elastic particles deform and may also bounce when they collide with rigid bodies.

    From the cpp code, Elastic particles are connected in triads, or 3s.

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    // next line elastic strength to 99 (tried 9--makes no difference)

    -> ctrl: LFJS Particle system elastic strength: 99

    // end changes

    -> ctrl: LFJS Set spawn color to rgba(250,140,30,255)

    -> ctrl: LFJS Create particle "tag", shape box at 160, 300, width 200, height 200, angle 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello Bl4ckSh33p;

    I tried to get the kind of control you are talking about to work with the car movement. Here is what I came up with.

    yours

    winkr7

    + Touch: Is touching moveControl

    // tam

    | Local number thetaOpp‎ = 0

    | Local number theta‎ = 0

    | Local boolean finished‎ = false

    | Local number curPilot‎ = 0

    | Local constant number steeringAngleExtra‎ = 0.1

    | Local string asc‎ =

    | Local string apc‎ =

    | Local constant number reverseBackAngle‎ = 30

    //

    ----+ (no conditions)

    -----> [DISABLED] System: Set curPilot to Functions.retrieveStore("currentPilot")

    -----> System: Set curPilot to Functions.getCurrentPilot

    -----> System: Set theta to angle(moveControl.X,moveControl.Y,Touch.X("hudTch"),Touch.Y("hudTch"))

    -----> System: Set thetaOpp to theta+180

    -----> System: Set asc to Functions.spCoord(moveControl.UID)

    ----+ pilot: Pick instance with UID curPilot

    --------+ pilot: Within reverseBackAngle degrees of thetaOpp

    ------------+ (no conditions)

    -------------> pilot: Simulate pilotCar pressing Brake

    -------------> redMoveArrow: Set position to (moveControl.X, moveControl.Y)

    -------------> redMoveArrow: Set angle to theta degrees

    -------------> redMoveArrow: Set width to moveControl.Width

    -------------> redMoveArrow: redArrowFade: restart fade

    -------------> System: Set finished to True

    ----------------+ pilot: [X] Within 2 degrees of thetaOpp

    --------------------+ pilot: Is clockwise from thetaOpp

    ------------------------+ (no conditions)

    -------------------------> pilot: Simulate pilotCar pressing Steer left

    --------------------+ System: Else

    ------------------------+ (no conditions)

    -------------------------> pilot: Simulate pilotCar pressing Steer right

    --------------------+ (no conditions)

    ---------------------> (no actions)

    --------+ System: [X] Is finished

    --------+ pilot: Within (180-reverseBackAngle) degrees of theta

    ------------+ (no conditions)

    -------------> pilot: Simulate pilotCar pressing Accelerate

    -------------> greenMoveArrow: Set position to (moveControl.X, moveControl.Y)

    -------------> greenMoveArrow: Set angle to theta degrees

    -------------> greenMoveArrow: Set width to moveControl.Width

    -------------> greenMoveArrow: greenArrowFade: restart fade

    -------------> System: Set finished to True

    ------------+ pilot: [X] Within 2 degrees of theta

    ----------------+ pilot: Is clockwise from theta

    --------------------+ (no conditions)

    ---------------------> pilot: Simulate pilotCar pressing Steer left

    ---------------------> pilot: Rotate steeringAngleExtra degrees counter-clockwise

    ----------------+ System: Else

    --------------------+ (no conditions)

    ---------------------> pilot: Simulate pilotCar pressing Steer right

    ---------------------> pilot: Rotate steeringAngleExtra degrees clockwise

    ----------------+ (no conditions)

    -----------------> (no actions)

  • Hello;

    How do I set up one of these elastic matrix shapes? Is it body type particle system? When I put a single sprite on the screen, set it as Dynamic and do nothing else it falls with gravity. If I make it a particle system it just sits there.

    If I could get a simple elastic example I would be pleased. All it has to do is fall on the floor and squish a little.

    yours

    winkr7

  • in some games the player does "editing" too.

    I have a game where the player builds his ship out of parts. Some of those parts are armor and he wants to know while he is building his ship in game--how much is cosmetic and what is the real pollygon?

    I could make up collision polygon shaped sprites and show that or put image points on pollygon points and draw lines or--you could tell me where the polygom points are.

    There are work arounds--just sometimes you want to know where they are. For me it would not be a high priority--but since you asked thats why.

    yours

    Winkr7

  • I would, sometimes you want to show polly even for the end game user.

    You could put an image point at each polygon point if you need to, but it would be easier to have access.

    yours

    winkr7