WackyToaster's Recent Forum Activity

  • I've been cooking a bit since I noticed that javascript testOverlap() does not benefit from collision cells. In other words it's a brute force check and can get quite expensive. See: github.com/Scirra/Construct-bugs/issues/5665

    So I dug out a js implementation of quadtrees, did some minor adjustments and now it works in Construct. Here's the OG github.com/timohausmann/quadtree-js

    Here's it adapted for C3.

    wackytoaster.at/parachute/quadtree.c3p

    How well does it work? It depends. If I test the overlap between 2000 vs 2000 instances, it actually outperforms events by quite some. Easily a 2.5-3x increase in fps. Cool, BUT... If I test overlap between 1 vs 4000 instances, events are better and outperform the quadtree thingy.

    The amount of collision checks still decreases compared to events, so that must mean the overhead of rebuilding the quadtree is what ends up eating a lot of potential benefit. It seems that somewhere around 150 vs 2000 instances the quadtree starts to pull ahead of events.

    There's also a fork that adds a method to update objects instead of rebuilding the quadtree. This would only need to be called for instances that move, so the benefit really only shows if there's plenty of static objects that don't need updating. With many moving objects, it performs worse than just rebuilding the quadtree.

    There's also a version 2 github.com/timohausmann/quadtree-ts that I didn't touch because I don't know typescript. Perhaps this one is a bit faster?

    Either way, I'm looking for some thoughts about this. It seems totally worth it to look into it further considering the performance increase in SOME cases. But it's also worth it because right now in javascript there is no way to access the collision cell optimization from Construct. :(

  • The force variable can be whatever you want it to be. If you want the knockback to be tied to the characters jump strength, then yes.

  • I'm assuming you use platform behavior?

  • You check in this condition if the object is on layer "Game User Interface" but the layer is named "Game UI". You probably renamed the layer at some point, this doesn't automatically update.

  • And where exactly in that project is the variable that doesn't change? What variable is the problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, that's the way many people learn this. I've also nuked a file here and there until I learned. The best thing you can do is not get too disheartened by it and move on.

  • Instance vars are always static. Hard to say what's wrong without seeing the project. Perhaps an action overwrites them when you don't expect to?

  • The magic 8-ball says: You didn't realize you had to use a "static" local variable for your case construct.net/en/make-games/manuals/construct-3/project-primitives/events/variables

  • Do you set "direction: none" somewhere too? Could be that the text changes but instantly gets overwritten.

    Try out dops example in an otherwise empty project.

  • I wild guess since the mirroring works: The stick only sends out a single left/right input and not a continous input.

  • I would get rid of them just in case.

  • I'm not superdeep into math stuff so I can't tell if I would need/use it. What is a specific usecase that this plugin solves that isn't in the base engine? Most plugins already have vectors and I can use atan2 (or angle expression in construct) to get the angle of the vector and vice versa.

    It sounds like a barebones movement plugin like the build in custom movement behavior.

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 26 followers

Connect with WackyToaster

Blogs