Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
260 stars 25 forks source link

Add JavaScript scripting support #145

Closed jjwrap closed 6 months ago

jjwrap commented 6 months ago

Currently Principia only has scripting with Lua which is a horrible toy language with various quirks and limiations. It would be great to add support for a better, as well as faster language such as JavaScript, which would expand the capabilities of the scripting functionality of the game.

rollerozxa commented 6 months ago

We're not going to add another scripting language, and especially not JavaScript. The main limitation with the current Lua scripting is with the API that Principia exposes and not the language itself, switching the language wouldn't make a difference if the API was made the same as in Lua.

jjwrap commented 6 months ago

Really, are you just going to close the issue immediately just like that without any sort of discussion?

rollerozxa commented 6 months ago

There was a discussion, it was two messages, and now it is closed. Please read what I said.

jjwrap commented 6 months ago

Clearly you are having a knee-jerk reaction to the title of the issue, there is no way you thought it through properly for merely 5 minutes. Please think about it for a while and reconsider it. And if you cannot then let someone else on the development team consider it without you throwing it down right away like a big baby wielding a hammer over their precious open source project.

griffi-gh commented 6 months ago

no, just no.

jjwrap commented 6 months ago

no, just no.

Please consider it just for a moment.

griffi-gh commented 6 months ago

no, just no.

Please consider it just for a moment.

1) we already have lua scripting; there's nothing inherently wrong with lua
2) we are not adding a whole js runtime to the game, and "minimalist" ones are terribly slow and incomplete.
3) we are not going to maintain two, completely separate scripting apis, and removing lua is not an option because it will break compatability

rollerozxa commented 6 months ago

Please think about it for a while and reconsider it.

We've had the topic of additional scripting languages brought up at least once. My opinion is that we only need one, the Lua language is sufficient, and what we need is for the existing Lua API to be expanded. And this seems to be the consensus about it.

jjwrap commented 6 months ago

Seems like this project is being run by incompetent people.

jjwrap commented 6 months ago

@rollerozxa Why are you the "project maintainer" of the game if you clearly do not know how to program? Did you buy ownership of the game and are now running it into the ground for your own amusement? All your recent commits are just removing random lines of code and adding some retarded batch file for playing community levels even though you can just play them directly from the web browser.

griffi-gh commented 6 months ago

Seems like this project is being run by incompetent people.

I provided multiple reasons above explaining why this feature request doesn't make any sense.

griffi-gh commented 6 months ago

@rollerozxa Why are you the "project maintainer" of the game if you clearly do not know how to program? Did you buy ownership of the game and are now running it into the ground for your own amusement? All your recent commits are just removing random lines of code and adding some retarded batch file for playing community levels even though you can just play them directly from the web browser.

@rollerozxa is literally the developer of the principia-web website; (https://principia-web.se/) (while I dont agree with all of his decisions, i think he does a great job at maintaining the game)

Also, he's not the "owner"; it's sdac (a.k.a. Emil Romanus).

The batch script you mentioned is not useless; it's a workaround for opening community levels in portable builds of the game (which don't install themselves as handlers for the principia:// protocol).