R0J0hound's Recent Forum Activity

  • So here's an example with cubes.

    dropbox.com/s/zd3ur98uvok1523/cube_raycast.c3p

    It calculates the orientation of a 3dcamera that was set with the "look at" action.

    It then does a raycast from the mouse into the screen.

    It then positions a new cube by rounding the 3d position on a grid.

  • Here is the closest I’ve come to that. It does a raycast from the mouse to a triangle mesh. The camera has a fixed fov and orientation.

    construct.net/en/forum/construct-3/your-construct-creations-9/3d-raycasting-obj-loader-test-167475

    Basically it’s all from scratch with math as construct doesn’t provide anything that helps. Getting the ray direction from the mouse involves the inverse of the view and camera matrices. Construct doesn’t expose those, maybe you can find them with scripting, or like in that c3p you can make your own from scratch that matches. To simplify the math I went with using a fixed camera orientation.

    Then it just does a Ray vs triangle calculation with a bunch of math. Construct doesn’t provide a way to access the mesh points or list of triangles so again, we have to build that ourselves and replicate the 3D objects with distort meshes.

    With just cubes I think things can be simplified a lot. We’d still need to calculate the Ray direction from the mouse but if we used signed distance fields (sdf) of boxes we could do the actual Ray casting a bit faster.

    Anyways, just thinking aloud here.

  • Events provide the most flexibility. JavaScript would be faster but is more quirky integrating with other construct features.

    Personally I have no interest in making plugins and the maintenance they require. Also they are inherently more limited by what features are provided.

    On face value it would make sense to tie this to the physics behavior but in practice it would be better to make something completely independent.

  • The cursor is set with the css cursor style. Probably it’s only set for the canvas element with that mouse action. So I think you’d either have to set the cursor for each html element or there may be a way to set the cursor for the whole page for every element. Although I’m not sure.

    developer.mozilla.org/en-US/docs/Web/CSS/cursor

  • If you setup the variables with different values, sure.

  • for each sprite3

    pick sprite2 instance loopindex

    pick sprite1 instance sprite2.animationFrame

    -- sprite3: set frame to Sprite1.AnimationFrame

  • That link really doesn't have any info how to do it. Most it says is the points only move along their radius line, but nothing else on how to make it match agario. The link to code is broken. It looks slightly different. Maybe the secret is to do a full on collision response between points and edges, so maybe another day.

    dropbox.com/s/ek59bdqrq71579v/blob_squish3.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The end result is pretty much the same for either shuffle. I'm always on the look for a simpler way to do it.

    You can do that rearranging with just text like so:

    listA = "DCAB"
    listB = "3142"
    listC = ""
    
    start of layout
    repeat 4 times
    -- add mid(listA, find(listB, str(loopindex+1)), 1) to listC

    To do it with picking sprites it would be tedious. You can convert a row of sprites to text with:

    list = ""
    
    start of layout
    sprite: group=0
    for each sprite ordered by sprite.x
    -- add str(sprite.animationFrame) to list

    or you can use one of these in the add to list action if you want named frames

    mid("ABCD", sprite.animationFrame, 1)

    mid("1234", sprite.animationFrame, 1)

  • One idea is to check the points one the edges of the circles and move them out of other circles. It's not exactly the same but gives a blob like quality to the objects.

    Circles are done by using a distort mesh with a square.

    dropbox.com/s/5w7z6s6vmio4ztr/blob_squish2.c3p

  • I really don't understand. It seems to be the same as what the last capx does. I used the digits 0123 instead of ABCD mainly as a simplification. You can set the frame images to whatever.

    Anyways I had another idea on how to do the shuffling. Might me useful.

    Basically a1, a2 and a3 are the three answers. a1 is the correct one. ansIndex is a number 0-2 that offsets the order of the answers. The final step is to display the three answers by converting ABCD to 0123 to set the frames.

    Events 1-7 is enough to generate the answers. You can use any other solution to display them after that.

    dropbox.com/s/fusumitrtn0q3ya/shuffle_combinations2.capx

  • I fixed that issue so redownload. It should always show the answer sequence now.

    I don’t understand the first part of your question though.

    Best I understand you have want three four digit answers. One you can specify and the other two are shuffled versions of that.

    I had the digits start at 0 instead of 1, but all the numbers will be shuffled versions of 0123.