Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] for what job is lua better than c++ ?

[DiscordArchive] for what job is lua better than c++ ?

[DiscordArchive] for what job is lua better than c++ ?

rektbyfaith
Administrator
0
10-28-2022, 09:39 AM
#1
Archived author: Rymercyble • Posted: 2022-10-28T09:39:45.881000+00:00
Original source

for what job is lua better than c++ ?
rektbyfaith
10-28-2022, 09:39 AM #1

Archived author: Rymercyble • Posted: 2022-10-28T09:39:45.881000+00:00
Original source

for what job is lua better than c++ ?

rektbyfaith
Administrator
0
10-28-2022, 09:43 AM
#2
Archived author: Foe • Posted: 2022-10-28T09:43:51.447000+00:00
Original source

It's a scripting language, pretty much everything that can be scripted within reason what you shouldn't do in Lua you can relatively easily offload with c++ and expose as a method. C++ isn't a scripting language, and pretty much no one ever uses the dynamic library reloading feature. It makes it cumbersome to both prototype, test and debug compared to a dedicated scripting language. The use of c++ scripts like we do in emulation is not the industry standard, and absolutely wouldn't fly in the current state for any other project.
rektbyfaith
10-28-2022, 09:43 AM #2

Archived author: Foe • Posted: 2022-10-28T09:43:51.447000+00:00
Original source

It's a scripting language, pretty much everything that can be scripted within reason what you shouldn't do in Lua you can relatively easily offload with c++ and expose as a method. C++ isn't a scripting language, and pretty much no one ever uses the dynamic library reloading feature. It makes it cumbersome to both prototype, test and debug compared to a dedicated scripting language. The use of c++ scripts like we do in emulation is not the industry standard, and absolutely wouldn't fly in the current state for any other project.

rektbyfaith
Administrator
0
10-28-2022, 09:45 AM
#3
Archived author: Foe • Posted: 2022-10-28T09:45:10.106000+00:00
Original source

And in something like wow, you shouldn't really rely on the performance and precision of c++ for most things, it's not a very realistic expectation to have for large scale networked games like MMOs
rektbyfaith
10-28-2022, 09:45 AM #3

Archived author: Foe • Posted: 2022-10-28T09:45:10.106000+00:00
Original source

And in something like wow, you shouldn't really rely on the performance and precision of c++ for most things, it's not a very realistic expectation to have for large scale networked games like MMOs

rektbyfaith
Administrator
0
10-28-2022, 09:46 AM
#4
Archived author: stoneharry • Posted: 2022-10-28T09:46:25.979000+00:00
Original source

Same reason we don't use assembly for everything
rektbyfaith
10-28-2022, 09:46 AM #4

Archived author: stoneharry • Posted: 2022-10-28T09:46:25.979000+00:00
Original source

Same reason we don't use assembly for everything

rektbyfaith
Administrator
0
10-28-2022, 09:46 AM
#5
Archived author: Foe • Posted: 2022-10-28T09:46:51.930000+00:00
Original source

Anyway, telling people there's no room for a scripting language just because you know a programming language is a bit absurd. Don't tell people to remove tools from their toolbox, that just makes for worse craftsmen
rektbyfaith
10-28-2022, 09:46 AM #5

Archived author: Foe • Posted: 2022-10-28T09:46:51.930000+00:00
Original source

Anyway, telling people there's no room for a scripting language just because you know a programming language is a bit absurd. Don't tell people to remove tools from their toolbox, that just makes for worse craftsmen

rektbyfaith
Administrator
0
10-28-2022, 09:47 AM
#6
Archived author: Titi • Posted: 2022-10-28T09:47:50.988000+00:00
Original source

Faster developement, easyness and readability. You pretty much only use C++ if you need the performance or precise memory and hardware management
rektbyfaith
10-28-2022, 09:47 AM #6

Archived author: Titi • Posted: 2022-10-28T09:47:50.988000+00:00
Original source

Faster developement, easyness and readability. You pretty much only use C++ if you need the performance or precise memory and hardware management

rektbyfaith
Administrator
0
10-28-2022, 09:49 AM
#7
Archived author: Rymercyble • Posted: 2022-10-28T09:49:07.346000+00:00
Original source

i dont think im able to explain what i mean
rektbyfaith
10-28-2022, 09:49 AM #7

Archived author: Rymercyble • Posted: 2022-10-28T09:49:07.346000+00:00
Original source

i dont think im able to explain what i mean

rektbyfaith
Administrator
0
10-28-2022, 09:52 AM
#8
Archived author: Foe • Posted: 2022-10-28T09:52:10.057000+00:00
Original source

To give you a proper answer, it depends. There's some caveats with using Eluna in dungeons, primarily that the instance hooks overwrite most dungeon scripts. In short, don't mix c++ and Lua in the same dungeon for most things, it causes weird issues. If you strictly script an entire dungeon in Lua, then there's no issue doing so.
rektbyfaith
10-28-2022, 09:52 AM #8

Archived author: Foe • Posted: 2022-10-28T09:52:10.057000+00:00
Original source

To give you a proper answer, it depends. There's some caveats with using Eluna in dungeons, primarily that the instance hooks overwrite most dungeon scripts. In short, don't mix c++ and Lua in the same dungeon for most things, it causes weird issues. If you strictly script an entire dungeon in Lua, then there's no issue doing so.

rektbyfaith
Administrator
0
10-28-2022, 09:54 AM
#9
Archived author: Titi • Posted: 2022-10-28T09:54:02.620000+00:00
Original source

For emulator scripting specifically, it mostly depends what you're good at, C++ is generally better as it's "native" and the Lua implementation isn't optimal. Though if coding very large custom system I'd say Lua could be worth it for the big dev time save, it depends. Also Eluna/Lua is used for custom client-server communication, not possible with the default framework
rektbyfaith
10-28-2022, 09:54 AM #9

Archived author: Titi • Posted: 2022-10-28T09:54:02.620000+00:00
Original source

For emulator scripting specifically, it mostly depends what you're good at, C++ is generally better as it's "native" and the Lua implementation isn't optimal. Though if coding very large custom system I'd say Lua could be worth it for the big dev time save, it depends. Also Eluna/Lua is used for custom client-server communication, not possible with the default framework

rektbyfaith
Administrator
0
10-28-2022, 09:57 AM
#10
Archived author: stoneharry • Posted: 2022-10-28T09:57:01.985000+00:00
Original source

Whether you use Lua, C++, or whatever else - good fundamental knowledge is needed to write good code. For example, you can't just store a pointer to a object since it may be invalidated. Likewise if you cache a value by the instance Id, you need to create a hook for the instance free event to uncache it because instance ids can be reused.
rektbyfaith
10-28-2022, 09:57 AM #10

Archived author: stoneharry • Posted: 2022-10-28T09:57:01.985000+00:00
Original source

Whether you use Lua, C++, or whatever else - good fundamental knowledge is needed to write good code. For example, you can't just store a pointer to a object since it may be invalidated. Likewise if you cache a value by the instance Id, you need to create a hook for the instance free event to uncache it because instance ids can be reused.

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)