Sumyjkl's Recent Forum Activity

  • Never would have suspected that. Thanks for the help!

    Here's the result. Seems to work so far.

  • So I just ran into this really stupid thing, and I have no idea how it would even be possible for it not to work.

    Basically, I have an object I move around with the physics behavior. The force with which it does this is defined in the object as an instance variable. There is literally no way to have a different amount of force in one direction than another. For some reason it doesn't understand this, and instead makes no changes to anything but the forward (if W down) movement force, meaning that I now have an object that moves five times faster left, right and backward than it does forward.

    Here're the events, and as you can see, the variable used, Self.acceleration, is the same for all of the directions.

    Yeah I know, you probably noticed the horrible inefficiencies I've been using. I'm working on it :P I've been lazy since the game's so small and doesn't have much CPU usage anyway.

    Here's the .capx

    [MediaFire]

    I would absolutely love to know if this is across other computers, at least. I just wonder what the hell it is.

  • Prominent

    Hmm, tried it and seemed to do something similar to what I was having trouble with before.

    Since I'm working with particles, everything is considered circular.

    Here's the capx I'm working on if you'd like to have a look at it. It's completely un-optimized, and incredibly rudimentary, so be ready for that.

    https://www.mediafire.com/?1mtseq1sjstesb3

    Edit:

    Wow. Tested something just then, and it worked. Mathematically, this formula would describe each particle's velocity if mass was equal:

    v = A.vel - (total magnitude of velocity) * ('polarity')

    Polarity meaning whether it is positive or negative.

    ∴ v = A.vel - (|A.vel|+|B.vel|) * (A.vel / |A.vel|)

    This works for perfectly straight collisions of objects with equal mass. Currently figuring out how to add mass into it.

    Edit: must have been imagining it. Doesn't do anything at all.

  • Prominent

    Basically the conservation of momentum.

    Two objects collide and are given force apart relative to their mass.

    If two objects with mass 1 collide at 10m/s, both receive velocity of 5m/s in opposite directions.

  • Hello. For a while now I've been doing some tests with some theories or physics laws, and I wanted to make manual collisions, without physics behavior, since it's way too complicated for something this simple - I don't need friction, rotation or collision polygons just to name a few.

    I've tried a bunch of formulas, both that I have tried to come up with and some I've made with a little advice from some people online. So far none have worked.

    I came across this, which someone said would be able to explain how to find the velocity of an object after collision with another, but all I can see is:

    And that involves the end result of the second particle, which means I can't use it for actually calculating one of the answers in the first place.

    Does anyone know what I should do?

    Thanks.

    Sumy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably best would be to have a boolean instance variable that when true, goes to the frame after the one you want to skip if the current frame is the one you want to skip. You can't delete frames though, since you'd need to recompile the game every time.

    https://www.mediafire.com/?xw6xwprz0fppur0

  • I haven't tested this but it would be extremely inconsistent with other logic if that third touch would be anything but 0. One thing is for sure though: releasing the first touch won't change the index of any other touches.

    Edit: traditionally, this sort of system would fill the index of the lowest value first.

  • If you are using physics, use the joint actions, like a revolute joint. Otherwise you might be looking at using the normal pin behavior or setting position every frame. You can reference image point positions using [object].ImagePointX() and [object].ImagePointY().

    Example: http://www.mediafire.com/download/g0b23 ... ysics.capx

  • Also, there's no edit button.

  • Hello people.

    I just noticed a bit of an issue with the forums where there seemed to be no formatting; similar to when a page loads incorrectly due to a slow connection. However, it was fine this morning, and other sites seem to be working perfectly.

    Here are the symptoms I have found so far:

    -Title bar links are on separate lines, no graphics for them either

    -Large red bar across some pages

    -BBcode buttons don't work, but can be manually added

    -Images sometimes don't display

    -Pages take much longer to load

    Anyone else found this?

  • C2 uses an angle setup that is different to the mathematical norm;

  • Hello.

    So I'm not sure I know exactly what you're talking about, but I am guessing you are having trouble referencing the right... stuff.

    Usually, using multiple objects is a bad idea, not just for lag but for a clean project. If I were you I would redo the sprites to be one object with - if they aren't animated - one animation and several frames. When you set the speed to 0, and reference the frame number, you'll always get the one you set up in the animations window.

    Now on to the actual issue. If you have multiple objects, and don't like the idea of using the above method, you can combine them in a family with an instance variable you can identify each one by (don't use UID or count, they're unreliable). This way you can assign a different ID to each object in the editor. You can then do the same with the text boxes; [condition] > set text (array(ID), array(ID/something else))

    Hope that helps. If it doesn't, a screenshot or something might help.

Sumyjkl's avatar

Sumyjkl

Member since 16 Mar, 2014

None one is following Sumyjkl yet!

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies