Bezier Spline Paths? UPDATED for ASHLEY's Brain!!!

0 favourites
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • this will be a great addition to C2.

    +1

  • +1 as well

    You can do bezier curves with control nodes using Canvas very easily:

    (https://www.scirra.com/tutorials/1124/simple-water-using-paster-plugin)

    but unfortunately Canvas have no collision masks and interaction with curves is very difficult

  • Well , For starters..I do know that there would be several problems to solve before it could be properly implemented, problems like

    • Scalability & memory usage ie: what happens to the Bezier spline path on larger layouts, I predict that the actual curves would scale uniformly which would result in larger, smoother curves as you place the Node further apart from each other..

    This may affect its usage in many cases...unless more nodes are added to 'sharpen' the curves.. more nodes means more processing and memory use..so its a trade off ..would we cap the number of Nodes to a finite amount or allow free Scaling of complexity...something that would be nice but i can imagine it would greatly affect processing...Although we are talking just about pure maths functions here so its display on screen is really just a projection of its mathematical values stored inside of each node.

    but that leads to the next problem..

    • Display...ie: how would the Bezier be displayed& also what happens when you scale the Layout? does the Bezier path remain visible...would it be possible if we have Beziers could we have fill shapes as well...or line weights..to display the curve..

    Some applications do have line weights and even effects for each bezier (illustrator treats paths as full artistic objects)

    but seeing as Construct 2 is not a painting program...i dont see why it should have this feature...and on that point..it would be possible to pin objects to the nodes and orient the objects angle to the Nodes Normal angle of projection. once again...its usefulness is limited only by your imagination...

    • Node handling..ie How the Nodes actually affect the curves..would we have additional bezier handle controls like in photoshop or illustrator? or is the sheer proximity of each node have a fixed output on its curve.

    Also would we be able to have different outputs for each node...to create different curves on the output side....

    ie: linear interpolation input & then say quadratic output after the next node

    -These are only a few of the issues....

    there are so many factors to consider...this is why I said that I know its "a big ask"

    its actually a huge process to implement all of this into Construct 2..

    personally I do think its worth it..as many other games design apps have it in various guises...

    and I know that eventually C2 will have it...but its a big process to implement it with any serious degree of user friendliness.

    To break it down further into Specific properties that would need to be encoded and threaded into C2..

    because it would be a new OBJECT it would need all of the normal properties of an c2 object

    Common properties like

    -Layer..Definitely needed

    -Angle..Maybe not needed but could be useful

    -Opacity..Definitely needed

    -Position and Size ..This is a more complex area...Because Each node would have its own position but determining the relative onscreen position of the entire bezier would need to be calculated as a result of each nodes relative position...and size again...the overall scaling of a path would be handy but would that be handled best by a boundary box or using this field??

    -Instance variable...The Bezier Objects should also retain Variables but also ideally...each node should have variables..but as you can imagine this would make processing even more epic...if you have a 30 node Bezier...and many other objects...suddenly you have 30x more checks per tick at a base level...if you add a variable to each node....or 2 or 3 oops sorry your game just died...

    - Behaviours...Of course!!!..As I mentioned above...In dreamfantasy land, every Bezier Node can have at least 130 umpteen behaviours attached to it and they all work perfectly...

    Did you know in fact, that in dreamfantasy land...each and every individual nodes can all have multiple sine behaviours, so that I can have animated bezier curves node all Sinewaving up and down left or right with or without triangular wave peaks, and each bezier that I have on screen (because I NEED more than just one or 2 I need at least 33 beziers all doing this) all 'with' 300 rotating sine wave sparkle Particle Emitters effects(All Pure GOLD Animated Sparkles.. of course!!), all travelling around my bezier spline path with different speeds and accelerations ..so some sparkles can complete loops faster than others...in fantasy dream land...I ride a winged unicorn as well ..AND.. both me AND my unicorn have sparkles and wings... oh yeah by the way, every single node of my multiple Animated Bezier curve/spline path loop objects that are sine wave verticallying & horzontallying are also shadow casting and shooting rainbows out of its turrent behaviour and whilst the entire Bezier path is pathfinding its way across to my player it is also fading in & out full opacity at the same time and its bound to the layout as well as Wrapped to Layoutall at once ...WITH PHYSICS!!!!, drag & drop functionality per Bezier & per Node per Bezier and a each Node has a spanky nice new scrollto behaviour on each and every one of its animated sine wave nodes.. all at once .....all of it...at once...with not a single bug or crash ..not one....oh and did I mention that I wanted the Bezier Curves paths to be SOLIDS as well and to process physics operations but doing it without Box2D colliders...I did say that didnt I? ..I am pretty sure I did say that..

    Oh and each one of those Beziers with all of those sparkle Particle Emitters effects is travelling around at totally randomly chosen speeds and accelerations calculated per tick, on the path of an even larger Bezier Spline Path which is also animated with sine wave wobbles...just like the universe that your computer is working processing in..

    see a perfect object...should be a breeze to implement...as soon as its done & I fire it up for the first time...it will run flawlessly and drain no extra power from the socket in fact it will generate electricity and power my computer and the rest of the street cursively & exponentially ...bit by mega bit.....my computer will achieve sentience all in a fraction of a femtosecond and save the universe from destruction by infinitely and recursively implementing itself retroactively into much more disseminate forms to avoid data deletion..

    yeah I have a soulmate as well..:p

    so you can see...there are just a few minor issues to fix.....thanks Ashley for getting onto that for me...

    Oh and HURRY UP ASHLEY I NEED IT NOW!!!!

    stop wasting time on all that other crap

    DO THIS NOW!!!

    Joy!

  • wait...wait...Ive had a bit more of a think about it and ...Actually... I want the Animated Bezier Sparkle objects to shoot other Sinewave Node Animated Bezier Sparkle objects out of its Sinewave Turret behaviours that are also about to shoot other Animated Bezier Sparkle object Beziers out of their respective and recursive & recurring Turret behaviours...is that clear now?

    Should make it a lot easier to program now..(oops I think I was just racist or something)

    clear?

    good

    Now im happy (but not about racism I mean happy that C2 is now having unlimited Bezier Curves Path loop objects...)

    oh and any chance I can get that in a gold plated and newly minted out of the box edition of Construct 2?

    yes ..cool thanks...

    now I am really happy...

    Thanks Ashley...You are the BEST!!

  • I have posted a similar idea here. I think it's worth a vote if you guys really want this in Construct.

    https://construct3.ideas.aha.io/ideas/C3-I-94

  • not a plug-in but.....

    ....sparkly (cubic) bezier requested ?

    https://www.scirra.com/arcade/other-games/bezier-14193

    its only one section but could be used to generate waypoints if you want

    happy to upload capx anyone wants.

    its quite CPU intensive to increase the number of nodes on a bezier though usually you would just join 2 or more cubics.

    there are , I think better, ways to do curves/paths though, like the (more commonly used in games) catmull-rom splines

    or even just hand draw them by generating a waypoints at distance/intervals under mouse pointer or touch

    there is a really good capx demo on here somewhere for the catmull-rom splines generating waypoints ill update later if I can find.

  • Interesting and nice example.

    It's not impossible but obviously not the easiest thing to do.

    I mean a lot of us we are here because we suck at coding. It will be easier (and faster) to have a visual way of doing it.

    I'm not really concerned about the tech underneath tbh on how its done - obviously needs to be fast. As long as we can get that functionality.

    Subscribe to Construct videos now

    Other engines basically all have it. Fusion, GM,Unity etc I don't understand why it's such an issue for Construct to have it. even though a lot of people in the past -since 2013 - have asked for on numerous occasions. Is it something with Construct being HTML5 again?

  • The main reason for its rejection is that there wasn't a way to add paths using the editor.

    C3 was to solve that issue.

    On the other hand, the need to edit paths in editor is isn't actually as important as being able to create, or change paths at runtime.

    Rex has a spline plug that handles this quite well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Havok

    Im not a maths guru or programmer but I found it really beneficial learning how to do this in events and actions myself. Forced me to learn to use things like functions and arrays which in turn enabled me to start implementing far more deeper, interesting, mechanics in my game than I had previously envisioned. (well, as deep as it gets for a Shmup)…..what Im trying to say is that sometimes it can be a good thing not having plug ins for everything. Not saying that a curve plug in wouldn’t be awesome though.

  • Yeah I hear you You make a good point. I'm certainly not averse to learning. Just would make a useful time saving feature found in other engines. Just a pity that it does nt exist in Construct.

    When the time comes I'll have to dig in to these kinds of things.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)