Jump to page: 1 24  
Page
Thread overview
December 14

After losing a battle with trying to get Lua 5.4 working on my own end, with problems I previously solved kept reappearing, and other problems just were unable to fix for no good reason, I've decided to drop it from my own game engine in favor of some replacement.

I need a lightweight scripting language with integer support that is either easy to interface with D (preferrably as a DLL/SO file, so I don't have to deal with godawful C/C++ build systems), or at least would be easy to port within a few weeks. Most scripting languages nowadays are de-facto application languages for people that are scared of compilers and type systems, thus are coming with 25-50MB worth of standard libraries, which I obviously would like to avoid packing with my way smaller game engine. At the very worst, I'll try to port pocketpy or something like that to D or make it a DLL file.

December 14

On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:

>

I need a lightweight scripting language with integer support that is either easy to interface with D,
or at least would be easy to port within a few weeks.

If you are already using D, why do you need a scripting language at all? I use D mainly as a scripting languag itself, and is wonderful at this job.

December 14

On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:

>

I need a lightweight scripting language with integer support that is either easy to interface with D (preferrably as a DLL/SO file, so I don't have to deal with godawful C/C++ build systems), or at least would be easy to port within a few weeks.

Maybe a bit offtopic, but you may try webassembly interpreter, then you'd not be limited to only one scripting language but have available all languages that compile down to webassembly, and have them sandboxed.

Although I've not used it, but wasm3 api seems simple to use (has c/c++ api), though there are other libs as well.

December 14

On Thursday, 14 December 2023 at 08:57:47 UTC, Dom DiSc wrote:

>

If you are already using D, why do you need a scripting language at all? I use D mainly as a scripting languag itself, and is wonderful at this job.

Because I need it for the original purpose of scripting languages: using them as programmable assets within other applications. Of course DLLs would be an option, but would have serious problems the very moment more than one platform is being used, not to mention the security issues.

December 14

On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:

>

I need a lightweight scripting language with integer support that is either easy to interface with D (preferrably as a DLL/SO file, so I don't have to deal with godawful C/C++ build systems), or at least would be easy to port within a few weeks.

Maybe wren?

December 14

On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:

>

Maybe wren?

Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".

December 14

On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 wrote:

>

On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:

>

Maybe wren?

Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".

Just a question: Isn't casting (rounding) floating numbers to integers an option? Why?

December 14

On Thursday, 14 December 2023 at 08:57:47 UTC, Dom DiSc wrote:

>

On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:

>

I need a lightweight scripting language with integer support that is either easy to interface with D,
or at least would be easy to port within a few weeks.

If you are already using D, why do you need a scripting language at all? I use D mainly as a scripting languag itself, and is wonderful at this job.

I agree.

In the not-too-distant past, I wrote a Game Engine that worked with a scripting language. I decided to use GNU Guile because:-
a) I like Scheme
b) I really liked GNU Guile's documentation. It flowed well when writing.

Sadly, support for my game was stuck in GNU/Linux land. Trying to get GNU Guile to work (atleast at that time) was a pain on Windows. It was a shame.

In the end, my frontend was the same language as my backend code. My engine would 'plugin' game logic using hot reloading. This means I can change the code and reload while keeping my game running, generally speaking.

It actually worked extremely well. It removed unwanted libraries needed for a scripting language + kept performance high.

So if D is your choice of language.. It can also be a good choice for frontend as well.

That is my best suggestion as an alternative. However, if you do continue to find a scripting language that replaces Lua...I would be interested in hearing your choice.

December 14

On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 wrote:

>

On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:

>

Maybe wren?

Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".

The only scripting language which I know that supports integer is AngelScript

But, anyway, using D as a scripting language is only a problem if you intend to keep doing updates in the game.

I use D Dlls as the scripting language, and when doing that for platforms which doesn't support, I simply compile the "script" together with the engine code. This is how I achieve WASM/PSVita/MacOS/iOS/Android (but maybe Android could be 2 shared libraries) support.

December 14

On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:

>

After losing a battle with trying to get Lua 5.4 working on my own end, with problems I previously solved kept reappearing, and other problems just were unable to fix for no good reason, I've decided to drop it from my own game engine in favor of some replacement.

I need a lightweight scripting language with integer support that is either easy to interface with D (preferrably as a DLL/SO file, so I don't have to deal with godawful C/C++ build systems), or at least would be easy to port within a few weeks. Most scripting languages nowadays are de-facto application languages for people that are scared of compilers and type systems, thus are coming with 25-50MB worth of standard libraries, which I obviously would like to avoid packing with my way smaller game engine. At the very worst, I'll try to port pocketpy or something like that to D or make it a DLL file.

If you're willing to go with Lisp, there are small, embeddable Schemes: s7 and Chibi, one that is more Clojure-like: Janet, and one that's more like Lua: Squirrel.

« First   ‹ Prev
1 2 3 4