WackyToaster's Recent Forum Activity

  • You can set up an autotiling brush, and then use "erase tile with brush" instead of just deleting the tile normally. I think the example project existed way before the autotiling feature so it's likely not used in there.

  • You do not have permission to view this post

  • Can you post your code? That sounds kinda unintendet/buggy. Have you tried setting a template?

  • Well, I did dig into the code and I solved it :^)

    This is a replication of the behavior code into your project. It perfectly simulates along with the actual behavior. In the screenshot mode 2 = the correct behavior. Mode 3 = how construct handles it.

    The solution is as simple as switching it around so it's in the correct order. Though I do not know if this has any unwanted sideeffects downstream in terms of bugfixes and workarounds that have been implemented previously.

  • Ohh that's it! The regex indeed does not do any picking whatsoever. That makes sense then. I knew something was weird. Case closed :)

  • Project to test yourself here

    wackytoaster.at/parachute/perftest.c3p

    I stumbled on this by accident. I have two operations. Compare instance variable and regex (on the same instance variable). To my surprise, regex consistently performs better somehow.

    With compare instance variable it settles around 95000 repeats, but with regex it settles at around 150000 repeats.

    I expected regex to perform worse if anything, not straight up 1.5 times faster! Why is that? Is my example faulty?

    Tagged:

  • Usually you have some kind of detection method using regex and a blacklist of words. This is quite a can of worms though if you do it yourself. If you have a server, you probably want to do this server-side, otherwise it could be circumvented. And it's not trivial to properly filter things out. Say you wanna filter the word "asshole". But what about "assh0le", "assho1e", "a$$hole". And if you filter "ass", what about "assemble" or "bass". Even big companies struggle with this actually, Minecraft being in most recent memory, e.g. the "diamond hoe". But big companies usually have some kind of reporting system with the option to report someone for "inappropriate username" like Overwatch for example. Because it's almost impossible to not have something slip though the cracks.

    Hope that helps.

  • I have a somewhat similar problem that I reported here. I think they are probably related.

    github.com/Scirra/Construct-3-bugs/issues/6560

    For each family > Family action does not work.

    For each sprite > Sprite action does work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, families are the way to go. Though you still might have to do several checks for each type of object because families cannot group different ones together eg. tilemaps+sprites+9patches. But it still cuts down the amount to just a handful no matter what.

    And if you find yourself writing the same actions over and over, it's best practice to put those inside a function (or as of newer versions, custom actions)

  • But your method 3 does work properly in the air, even if I disable the part that sets the vY to 0 when it's in the air. I think that's quite logical as how the eventsheet works.

    1. Process velocity

    2. Set velocity (jump)

    3. next tick

    The behavior however seems to be processing gravity and velocity in a different way. Perhaps what it does is to first process velocity, then apply the new velocity after. I think behaviors are usually run after events, so it would look a bit like this:

    1. Events

    2. Process velocity

    3. Set velocity

    4. next tick

    So it would first process the velocity at vY=0+gravity*dt, resulting in 1 tick of falling, then set the new velocity, which is then processed 1 tick later. To correct this it would have to set velocity before processing it as such:

    1. Events

    2. Set velocity

    3. Process velocity

    4. next tick

    It's just a messed up order of operations I believe.

    EDIT: It seems that actually, the objects velocity before jumping has no impact. If I set it to -9000000 the cube should shoot into the air. It just does the same, framerate dependent jump. So it's not that the cubes velocityY is processed first before setting the new velocityY, it's that at some point for some reason, a tick of gravity is added deliberatly. So it can very well be some kind of edge case bugfix, which the platform behavior is full off.

  • R0J0houndThat's an interesting project, though I admit I don't really understand the math behind it all that well :V

    What I described in the first post was my first suspicion as to why my game was framerate dependent, but I'm pretty sure the second problem is the actual main culprit.

    I'm not sure if you saw this but I found a workaround for the second issue:

    Now all the cubes in method 3 align almost perfectly at all framerates. It's possible that it's still just an approximation resulting in some minor error, but that's as close as I could get. How would you interpret this? Why do I have to add -gravity*dt to the vector for the cube in the air? As I believe, the game processes the gravity first, moving the cube down gravity*dt pixels for a single tick, then applying vectorY to it. At a gravity of 1500 this would result in 25px at 60fps, but only 6px at 240fps, as such turning it framerate dependent. Am I not right? Man, I wish I could actually look at the behavior code at hand and verify this myself.

    I've also found that the platform behaviors build-in doublejump suffers this issue of being framerate dependent for this exact reason. I've filed the issue again, as the old one was closed down and I do really believe that I'm correct.

    There's some more details and measurements in the bugreport if anyone is curious.

    github.com/Scirra/Construct-3-bugs/issues/6550

  • Ugh... so after some more experimenting I could find something odd. I decided to try and hardcode the value, to my surprise, there still is a difference in height. Double-checked the code, nothing that could interfere. Made a small repro and...

    Enabling the platform behavior... is NOT framerate independent?

    Excuse me?

    This probably is at least part of the issue!

    EDIT: Turns out that objects that are suspended in the air are the issue and it might not be a bug. Oh no how am I gonna work around that...

    EDIT2: After some pondering I do think this is actually a bug. Applying a vectorY to an object that's in the air is framerate dependant somehow.

    github.com/Scirra/Construct-3-bugs/issues/6544

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 25 followers

Connect with WackyToaster

Blogs