www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DOML - D Open Math Library (JOML Translated To D)

reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
Hello.

For my first forum post I will share my effort over the past few 
days to help game developers that want to utilize D with an easy 
to understand library with lots of tutorials available.

This is why I translated JOML to D. Java Open Math Library is the 
most widely used libraries in Java game development. It is also 
very easy to understand. Used in games such as Minecraft and 
Project Zomboid, it is now available to D game devs.

You can see/get it here: https://code.dlang.org/packages/doml

DOML is built off the latest release at the time: 1.10.4

This is in alpha state, as in, I have rewritten every JOML unit 
test into D and made everything pass. But this cannot account for 
every function in every structure and every portion of the 
library. That is the part where you come in. If you find 
something incorrect, please, open a pull request or problem.

A major change from Java to D is not only the language, but also, 
utilizing D's powerful infrastructure. And I do mean that 
literally. Everything that was an object, is now a struct. 
Vector2i, Matrix4d, etc. If it makes sense for it to be an 
object, it's a struct now. This means that no GC hit with the new 
keyword. All the structs are just data. No complex overhead etc 
etc etc.

This library also follows in the footsteps of JOML with being 
completely modular. If you only need it for the math library or 
the Vector2i library, have at it.

Another major change from JOML is that there are no floating 
point structs, only doubles. No read only views either, as D can 
handle read only by simply not passing a struct in as a ref.

There are a few things missing, and this is because I wanted to 
get the base of the library up and running. I will hopefully be 
adding them in soon, such as the complex noise library. But I've 
talked long enough about it. I hope that this helps people, and 
thank you for reading.
Aug 19 2022
parent reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
I made a small video on it showcasing it :)

https://youtu.be/nj8fz8Af2vc
Aug 20 2022
parent JN <666total wp.pl> writes:
On Sunday, 21 August 2022 at 01:47:35 UTC, jordan4ibanez wrote:
 I made a small video on it showcasing it :)

 https://youtu.be/nj8fz8Af2vc
Had a brief look at the library. I am glad it has the option for DX12/Vulkan like depth range. I struggled with that a bit because most of the available math libraries assume OGL depth range.
Aug 21 2022