Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establishing the roadmap #2

Open
Kenzzer opened this issue Sep 27, 2023 · 10 comments
Open

Establishing the roadmap #2

Kenzzer opened this issue Sep 27, 2023 · 10 comments

Comments

@Kenzzer
Copy link
Member

Kenzzer commented Sep 27, 2023

Source2mod

Where to contribute ?

We're currently still getting the sdk ready. Head over to hl2sdk and contribute towards the efforts.

What is this issue about ?

This issue aims at summarizing and compiling the answers given on both github and discord, regarding the direction in which the project is headed.

Will Sourcepawn be a supported language ?

Yes.

Why not extend VScript instead ?

No, most agree that VScript is

  • unsuitable for server operating needs
  • would tie the project too closely to valve's internal implementation
  • its current state is unknown, and we're waiting on cs2 release to know more

What is the main scripting language ?

Sourcepawn is the main scripting language.
Javascript/Typescript seem to be desired, but will not be explored until reasonable arguments have been made as to why we should.

Plugin Scripting API

Nothing has been decided yet.

@gudvinr
Copy link

gudvinr commented Sep 28, 2023

What is the main scripting language ?

Why not instead embed WASM runtime as VM. I think wasmtime, wasmedge, wasm3 all can be embedded in an app. With some SDK magic you can provide interface to VM that can be called from any language.
At this point it doesn't matter what's the scripting language because you can use any language that can be compiled as WASM/WASI.

@funcgoof
Copy link

funcgoof commented Sep 28, 2023

I would love to see javascript / typescript this would lower entry for everyone to start code their own plugins and contribute since pawn is barely known. Hopefully this will be reconsidered :) new engine new start…

@B3none
Copy link
Contributor

B3none commented Sep 28, 2023

Javascript/Typescript seem to be desired, but will not be explored until reasonable arguments have been made as to why we should.

JavaScript/TypeScript are pre-established high level / user friendly languages. I think it'd make contributing to CS2 plugins appeal to a much wider audience than the existing SourcePawn implementation. Another good thing about using JavaScript/TypeScript is that it would potentially allow the exploration of packages / libraries for CS2 plugins installed via NPM. I wonder if it'd allow us to install plugins onto a server via NPM (or potentially a custom package management solution) rather than the old rather non-standardised way? My question would be what would the ideal JavaScript/TypeScript solution look like, and what is really possible?

TL;DR A JavaScript/TypeScript implementation makes it easier for newcomers, and opens the door for a more sophisticated server plugin management which utilises Semantic Versioning further down the line.

@theelsaud
Copy link

I have my doubts about JS/TS. Although it is my favorite language.

If the implementation will depend on V8 as in NodeJS to work in rantime. Then we can start buying RAM for servers with a large number of plugins. (30Mb per plugin = 3GB per 100 plugins (average statistical server).

Anyway, I would make a core of pluggable language libraries.
And the user would consider himself which stack to use.

Mandatory support for Extensions in C++.

I would prefer to write in compiled language (like GoLang, Rust) with function call from Source2Mod. Alas of course these languages would be very problematic for beginners.

P.S. Why don't you like SourcePawn? :)

@ProIcons
Copy link

If the implementation will depend on V8 as in NodeJS to work in rantime. Then we can start buying RAM for servers with a large number of plugins. (30Mb per plugin = 3GB per 100 plugins (average statistical server).

you won't be initializing the runtime more than once. You will probably have a ("plugin manager","cordinator","orchestrator" -- insert whatever fits in here) that will loop through the plugins and call the relevant code/events w/e.

For me it would make more sense to be able to write C++ modules for SourceMod with the ability of adding a language support. Basically leave the flexibility on the community to expand on the language support. I would personally be interested on creating a module for C# by embedding the CoreCLR.

I understand that might make the ecosystem of plugins... difficult to moderate, but i'm confident with a proper discussion we can probably solve all of the problems.

@GazziFX
Copy link

GazziFX commented Oct 1, 2023

I would personally be interested on creating a module for C# by embedding the CoreCLR.

Hello, I'm trying to do this, but I'm not experienced in CS modding/scripting, you can add me in discord Gazzi#6131 if you want to discuss or contribute

@roflmuffin
Copy link
Contributor

roflmuffin commented Oct 23, 2023

I would personally be interested on creating a module for C# by embedding the CoreCLR.

I have a project doing exactly that: https://github.com/roflmuffin/CounterStrikeSharp

@rmcmk
Copy link

rmcmk commented Nov 15, 2023

What is the main scripting language ?

Why not instead embed WASM runtime as VM. I think wasmtime, wasmedge, wasm3 all can be embedded in an app. With some SDK magic you can provide interface to VM that can be called from any language. At this point it doesn't matter what's the scripting language because you can use any language that can be compiled as WASM/WASI.

The prospect is certainly enticing, as it would allow for the utilization of practically any native language capable of being compiled into WASM, while also maintaining support for SourcePawn. The implementation might require a considerable investment of effort, though.

@diamondburned
Copy link

The implementation might require a considerable investment of effort, though.

Is there any particular reason why this might be the case? I would expect WASM to actually be equally easy or far easier to implement than wiring up a JavaScript runtime interpreter. Not to mention it would probably be far lighter internally to do so.

There's also ways to run JavaScript in a WASM environment, so we wouldn't even have to worry about fighting for which languages we want to support!

@rmcmk
Copy link

rmcmk commented May 7, 2024

The implementation might require a considerable investment of effort, though.

Is there any particular reason why this might be the case? I would expect WASM to actually be equally easy or far easier to implement than wiring up a JavaScript runtime interpreter. Not to mention it would probably be far lighter internally to do so.

There's also ways to run JavaScript in a WASM environment, so we wouldn't even have to worry about fighting for which languages we want to support!

Good to know. Honestly, I'm not completely familiar with the internals of SP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants