Похожие чаты

What embedded scripting language you can recommend (or recommend not

to touch) for a video game?

I was trying to integrate Lua into my game, but it is a bit tough language to debug any errors, and the fact that one can't copy Lua state feels like a potential issue (either I would need to share a mutable state across different places in code, or I would need to fully recreate it each time). Also it took some time to make it safe and useful to work with C++ types, but that was a fun part at least.

I'm looking into AngelScript, daScript and quirrel, but maybe you have experience with some other languages that you've liked or hated

16 ответов

12 просмотров

Lua is a solid choice but has it's limitations. Avoid writing your own scripting language

are you using a game engine? or you are somehow making your own engine?

Pavel- Автор вопроса

Forth is really simple and easy to embed, and optimizing can be after the fact quite easily to get very fast performance (even near C-speed)

trev
Forth is really simple and easy to embed, and opti...

near C speed is a myth for anything over 10 lines of code in the context of scripting; unless you go through the works of using a JIT which mostly defeats a lot of the benefits of using a scripting language to begin with

Diego García
near C speed is a myth for anything over 10 lines ...

This is not true, well implemented Forth is generally near C speed, sometimes more performant.

trev
This is not true, well implemented Forth is genera...

Oh I'm talking about Lua, don't know Forth

Pavel
my own, it is a small SDL-based game

I am curious why you wouldn't just use C for scripting?

Pavel- Автор вопроса
Thomas
I am curious why you wouldn't just use C for scrip...

Not sure if I understand what you mean :)

Thomas
I am curious why you wouldn't just use C for scrip...

One of the big reasons/advantages is developing the game in real time without having to recompile the engine, especially for things that get tweaked a billion times a day throughout development. That and simple "action events" that may occur in a game. As far as general purpose programming(i.e setting up player movement, enemy ai, etc) it's definitely favourable to use C or whatever the engine language is

Pavel
Not sure if I understand what you mean :)

Just build scripts into dynamic libraries and have the engine watch a folder for changes, whenever a dynlib changes, reload it

Pavel- Автор вопроса
Thomas
Just build scripts into dynamic libraries and have...

Ah well, there's live++ for that as well, doesn't even need extra libraries, but I wouldn't say that's super convenient

QWxp
and open the door for internal cheats

but if the game isnt online it doesnt matter tho

Pavel- Автор вопроса
Thomas
What makes it inconvenient

It is not really easy to prototype in C++ or C since there is usually a lot of boilerplate associated with doing anything + all the complexity associated with memory management. Also there's this effect of: - either trying to write a complete solution under disguise of a prototype (based on habits working with the language), which makes it slower to prototype - or the opposite, after writing a prototype just leaving it as it is and calling it the final solution, which worsens the quality of C++ code Not that I care about it now though.

Похожие вопросы

Обсуждают сегодня

30500 за редактор? )
Владимир
47
any reference of this implementation?
BitBuddha
29
Ⓐrtto, [4/23/24 7:02 PM] Please explain more fully how it is not working exactly, and what are the steps you are taking, and what error messages come or what happens. Ⓐrtto, ...
Ezza Kezza
2
sounds like people have lost their kaspa on tradeogre... does this mean tradeogre not trustworthy?
Ezza Kezza
15
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
So much speculation in the last week. So much volatility in price. This is because Hedera has a GC that isn't using the network it's governing. Why aren't people asking why a...
Summit Seeker R
8
Anyone else having this error when trying to make transactions?
Datzel
11
Question: How viable is it to use Anvil as the backend infrastructure for managing a TradFi portfolio, while integrating Flexa for instant liquidity and payment solutions? Cou...
Kevin
2
вы делали что-то подобное и как? может есть либы готовые? увидел картинку нокода, где всё линиями соединено и стало интересно попробовать то же в ddl на lua сделать. решил с ч...
Victor
8
Карта сайта