Sourcehold icon indicating copy to clipboard operation
Sourcehold copied to clipboard

Debug menu functionality

Open Danielduel opened this issue 3 years ago • 0 comments

Add a basic menu (in the main menu) that can contain special worlds for testing functionality. Configs for those worlds should be loaded from an easy to edit file - for example json/xml/yml, or scripts - lua/js/ts/pyton which will return intermediate file. After adding that - remove debug placeholders from in-game world loading.

See: Lua: http://acamara.es/blog/2012/08/running-a-lua-5-2-script-from-c/ JS: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey TS: transpiling TS to JS at the runtime and then running it as the point above Python: https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code

Note - exposing API for modding is not part of this issue. Just execute scripts, get generated json/xml/yml as the result, check if it is valid, parse and load a world with the generated config.

Danielduel avatar Mar 02 '21 23:03 Danielduel