DaveGreen.ShapeEngine
3.0.0
Prefix Reserved
See the version list below for details.
dotnet add package DaveGreen.ShapeEngine --version 3.0.0
NuGet\Install-Package DaveGreen.ShapeEngine -Version 3.0.0
<PackageReference Include="DaveGreen.ShapeEngine" Version="3.0.0" />
paket add DaveGreen.ShapeEngine --version 3.0.0
#r "nuget: DaveGreen.ShapeEngine, 3.0.0"
// Install DaveGreen.ShapeEngine as a Cake Addin #addin nuget:?package=DaveGreen.ShapeEngine&version=3.0.0 // Install DaveGreen.ShapeEngine as a Cake Tool #tool nuget:?package=DaveGreen.ShapeEngine&version=3.0.0
My custom-made engine based on the great Raylib Framework. The Main focus is being performant and only using draw functions instead of textures.
When using Shape Engine everything from Raylib is available as well. (Raylib Examples, Raylib Cheatsheet)
Shape Engine´s examples are available on Itch as well and it is a great way to support me 😉
You are free to use Shape Engine or any part of Shape Engine for your own projects, but keep in mind that Shape Engine was designed to help me with my specific game dev needs. Nevertheless I am looking forward to creations that Shape Engine made possible 😃
Release Trailer
Development Process
The Main Branch contains the current development stage. You can follow the development process here:
Installation / How to Use
There are multiple ways to use Shape Engine:
- Create a new solution & project and download Shape Engine from the Nuget manager. (Recommended)
- Clone or fork the repository and add new projects to the solution. You then can reference the Shape Engine project and start working on your game. The advantages are that you can easily change things in Shape Engine and everything updates automatically in your own project.
- Create a new solution & project in a .net IDE. (Visual Studio / JetBrains Rider for example). Download or fork ShapeEngine and either create a local nuget package or build the solution to create all necessary dll files.
- [Using a local Nuget Package] Create a folder on your machine called something like “Local Nuget Packages” and copy the ShapeEngine Nuget package that you created to this folder. (You can also add the Shape Engine Nuget package directly to your Project). Now you need to create a new Package source in the Nuget Manager that points to your “Local Nuget Packages” Folder. This source can be used in your Nuget Manager to find and install the Shape Engine Nuget Package.
- You manually copy all needed DLL files to your project. You need the following DLLs: Clipper2Lib, Raylib-Cs, Microsoft.Toolkit.HighPerformance, Shape Engine Core, Raylib. All DLL files except Raylib can be anywhere in your projects folder hierarchy. The Raylib DLL must be on the root level of your project. You need to select the right Raylib DLL for your operating system. Now just add a reference for all DLLs except the Raylib DLL and you are done. On MacOS you need to do the same step except using the .dylib file instead of the raylib DLL. You need to set the property “Copy if Newer” to true on the .dylib file. Then everything should work.
- Create a new solution & project and just add the Shape Engine Core DLL to your project and reference it. Now you need to download the right version of the Raylib_CsLo & Clipper2 Nuget packages. The releases on GitHub will state which versions were used.
Minimal Project Setup
using System.Drawing;
using ShapeEngine.Color;
using ShapeEngine.Core;
using ShapeEngine.Core.Structs;
using ShapeEngine.Lib;
namespace ShapeEngineProject;
public static class Program
{
public static void Main(string[] args)
{
var game = new MyGameClass(GameSettings.StretchMode, WindowSettings.Default);
game.Run();
}
}
public class MyGameClass : Game
{
public MyGameClass(GameSettings gameSettings, WindowSettings windowSettings) : base(gameSettings, windowSettings) { }
protected override void DrawGame(ScreenInfo game)
{
game.Area.Draw(new ColorRgba(Color.DarkOliveGreen));
game.Area.DrawLines(12f, new ColorRgba(Color.AntiqueWhite));
game.MousePos.Draw(24f, new ColorRgba(Color.Lime), 36);
}
}
Examples
You can download the newest builds of the Example Project on Itch io. You can clone the repo and inspect the example projects there as well.
- Examples are simple scenes that focus on one specific area or feature of Shape Engine.
- Examples showcase the various capabilities of Shape Engine, allowing users to explore various features.
- The examples cover all major features of Shape Engine, ensuring that users can grasp its full potential.
Features
In general my goal is to provide the most relevant system a game dev needs without adding a solution for every possible problem.
- Polygon Fracturing
- Delaunay Triangulation
- Text & Font System
- Pathfinding
- UI System
- Collision System
- Audio & Music
- Savegame System
- Color Palettes
- Input System (Keyboard, Mouse, Gamepad)
- Camera System
- Screen Texture System
- Gapped Drawing
Documentation & Getting Started
Right now there is not much information about how to use Shape Engine. The repository contains an Examples Project. It shows you a lot of what is possible and how it is done and should help you until there is some proper documentation.
Currently I don't have the time or the resources to create proper documentation for Shape Engine. If enough people are interested in it this might change. Any help in this direction would be greatly appreciated!
Roadmap
You will always find the roadmaps on ShapeEngine´s GitHub Discussion page here.
Dependencies
I am just using the Raylib Cs c# bindings and the Cipper2 library for polygon clipping.
If you use the nuget manager to download Shape Engine as a nuget package you don't have to take care of any dependencies, because they will be downloaded automatically.
Limitations
There is no physics system because I don´t need one and would´t know how to make one. There is complete collision system but the collision response is up to you. You can also use raylibs physics system.
History
I made Shape Engine because I wanted to help myself make games with a specific art style and certain limitations. At first, it started out with some helper scripts but now it is a relatively sophisticated system to make games with raylib. Certain parts of the basic game loop are inspired by Bytepath and other things I already used in games that I made myself (especially Fracture Hell). Feel free to use any single part if you don´t want to use the whole package.
Contact
If you have an issue, or a suggestion for a new feature GitHub is the best way to get in contact with me.
On these platforms you can follow the development process of Shape Engine, get in contact with me and always stay up date.
Linktree
Product | Versions 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. |
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.1.0 | 80 | 12/15/2024 |
3.0.0 | 74 | 12/9/2024 |
2.4.0 | 109 | 11/6/2024 |
2.3.1 | 100 | 10/23/2024 |
2.3.0 | 98 | 10/21/2024 |
2.2.0 | 94 | 10/4/2024 |
2.1.1 | 136 | 9/11/2024 |
2.1.0 | 98 | 9/8/2024 |
2.0.2 | 114 | 8/30/2024 |
2.0.1 | 109 | 8/29/2024 |
2.0.0 | 100 | 8/29/2024 |
1.0.3 | 156 | 6/5/2024 |
1.0.2 | 120 | 6/1/2024 |
1.0.1 | 121 | 5/29/2024 |
1.0.0 | 119 | 5/23/2024 |
# 3.0 Release
This release improves the way collision/overlap/query information is aggregated and handled.
Before information was collected on a per collider basis and events/functions would be called on the active involved collider. This meant the actual collision object and parent of the colliders would not get notified.
Now all the information is grouped together per collision object. The collision/overlap between colliders with all the collision points is still collected together in one class. So each collision object gets notified of all the collisions/overlaps that happend with any of the child colliders at the end of each frame. A collision without collision points is an overlap!
These changes should help in making it easier to use the collision information. The actual collision detection and data has not changed just how it is grouped together and presented to the involved collision objects/ colliders.
- Overlap and OverlapInformation classes added
- CollisionInformation class reworked
- Collision class improvements
- CollisionSystem overhaul:
- CollisionObjects now receive relevant CollisionInformation and can choose to pass it down to involved colliders
- Collision information is now collected / sorted based on the other involved collision object. This means a collision is now detected and reported for all involved colliders in a collision between 2 collision objects at once.
- Functions/ Events involved renamed and reworked to make the system clearer
- Collision Namespace changed to CollisionSystem
- RangeInt/ RangeFloat classes removed
- EffectObject, Effect, Particle classes removed
- Copy() Function added to CollisionInformation, OverlapInformation, Collision, Overlap, and Intersection classes
- Filter functions added to CollisionInformation and OverlapInformation
- Intersection class deleted (replaced by CollisionPoints class)
- CollisionPoint IsFacing*() functions added to check if normals are facing the correct way
- QuerySpace* functions in CollisionHandler renamed to IntersectSpace*
- IntersectSpace* functions now return IntersectSpaceResults that replaced the old QueryInfo system.
- CastSpace now uses CastSpaceResult/CastSpaceEntry classes
- Direction ToAlignement() Function fixed and ToInvertedAlignement() Function added
- Deprecated classes removed:
- Particle
- PhysicsParticle
- RangeFloat
- RangeInt
- SavegameFolder