Sorry, I do not quite understand what it means. Can be described in more detail?
Love2dCS
- endlesstravel
- Prole
- Posts: 12
- Joined: Fri Apr 01, 2016 10:38 am
Re: Love2dCS
- Is life always this hard,or is it just when you're a kid?
- Always like this.
- Always like this.
Re: Love2dCS
Hey! I've just looked up this wrapper again and saw that a lot of progress has been made! Great work - I've been really put off using LÖVE due to Lua but this might actually draw me back.
How's performance look? Are there any benchmarks?
How's performance look? Are there any benchmarks?
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love2dCS
Is this .NET → SDL with a 'LÖVE-like' API or is it actually .NET → LÖVE → SDL?
I wonder about the performance hit considering the latter option.
Anyway, kudos for the repository, looks well maintained.
I wonder about the performance hit considering the latter option.
Anyway, kudos for the repository, looks well maintained.
English is not my first language, apologies in advance.
- endlesstravel
- Prole
- Posts: 12
- Joined: Fri Apr 01, 2016 10:38 am
Re: Love2dCS
Thank you for your appreciation
100k for draw circle, both get 12fps:
C#:
Code: Select all
for (int i = 0; i < 1000 * 100; i++)
{
var x = Mathf.Random() * 800;
var y = Mathf.Random() * 600;
var r = Mathf.Random() * 30 + 1;
var c = Mathf.Random();
Graphics.SetColor(c, c, c);
Graphics.Circle(DrawMode.Fill, x, y, r);
}
Code: Select all
for i=0, 1000 * 100 do
x = love.math.random() * 800
y = love.math.random() * 600
r = love.math.random() * 30 + 1
c = love.math.random()
love.graphics.setColor(c, c, c)
love.graphics.circle("fill", x, y, r)
end
------ update ----
this optimized version lua code for 15-16 fps:
Code: Select all
lmr = love.math.random
lgs = love.graphics.setColor
lgc = love.graphics.circle
for i=0, 1000 * 100 do
x = lmr() * 800
y = lmr() * 600
r = lmr() * 30 + 1
c = lmr()
lgs(c, c, c)
lgc("fill", x, y, r)
end
- Is life always this hard,or is it just when you're a kid?
- Always like this.
- Always like this.
- endlesstravel
- Prole
- Posts: 12
- Joined: Fri Apr 01, 2016 10:38 am
Re: Love2dCS
Thank you for your appreciatio !
it was `.NET → LÖVE → SDL?`
And i agree with you, I think it does have a performance loss
- Is life always this hard,or is it just when you're a kid?
- Always like this.
- Always like this.
Re: Love2dCS
If only the .NET → LÖVE part could be done in an AOT fashion, there would be no performance loss. Anyway, nice work.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love2dCS
It's not a good benchmark because it basically just tests the rendering engine. To test language performance, you should for example implement a loop that adds together vectors using their class methods. As far as I know, C# doesn't have JIT compiler in it (but there's an ongoing effort) so it will not be nearly as fast as LuaJIT will do.
Re: Love2dCS
What do you mean? .NET has used JIT since almost the very beginning.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love2dCS
From what I gather it's not an actual proper JIT (it generates some machine code but for the most part it just does nothing), and the entire AOT thing is just a bytecode generator. CoreRT is an ongoing development of a proper JIT for C# and Unity is working on it's own solution called Burst Compiler, as a part of it's DOTS evolution. In due time we might see C# supercede LuaJIT but I don't hold my breath (even LLVM is very far from beating hand crafted assembly).
Who is online
Users browsing this forum: No registered users and 2 guests