Skip to content

li2lin/Love2dCS

 
 

Repository files navigation

logo

Love2dCS - C# Wrapper for LÖVE

Love2dCS is a C# Wrapper for LÖVE game engine, it can be used your C# based Application.

Links

Support Platform

  • .NET Framework 4.0 win-x86 / win-x64
  • .NET Core 2.0 win-x84 / win-x64

Status

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 :

  • The love.timer.getTimer in C# as The time in seconds since the start of the game beacuse of C# double to float precision
  • The love.math module in LÖVE is named Love.Mathf in Love2dCS
  • The love.system module in LÖVE is named Love.Special in Love2dCS
  • The love.thread module in LÖVE is not supply, you can use Threading.Thread in C# instead.
  • Most index begin from 1 at LÖVE. However, but index will begin from 0 at Love2dCS
  • Love2dCS provide more build-in module to convience use.
  • You can work with lua as well, but only love.load love.update and love.draw are native supported : Work with lua. The rest of callback function is not supported.
  • Love2dCS currently based on LÖVE 11.1

Examples

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());
    }
}

Next to development

  • Improve the document : in development
  • Support Ubuntu : in development
  • Fully support Love 11.0 : in development
  • Add support for .net core
  • Add support for GUI

Finished:

  • [√] Support call lua function : Love.Lua.Call(name, ...arg) / Love.Lua.LoadString / Love.Lua.LoadFile (here)
  • [√] Support helpper function : Keyboard.IsPressed / Keyboard.IsReleased / Joystick.IsPressed / Joystick.IsReleased / Joystick.IsGamepadPressed /Joystick.IsGamepadReleased
  • [√] Add support for Physics
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%

develop log

change log

Distribute

WIP

Development

Develop document

Contributor

  • thanks matej-zajacik for his contribute on add and improve document. Without him, the grammatical errors of documents would flourish everywhere.

About

C# Wrapper for LÖVE, a 2d game engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 81.6%
  • C++ 18.4%