Похожие чаты

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 ответов

7 просмотров

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.

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

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

Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
Добрый вечер. Есть вопрос, а может и предложение. Был у меня диалог в другой группе о делфи и я задался вопросом: "А нельзя ли в делфи цвет //коментария и {комментария} сде...
Kraszx
24
How are we going bro about the Raids ??
🅿️abby_FX
13
Мдя, прикол, боевая сборка запускается (именно под отладчиком) после F9 примерно полторы минуты (97 секунд если быть точным). Начал копать - проблема детектится сразу - зависа...
Александр (Rouse_) Багель
38
Всем привет! Подскажи, пожалуйста, как передать в TComboBox сразу значение и id записи. На Delphi я делал так: ComboBox1.Items.AddObject('Какое-то значение', Pointer(id запис...
Евгений
13
Keep saying it, it’s Trump or WW3. Iran will be emboldened if Harris wins by cheating. Israel will have to take the initiative against Iran. How has BTC faired everytime the...
Adz | Ferrum Network Product & Service Consultant @ Ferrum Network
1
я так понимаю, я так подозреваю, что создание такого плагина для человека, кто умеет писать плагины для делфи потребует минут 5-10 времени. но это мое подозрение. хотелось бы ...
Kraszx
7
Товарищи, кто работа с iphelper? Или может я в самой логике ошибки фигачу, не пойму.... var ifTable : PMIB_IFTABLE; size, corSize: DWORD; Buffer ...
Warfarellen
4
Здравствуйте, вопрос по структурам данных. Были у вас случаи, когда пришлось писать деревья или двунаправленные списки?
/ /
50
Коллеги, добрый вечер. Создаю коллекцию от TFPGMap, ключ - перечисление, значение - целое. Нужно отсортировать коллекцию по значению. Как это можно сделать?
Kirill Filippenok
11
Карта сайта