cleolibrary / CLEO-Redux

Experimental JavaScript runtime for GTA 3D era games/GTA IV/Bully
https://re.cleo.li
Other
214 stars 20 forks source link

CLEO Redux - Some doubts! #16

Closed nonunknown closed 2 years ago

nonunknown commented 2 years ago

Could be Event-driven stuff be added to Javascript version of cleo?

Like, instead of having a while loop as the main code, we could have something like:

//script.js

GameEvents.onKeyPressed(keyCode) => {
   //......

}

Also a lot of events, so we can have less expensive code!

There's a way to use external Classes from Javascript?

For example the class WebScoket

x87 commented 2 years ago

Idea to create callbacks to game event is very interesting. We had some brief discussion of that here: https://github.com/cleolibrary/CLEO-Redux/discussions/1

I think it could be nice to have such a feature.

As for using external classes, can you elaborate what do you mean? Call game functions or import code from external files/libraries ?

nonunknown commented 2 years ago

Thanks for the response!

I saw the discussion, and will be cool to have a place were we modders, could place which events are more used, necessary, so people can upvote and downvote, not sure, but this will be really useful.

About external classes, I'm not sure but maybe I can be saying shit, but its possible to integrate with like nodejs? I mean, it will be like C++ coding, you can integrate any external library to your code, and nodejs let us do that!

x87 commented 2 years ago

We have a discord channel, link in the readme

x87 commented 2 years ago

See #27 and #28