Jump to content

Replace TS with Lua Script


Recommended Posts

Not this again, please don't waste your time on this.


If you want to do this because of performance, you should consider that performance relevant code should not be in the script language anyway, because script language is slower, does not matter which one you use.


Torquescript is integrated into the engine, it would be stupid to replace it with another language, since the language itself is not going to be magically better.


There was a post on Garagegames on improving Torquescript: http://www.garagegames.com/community/resource/view/18045/1


So I would suggest to spend time on optimizing the engine as it is, don't try to reinvent the wheel all the time.

Link to post
Share on other sites

Not this again, please don't waste your time on this.


If you want to do this because of performance, you should consider that performance relevant code should not be in the script language anyway, because script language is slower, does not matter which one you use.


Torquescript is integrated into the engine, it would be stupid to replace it with another language, since the language itself is not going to be magically better.


There was a post on Garagegames on improving Torquescript: http://www.garagegames.com/community/resource/view/18045/1


So I would suggest to spend time on optimizing the engine as it is, don't try to reinvent the wheel all the time.

 

It is as I have seen other games created, being that they used the Moon. Being them BeamNg.driver and the Life is Feudal

Link to post
Share on other sites

"Because others do so" is not an argument. I have seen the BeamNG implementation and they added a "lua" folder next to the "script" folder and you had Torquescript and Lua in the same game making things even more complicated. We also have C# script implementation, so if you do Lua as well, we will even have 3 scripting languages instead of 1.


To make my argument short: https://xkcd.com/927/

Link to post
Share on other sites

Demolishun made this resource http://www.garagegames.com/community/resources/view/21706 for adding python as a scripting language it could be a good template to work off of for adding lua or any other scripting language actually. I can understand why you would want a language u are more familiar with tbh i started out with lua back in the farcry modding days :D

 

The language Lua was created by a Brazilian to facilitate our integration (we brazilians and the world) with scripts. So I find it easier to work with Lua and I want to support other players to create Mods in my future game. Here in Brazil the language Lua is popular.

Link to post
Share on other sites

"Because I'm more familiar with Lua" is also a bad argument, because compare the time it would need to exchange the whole scripting language vs the time needed to learn to use a slightly different syntax. I also modded games using Lua, but I had no problems adapting to it and no problems adapting to use another scripting language, it is not really that much different also Torquescript is not so much different to C or C++.


And regarding to get Brazilians to use Torque by adding their favorite language is also a logical fallacy, it most likely will not work, you should rather invest that time into marketing that will be a thousand times more efficient in that regard.

Link to post
Share on other sites

Demolishun made this resource http://www.garagegames.com/community/resources/view/21706 for adding python as a scripting language it could be a good template to work off of for adding lua or any other scripting language actually. I can understand why you would want a language u are more familiar with tbh i started out with lua back in the farcry modding days :D

 

The language Lua was created by a Brazilian to facilitate our integration (we brazilians and the world) with scripts. So I find it easier to work with Lua and I want to support other players to create Mods in my future game. Here in Brazil the language Lua is popular.

 

Hopefully demolishuns work is helpful to you browse those files and see what you can do, just to put a spell on this to save yourself time from having to change all ts files it might be better to not replace torquescript with Lua but have lua as another option that you can use with your assets so you don’t have to change too much

Link to post
Share on other sites
  • 4 months later...

"Because others do so" is not an argument. I have seen the BeamNG implementation and they added a "lua" folder next to the "script" folder and you had Torquescript and Lua in the same game making things even more complicated. We also have C# script implementation, so if you do Lua as well, we will even have 3 scripting languages instead of 1.


To make my argument short: https://xkcd.com/927/

 

There is no argument to be had. There is a preference to be had which stops at "I like this better"

OP didn't ask whether he should or should not replace TS with Lua, he asked how he can begin doing that.

Realize that OP is not you and does not operate on the same standards as you.

Link to post
Share on other sites

I highly agree with @KaleidoDeer ! :)


On a more on-topic note.


With my latest C-Interface changes, it should be a lot easier to integrate new scripting languages.

It's mostly meant for other runtimes hooking into T3D, and you can avoid changing any source code if you can just call the SetCallbacks C-API method which sets up a few central function pointers.


See:

https://github.com/GarageGames/Torque3D/blob/development/Engine/source/cinterface/cinterface.cpp#L33-L96


Then you can have the LUA integration somewhere separate, and just setup those pointers as part of the boot-up sequence.

Link to post
Share on other sites

There is no argument to be had. There is a preference to be had which stops at "I like this better"

OP didn't ask whether he should or should not replace TS with Lua, he asked how he can begin doing that.

Realize that OP is not you and does not operate on the same standards as you.

Of course there is an argument, it is totally common sense to argue whether you should or not do something before you do something. Everyone should operate on the same standards of sanity.


Imagine someone on a car forum asks how to do something stupid like how he can replace the wheels with wooden wheels, of course the first question of the sane people in that forum would be "Why the hell you want to do that?" and even if the persists with it, they will tell him to not do it and list all the potential drawbacks and dangers associated with it and even if he still persists most people would not help him, because they don't want to be responsible for such an insane undertaking.


And that is why I list the potential problems you may run into replacing the scripting language and even if you manage to do it, there is still no guarantee that you gain anything in the end.

Link to post
Share on other sites

There is no argument to be had. There is a preference to be had which stops at "I like this better"

OP didn't ask whether he should or should not replace TS with Lua, he asked how he can begin doing that.

Realize that OP is not you and does not operate on the same standards as you.

Of course there is an argument, it is totally common sense to argue whether you should or not do something before you do something. Everyone should operate on the same standards of sanity.


Imagine someone on a car forum asks how to do something stupid like how he can replace the wheels with wooden wheels, of course the first question of the sane people in that forum would be "Why the hell you want to do that?" and even if the persists with it, they will tell him to not do it and list all the potential drawbacks and dangers associated with it and even if he still persists most people would not help him, because they don't want to be responsible for such an insane undertaking.


And that is why I list the potential problems you may run into replacing the scripting language and even if you manage to do it, there is still no guarantee that you gain anything in the end.

Any and all arguments and so called "standards of sanity" are all relative.(Including what I am saying here) Expecting people to operate on the same standards is for lack of a better word, fantasy.


You might as well not reply to a help thread if you come into it with an attitude of "Please justify to me appealing to my own standards why your idea is good for me to help you"

People generally are only looking to solve their goals and don't want to bother going back and forth trying to appeal to another ego.


The car example is a stretch too when a new scripting language poses no physical harm.


Thats my 2C though and my last post on the matter to avoid further derailing.

Link to post
Share on other sites

The potential harm here is, that people waste their and other peoples time with pointless undertakings and cause confusion and possibly even sabotage the whole engine.


Why would you even want to do something that you don't have an argument for why you want to do it? Sanity is not relative, sanity is when you have reasons and arguments for what you are doing, insanity is when you don't.

Link to post
Share on other sites

This is not something stupid like "replacing wheels with wooden wheels" this is more akin to asking where one can buy a Hyundai, and then being told that Hyundai is a bad choice because the closest shops is only Honda certified.


The question wasn't "should I buy a Hyundai" the question was "where can I buy a Hyundai".


A perfectly valid answer is:

"I think you should buy Honda, that will be easier in the long run. But you can buy a Hyundai in the town Y"


A perfectly valid discussion to be had is:

"Why do you prefer Hyundai when it's much more convenient to buy that than a Honda?"


A very invalid response is:

"Ughhhh.. Just buy a Honda. Everybody ends up buying a Honda anyways, and it's much easier. Don't buy a Hyundai."


Because in the last response, you:

  • Contribute nothing and enter the discussion close-minded
  • Invalidate the opinion of the OP

 

Now this thread has gone completely off track, because someone wanted help with an issue and a discussion sprouted about whether this issue was a valid issue.


I'm locking this thread.


@noemen if you create a new thread, asking the same question I can enforce on-topic discussion on that thread if you like. I am sorry your thread got derailed, and you didn't get an answer to your question.

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...