R0J0hound's Recent Forum Activity

  • You just have to use two numbers to represent a vector. And do math per component.

    So instead of something like c=a+b you’d do:

    cx=ax+bx

    cy=ay+cy

    And instead of normalize(a) it would be:

    mag=sqrt(ax*ax+ay*ay)

    ax = ax/mag

    ay = ay/mag

    And stuff like that. So you may need more variables to to temporarily store the steps of the calculations.

  • Sure, I have discord, reddog. I’ll probably delete this post after you message me though.

  • Ah, you must have edited your post, I thought you posted a link.

    You can think of the rope as a purely visual effect and just move the hook up and down by other means.

    Here's a stripped down version without the collision detection and other extras. It just puts a rope between two sprites with drag and drop. Also added line sprites between the points for added visual. I put settings variables at the top so you can adjust the distance between points, gravity, and fluid friction.

    dropbox.com/s/z8u9sper7u3b6ya/rope.capx

  • Alternatively to using the physics behavior you can do some event based physics. Gives endless things you can tweak to give better results at times.

    You can find more info about this method online by looking up "verlet rope physics".

    Anyways, this roughly follows that with additional tweaks.

    The collision detection was probably the most math. I kind of liked the effect of the chain pulling the player, but you can tweak the mass in event 2 to make the player less or more affected.

    dropbox.com/s/p9fdgbpk59dvc4h/verlet_4.capx

  • If the motion is done with behaviors the collision response when moving along walls has never been great. There hasn’t been much traction in getting it fixed either.

    Smoother wall sliding can be done with events. A fair amount of ideas here:

    construct.net/en/forum/construct-2/how-do-i-18/8-direction-behavior-slide-95148

    When you use two behaviors to move an object at once their velocities are combined. Probably the simplest solution would be to divide the speeds by sqrt(2) when you’re moving and moving sideways to counteract the speed up. Or you can cap the speed by measuring the speed with

    Speed= Distance(0,0, sprite.behavior1.velocityX+sprite.behavior2.velocityX, sprite.behavior1.velocityY+sprite.behavior2.velocityY)

    Then when that’s more than a maxSpeed you’d multiply the speeds of both behaviors by:

    MaxSpeed/speed.

    If a behavior doesn’t have velocityX/y the usually have speed and angleOfMotion. You can calculate xy velocity from that

    Vx=speed*cos(angle)

    Vy=speed*sin(angle)

  • Hmm... I think 3D questions are confusing in general because there are lots of ways to describe things and often the questions aren’t clear.

    Unless I’m understanding wrong you are just looking for a way to rotate 3D objects on other axises? The answer you got so far looks like the start of a way to position the object at an angle from the camera, which is useful but doesn’t change the objects actual rotation.

    For 3D objects you can only rotate on the z-axis, (or on the xy plane). Construct doesn’t provide a way to rotate them any other way.

    The 3D camera can be rotated any way, but not directly. Basically the lookAt action can be used to get any rotation.

    There is a 3D third party plugin by mikal (I don’t have a link but it’s updated regularly) that lets you rotate 3D meshes on other axises too. Hopefully it has a lookAt action to allow the objects to face the camera.

    For a free solution you can make up 3D meshes with sprites using distort meshes. The orientation (or 3D rotation) of the object is a 3x3 matrix which can be represented by a 3x3 array or 9 variables. Anyways, the maths bit is needing to use matrix multiplication to apply rotation.

    RotatedVector = vector x orientation.

    Of course we can only do math with numbers, not vectors and matrices so you’ll have to expand the equations per vector component.

    Search the forum for recent posts by me for some examples of this.

  • I think the main thing you noticed is it’s not stopping at an exact location, but it gets close.

    Instead of checking if the x position is at 4050, you could check if it’s close. Say within 10 pixels away?

    Pick sprite by comparison: abs(4050-sprite.x) <10

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you’d have to test the file reading/writing first to see if that works. I agree it would be a deal breaker if you had to get user permission to do it.

    In general I think you’d have to keep a list in memory of all the chunks, then you could reference that to see if you should load a chunk or just use the generator.

    Chunks could be identified by their position x&”,”&y. Then that list could just be a dictionary.

    That said, if the file saving/loading doesn’t work well you probably could go pretty far by just storing all the chunks in memory. Instead of storing every tile in a chunk you could store just the changed ones, and/or compress/decompress it when saving/loading. You may be able to utilize the binary object if you want a tighter memory usage.

    I’d imagine even in Minecraft the file streaming may have been added later.

  • While it’s a bummer to lose the capx/c3p file for your project, it would be more of a bummer if anyone could take your exported project and get a capx/c3p out of it.

    You’re better off utilizing some kind of undelete program to see if you can find your project file before you deleted it. Or maybe you system was setup to back up your files on the cloud.

  • So I had a quicker idea for how to access data from a list of names or dates. Basically, for all the names you'd add it to an array along with the indices of where it was in the original array. Then you can sort that, add it to a dropdown, and when changing selection you just reference the sorted array to find the original location.

    dropbox.com/s/2cf76xirktuks2d/csv_lists.capx

    Got sidetracked by the csv file format. In your example file it uses semicolons instead of commas, and you didn't use any quotes. Made things simpler to parse. That converter c3p seems to deal with quotes but seems esoteric. Generic csv support seems more involved as it's not super standardized.

  • Can you post an image of your events?

  • Wouldn’t that be interesting. Those systems have quite a bit more limits than PCs so a lot of features even optimally done would be too slow or not possible due to memory, speed or feature limits. That and construct’s engine basically need a browser to run at all.

    I think the tighter the constraints the more the tool needs to be designed around it as it needs to be more optimized.

    A general game creating tool that can adjust its feature set and output stuff like that in addition to html5, widows and such would be pretty cool.

    I mean there’s this tool for nes games:

    thenew8bitheroes.com

    And this one whose goal initially was to make tiny windows games. But does android, sega master system, zx spectrum and a few more. Although the editor seems more buggy.

    zgameeditor.org

    Then there’s this that was made to run on as many platforms as possible. Intriguing but a bit far from a construct editor.

    100r.co/site/uxn_guide.html

    I think it comes down to the program has to be designed with other system exports in mind to support such a wide array of systems with such differing features.