Похожие чаты

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

18 просмотров

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.

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта