MonoGame.SplineFlower - Create wonderful smooth Bézier-, CatMulRom- and Hermite-Splines!

Excellent ^_^y I can managed the Json exported file, many thanks Marcel!

1 Like

MonoGame.SplineFlower 1.3.0 - Rotate, Scale, ScaleRotate, CenterTransform


By clicking and dragging the orange transform it’s possible to do this now:

  • Renamed ShowBezierSpline to ShowSpline.

  • Added ShowCenterTransform to make it possible to hide or show the transform in the center of the spline.

  • Only calculating the CenterTransform when necessary.

  • It’s now possible to programmatically create a spline by using the new constructor.

  • Added CenterTransformMode “None”. On this mode the whole spline can be moved by dragging the CenterSpline with the left mouse button.

  • Fixed that points which could be placed exactly at the start point (index 0) could resulting in wrong calculations.

  • After importing a spline the newly imported spline will be placed on the center of the screen.

  • Added NuGetRelease configuration so that if building in Release configuration, it wouldn’t result in compilation errors on the users end, because of the post build commands. @DexterZ

  • It’s now possible to change the CenterTransformMode (Rotate, Scale, ScaleRotate) in the Sample- and Editor project.

  • Fixed IndexOutOfRangeException when the CurrentTriggerIndex was -1 in the SplineWalker class.

  • Added additional NullReference checks for the splineControl and the splineControl.MySplineWalker. @DexterZ

  • It’s now possible to scale the whole spline by dragging the CenterSpline transform with the left mouse button.

  • It’s now possible to rotate and scale-rotate the whole spline.

  • Added public bool IsCenterSpline to check if a Transform is the center of the spline or not.

  • Renamed GetSplineCenter to CenterSpline.

  • Added checks to determine if a Transform is a point on a spline or the CenterTransform.

  • Removed LineControl sample and CurveControl sample from the project.

  • Extended GameSample to demonstrate new features.

The orange transform will always be in the center of the spline:


This update should improve MonoGame.SplineFlower by alot.

Hope you like it and make good use of it.

Cheers,
Marcel

PS: New NuGet packages online! :wink:

1 Like

That’s exactly what I’m doing on the json file output, points can be switch to Z or Y axis in 3D, I’m using it for the AI paths of my enemies ships in 3D, same paths but when rotated and scaled it becomes seemless and not a pattern, a must have tools ^_^y

1 Like

Pretty nice, yes :slight_smile:

I saw it in this video from you:

Looks very smooth and awesome!

2 Likes

Yes but the ships AI paths is hard coded it’s just no. 8 paths rotated by matrix just (1)one paths T_T … But now I can create many paths visually by your using tools! YAY!

EDIT : BTW the latest release compiled and run successfully! many thanks ^_^Y

1 Like

That’s cool :slight_smile:

Thanks for responding back on this. Good to hear that it’s working now for you :sunglasses:

1 Like

Hey sqrMin1. Apologies for the bump. This exactly what I need, great tool you made. However I am having a problem using the content pipeline importer. I’ve installed from nuget, and added MonoGame.SplineFlower.Content.Pipeline.dll as a reference in the content manager, but I don’t see the option to select the importer and processor after doing this. I’m on VS2017. Is there a step I missed here?

Hey @Oven_Owl and thanks for the report.

You are right, there is an error within the packages (missing libraries).

I will fix them and publish new packages soon.

Thanks!

1 Like

Awesome thank you very much :slight_smile:

New packages up!

Try it with version 1.3.0.1:



Nice one mate, all working now :slight_smile:

If your curios, we are going to use it for creating attack patterns in a side scrolling shoot em up. Exactly the tool we needed you had made!

1 Like

Nice to hear!

Feel free to share your creations :slight_smile:

Just a heads up really. The splines are working nicely, but I am unable to target android / ios using the nuget package due to the fact the dll’s are compiled to target .net framework 461. It seems that xamarin is effectively locked down to 4.5 (or at least it is inadvisable to use any higher)

I think I would need to move / port the project to .NetStandard to properly support multiple target frameworks.

You could download the source code from GitHub, add the needed libraries to your xamarin project, change the .NetFramework version and see if it works for you.

1.4.0 - Find Nearest Point on Spline Feature!


Yeah, time for a new update!

Hello folks!

Long time since we last talked about this spline library, but finally… something new!

Watch the video first:

When working with splines in game or software development, it’s often important to get the nearest point on a spline from a specific position in the world / render view.

But why?

Imagine the following scenario in a game:

You have 2 different spline tracks and you want an enemy unit to travel on both, but this unit does not start on any of the two splines. It starts from somewhere in your game world.

How can this unit reach both splines now?

Easy… by finding the nearest point from his position to the first spline and then finding the nearest point from spline 1 to spline 2 from his position on spline 1.

This is just one example. You could also use this technique to let particles flow into the direction of a spline and if they reach it, let them travel along the spline… and so on…

So, a quite useful feature when working with splines and here it is :slight_smile:

I hope it makes you happy.

Have a nice day and stay away from the corona! :mask:

:: Marcel, Sandbox Blizz



PS: Stay tuned again for more interesting stuff in the future! :sunglasses:


Changelog:

  • Added FindNearestPointOnSpline feature and sample project.
  • Added “Extensions class” to support spriteBatch overloads with additional drawing capabilities.
  • Added a test Transform in the TransformControl to have a dummy transform for additional user interaction in the sample projects.
  • It’s now possible to adjust the accuracy of the FindNearestPoint function from within the sample control.
  • The GitHub-Release rar-file now containing not only the lib binaries but also the editor and sample projects - already pre-compiled, so that the user can directly start and run the samples or the editor; no compilation needed!
2 Likes

1.5.0 - Polygon Stripe Feature!


Hey ho everyone!

You heard not much of me in the past months. I don’t want to write a long wall of text, so I will do it the “changelog-way”:

  • I had an accident.
  • I injured my back and left hip.
  • I had much pain.
  • I’m now feeling alright again.
  • I’m just having low pain in the moment.
  • I’m starting to go back to work (this means I will slowly start to work on my development projects too)
  • I already did an update to the MonoGame.SplineFlower project.

Okay, this is done. This is feeling great now :slight_smile:


Now let’s take a look at the update:

As you can see, it’s possible now to create a polygon stripe and bend a regular Texture2D around the spline track / control points.

Changelog 1.5.0:

  • It’s now possible to change the CatMulRom-State of a spline anytime in the editor (vice-versa).
  • The setup class now initializes 3D graphics related stuff for the new PolygonStripeControl.
  • Added road texture and road spline json data.
  • Reworked the TransformControl to return WorldUnits if wished.
  • Removed old Functions class and added new Utils project to the solution.

Nuget’s updated as well.

In the GitHub release section you will find the binaries and the compiled executables of the samples- and editor projects.

I hope you enjoy this update.

I try to get back on the track in the moment and… yeah… what’s the best possible way if not by building road tracks with MonoGame.SplineFlower!? :sunglasses:

Cheers
:: Marcel


4 Likes

glad you’re feeling better! :slight_smile:

1 Like

Thank you very much. This means alot to me :fist: :slightly_smiling_face:

You are alive… Now Get Coding!

[That sucks, but good that you are doing fine now.]

:sake:

1 Like

Yo dude hope nothing serious! glad your Ok! keep safe man ^_^y love your tools!

1 Like