Open Ethosa opened 2 years ago
What? Why not Nim? Are you yanking our (project lurkers) chain? Some other projects have used the VM for live scene and creative programming if that's your intention.
If you're looking at broader project adoption, then maybe just export the interface through something like https://github.com/treeform/genny?
nimscript
is a module that just uses the Nim VM and implements stuff for actual file scripting and building convenience.
I'm referring to using the VM directly in the same manner as this cool project by @dsrw: https://github.com/dsrw/enu/blob/main/src/engine/engine.nim.
Here is a presentation he gave for NimConf 2021: https://youtu.be/ECJsq7BeZ8w
@quantimnot, I tried to do something similar, it seems to work...
Excellent!
There is another game library that I watch called paranim by @oakes. He created an opengl-rendered embedded Vim module that he uses for an editor: https://github.com/paranim/paravim Maybe you could use that.
You may want to checkout his clever rule engine too: https://github.com/paranim/pararules
The problem with the interaction of Nodesnim objects in scripts:
Error: undeclared identifier: 'Vector2Obj'
script.nim
proc sum*(vec2: Vector2Obj): float =
return 12
main.nim
var compiled = compileScript("script.nim")
let std = AbsoluteDir(getHomeDir() / ".nimble" / "lib")
# Search .nimble/lib folder 👀
cfg.libpath = std
cfg.searchPaths.add(cfg.libpath)
cfg.searchPaths.add(AbsoluteDir($std / "pure"))
cfg.searchPaths.add(AbsoluteDir($std / "pure" / "collections"))
cfg.searchPaths.add(AbsoluteDir($std / "core"))
cfg.searchPaths.add(AbsoluteDir($std / "impure"))
cfg.searchPaths.add(AbsoluteDir($std / "std"))
cfg.implicitIncludes.add(getCurrentDir() / "scripts_api.nim")
Maybe it will be a good feature to use Python as a scripting language for scenes. 🤔