TheOpenSpaceProgram / new-ospgl

A space exploration game in OpenGL. Devblog: https://tatjam.github.io/index.html
MIT License
42 stars 6 forks source link

Make lua definition files for OSPGL API #45

Closed tatjam closed 1 year ago

tatjam commented 1 year ago

This will allow lua language servers (such as sumneko_lua) to understand the API of the game and offer autocompletion. This should be done once the API is a bit more established to avoid a lot of changes later on, but has to be done early so writing lua code is comfortable.

The definition files are basically a list of functions, objects and their documentation in lua format. They may be stored in another repo if needed, but it could be convenient to have them here too.

tatjam commented 1 year ago

Done, although any new additions to the game libraries need to be reflected on these files. Definitions can be found on res/.luadef/definitions/