Skip to content

Waissi/fmodlua-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fmodlua

An FmodStudio implementation in C for building a shared library for Lua or LuaJIT with the ffi library.

It covers the basic functionalities of Fmod, ideal for 2d projects (no 3D attributes implementation yet). Feel free to extend it as per your needs.

This repository provides the source code in order to build the shared library. However, it doesn't include the fmod libraries as it's not under the same licence, meaning you still have to download the fmod API for your platform on their website.

This code should work with any game engine using Lua 5.1 and LuaJIT 2.1. For other versions you might need to change the header files in the lua/include folder and the Windows dlls in lua/lib.

How to build

Example using GCC on Linux

LINUX_API=path/to/fmodstudio/linux/api

gcc -c -fPIC lua/fmod_lua.c -I$LINUX_API/core/inc -I$LINUX_API/studio/inc -Ilua/include
LD_RUN_PATH='$ORIGIN' gcc -o libfmodlua.so -Wl,-undefined,dynamic_lookup -shared fmod_lua.o -L$LINUX_API/studio/lib/x86_64 -L$LINUX_API/core/lib/x86_64 -lfmod -lfmodstudio

Usage

Examples using Löve are provided for both version.

Licence

MIT

About

A library for using FmodStudio with Lua or LuaJIT

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published