C# Wrapper for LÖVE, a 2d game engine
Love2dCS - C# Wrapper for LÖVE
discord channel here: https://discord.gg/nF9wMkK | gitee-国内访问速度较快
LoveSharp(Love2dCS) is a C#/F# Wrapper for LÖVE game engine, it can be used your C#/F# based Application.
ImGui Support: LoveSharp.Imgui, based on ImGui.NET , with nuget:
Aseprite Runtime Support : LoveSharp.MetaSprite
Spine Runtime Support : LoveSharp.Spine , with nuget:
Tiled Map Editor Runtime Support : LoveSharp.Tiled
Easy to install with Visual Studio/MonoDevelop (install introduce)
windows-x86 / windows-x64 / ubuntu-16 x64 / ubuntu-18 x64 / MacOS 10.12+ x64 with .net startard 1.2 (.NET Core | .NET Framework 4.5.1 | Mono 4.6)Love2dCS was designed to be as close as possible to the original LÖVE API, as such the documentation provided from LÖVE largely covers usage of Love2dCS. There is a difference between Love2dCS and LÖVE where is :
Love.XXX.New* in C# can access to files anywhere. In the original functin can only access the contents of the current folder.love.timer.getTime in C# as The time in seconds since the start of the game beacuse of C# double to float precisionlove.math module in LÖVE is named Love.Mathf in Love2dCSlove.system module in LÖVE is named Love.Special in Love2dCSlove.thread module in LÖVE is not supply, you can use Threading.Thread in C# instead.love.load love.update and love.draw are native supported : Work with lua. The rest of callback function is not supported.Drawing text
using Love;
class Program : Scene
{
public override void Draw()
{
Graphics.Print("Hello World!", 400, 300);
}
static void Main(string[] args)
{
Boot.Run(new Program());
}
}Finished:
Keyboard.IsPressed / Keyboard.IsReleased / Joystick.IsPressed / Joystick.IsReleased / Joystick.IsGamepadPressed /Joystick.IsGamepadReleased| Module | Process | code comment | Test | ubuntu Test | Remark |
|---|---|---|---|---|---|
| Audio | 80% | 80% | 50% test | ||
| Data | / | / | Need to binding | ||
| Event | 50% | / | |||
| FileSystem | 80% | 80% | 90% test | detail | |
| Font | 80% | 90% | |||
| Graphics | 80% | 00% | |||
| Image | 80% | 90% | |||
| Joystick | 80% | 00% | Need add code comment | ||
| Keyborad | 95% | 95% | 95% test | detail | |
| Mathf (love.math) | 80% | 90% | |||
| Mouse | 90% | 90% | 90% test | Mouse.SetRelativeMode will crash, need to repair |
|
| Physics | 80% | / | 20% test | Need more test case | |
| Sound | 90% | 90% | |||
| Special (love.system) | 90% | 90% | 90% test | ||
| Thread | / | / | Not supported / No need to support | ||
| Timer | 95% | 95% | |||
| Touch | 80% | 00% | |||
| Video | 80% | 80% | 90% test | ||
| Window | 80% | 80% |
(recommand) on .net 2.2 : use tool https://github.com/Hubert-Rybak/dotnet-warp to publish single executable.
(recommand) on .net 3.0+ : Self-contained can be used to publish single executable
ref: https://www.hanselman.com/blog/MakingATinyNETCore30EntirelySelfcontainedSingleExecutable.aspx
publish ref: https://executecommands.com/publishing-single-executable-exe-in-net-core-3-0/
msdn ref: https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#single-file-executables
msdn ref `` : https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#assembly-linking
designs file: https://github.com/dotnet/designs/blob/master/accepted/single-file/design.md
No open issues yet, or sync has not completed.