Would be great if you would add vector's to love2d...is there a reason they are not built in ?
best regards
Suggestion: Vector Functions
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Suggestion: Vector Functions
Yes, because there are one of the quintessential things one can implement using either lua or the luajit ffi; and that there exist quite a few vector libraries already.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Suggestion: Vector Functions
A vector library would be slower in C++ than in Lua anyway (sadly I saw the author of ItsyRealm make that mistake).
- Kindermaus
- Prole
- Posts: 33
- Joined: Sun Sep 23, 2018 5:08 am
Re: Suggestion: Vector Functions
To clarify...
99% of the code uses a Lua Vector/Quaternion/Ray implementation, 1% (the scene graph traversal) off-loads the computation of the scene graph traversal & sorting to C++ because doing that in Lua is too slow. Things like rain and fungal weather use a highly customized (specific to the weather) math implementation for performance reasons as well, in FFI/Lua.
Using a C++ scene graph traversal/sorting doubled performance...
Those percentages aren't accurate but that's the general idea of it all.
Also my game will match the refresh rate on (i.e., 144 Hz) on mid-range hardware when I make a high-priority optimization: off-loading game logic to a separate thread. So I'm really not worried about performance.
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she
they / she
Who is online
Users browsing this forum: No registered users and 5 guests