MonoGame.SplineFlower.Content.Pipeline 3.0.0

dotnet add package MonoGame.SplineFlower.Content.Pipeline --version 3.0.0
                    
NuGet\Install-Package MonoGame.SplineFlower.Content.Pipeline -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonoGame.SplineFlower.Content.Pipeline" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonoGame.SplineFlower.Content.Pipeline" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MonoGame.SplineFlower.Content.Pipeline" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonoGame.SplineFlower.Content.Pipeline --version 3.0.0
                    
#r "nuget: MonoGame.SplineFlower.Content.Pipeline, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=MonoGame.SplineFlower.Content.Pipeline&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MonoGame.SplineFlower.Content.Pipeline&version=3.0.0
                    
Install as a Cake Tool

Banner

Welcome to MonoGame.SplineFlower!

NuGet NuGet

Create wonderful smooth Bézier-, CatMulRom- and Hermite-Splines with TriggerEvents for your MonoGame project.

Building

  • The MonoGame.SplineFlower project is compatible with the MonoGame.Framework 3.6 and above.

How-To

Setup

The Visual Studio 2022 solution contains the following projects:

  • MonoGame.SplineFlower (the spline library)
  • MonoGame.SplineFlower.Content.Pipeline (creates .xnb files out of .json spline data)
  • MonoGame.SplineFlower.Samples (showing features of the library)
  • MonoGame.SplineFlower.Editor (create, import and export splines)
  • MonoGame.SplineFlower.GameTest (DesktopGL project which loads a spline with the ContentManager)

Capabilities

So what can this library actually do for you? [Watch the Video!] (Outdated!)

Despite drawing simple lines, it generates very smooth BézierCurves, BézierSplines, CatMulRomSplines and HermiteSplines pretty fast, because it uses polynomial math formulas behind the scenes.

This makes it possible to generate:

Quadratic BézierCurves

BezierCurve_Quadratic

Cubic BézierCurves

BezierCurve_Cubic

Complex BézierSplines

BezierSpline

Complex CatMulRomSplines

CatMulRomSpline

Chain Splines

ChainSplines

Complex HermiteSplines

HermiteSplines

Polygon Stripe Splines

PolygonStripe

Did you notice the different colors of the control points? You can set them in 3 different modes:

ControlModes

  • Free allows you to freely place the control point, but often resulting in sharp corners.
  • Aligned will enforce such corners and allow you to have connected control points asymmetrical.
  • Mirrored behave like the aligned one, but allow you to have the connected control points symmetrical.

Note: A CatmulRomSpline will always have its control points in the Free mode!

You can change control modes simply by clicking on them with the Right Mouse Button in the:

MonoGame.SplineFlower.Editor

Editor

It is also possible to create looped splines as you can see! With the Middle Mouse Button you can drag the whole spline to keep the overview.

Did you noticed the nice little car on the picture? This is a SplineWalker.

A SplineWalker can, well... walk on splines 😃 or drive on it like in the case of a car, hehe.

You have the abillity to create your own SplineWalkers by inheritting from the SplineWalker class mentioned above.

This could look like this:

public class Car : SplineWalker
{
    public override void CreateSplineWalker(BezierSpline spline, SplineWalkerMode mode, int duration, bool canTriggerEvents = true, bool    autoStart = true)
    {
        base.CreateSplineWalker(spline, mode, duration, canTriggerEvents, autoStart);
    }
    
    protected override void EventTriggered(Trigger obj)
    {
        base.EventTriggered(obj);
    }
    
    public override void Update(GameTime gameTime)
    {
        base.Update(gameTime);
    }
    
    public override void Draw(SpriteBatch spriteBatch)
    {
        base.Draw(spriteBatch);
    }
}

Click here to see a full integration example.

A nice thing about a SplineWalker is, that he can trigger custom events on a spline while he walks along the spline.

You can define your own Trigger with the TriggerEditor:

TriggerEditor

It is reachable from the main editor through the Tools button.

A SplineWalker also has 3 different built-in movement modes:

  • Once travels the spline just one time and will stop at the last control point.
  • Looped travels the spline infinitely (smoothly starts again at the starting point).
  • PingPong travels the spline forward and then backward when he reaches the last control point / starting point (infinitely).

It's also possible to define different trigger directions:

  • Forward triggers only in the forward direction.
  • Backward triggers only in the backward direction.
  • ForwardAndBackward triggers in both directions.

Note: It's also possible to control a SplineWalker with your Keyboard or GamePad if you wish so!


You can do pretty much anything with splines. The limit is really just your imagination. Play around with the samples and learn from it.

CatMulRomSpline

Now Have Fun with MonoGame.SplineFlower!

Logo

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 125 6/24/2025
2.2.1 434 8/4/2023
2.2.0 521 5/4/2022
2.1.0 485 4/5/2022
2.0.0 458 3/21/2021
1.5.0.1 530 11/17/2020
1.5.0 535 10/16/2020
1.4.0 561 3/12/2020
1.3.0.1 605 10/22/2019
1.3.0 668 3/5/2019
1.2.0 651 2/27/2019
1.1.0 897 9/4/2018
1.0.0 876 8/28/2018