Fortran: The main driver, basically 95% of the program is written in this.
LuaJIT: The scripting language. Allows extremely easy modding and JIT compilation of mods. (only blocks and biomes at the moment)
C: For when I need to get deeper to the hardware.
A specific example in C would be this, which is the Vulkan driver I am writing for it:
I cannot get the size of VkInstance to create the base data. It’s a pointer, I have access to it. Just pass that to Fortran.
And in forvk.f90:
module forvk
interface
function vk_grab_instance_pointer() result(ptr) bind(c, name = "vk_grab_instance_pointer")
use, intrinsic :: iso_c_binding
implicit none
type(c_ptr) :: ptr
end function vk_grab_instance_pointer
end interface
end module forvk
If you look at hashmap_f90 and fortran_vector, you’ll see how I use C to get more performance out of Fortran without making it a nightmare to work with.
Additionally, some things I quite literally need C to work with. In Forthread I must use pthreads. This allows me to create a high performance thread pool to do tasks as fast as the hardware will allow me to without restricting the way it it used.
Also you’ll notice that it says it’s like 20% C++ for some reason, this is probably github getting confused as I ship STB_IMAGE and there’s a whole bunch of comments and ifdefs.
I’m not sure this will actually have any affect sadly because it’s a pure C file that’s just huge. STB libs have a lot of comments, which I can probably solve relatively easily. But I like complaining about it first lol.