Publish runtime to NPM

Has this feature been suggested before?
No.

Is your feature request related to a problem? Please describe.
No.

Describe the solution you’d like
Integrate Wick Editor runtime with NPM (Node.js Package Managed) projects which are bundled for the browser using tools like Webpack, Rollup, Parcel etc… The goal of using the runtime is for loading multiple .wick files from a HTML project, without using timeline code.

It’d be interesting for it to work both at Web Browser and Node.js (for back-end streamed projects). For this I recommend using the "browser" property in NPM package.json (which is handled by the bundlers like Webpack, Parcel etc.):

{
  ...
  "browser": {
    "./src/code4nodejs.js": "./src/code4browser.js"
  }
  ...
}

Or provide a package for each (in case a HTML reference or Node.JS API reference exists into the runtime):

  • com.wicklets.browser-runtime
  • com.wicklets.nodejs-runtime

(They could share the same .wick parser.)

Additionally, TypeScript typings:

{
  ...
  "types": "./src/typings.d.ts",
  "typings": "./src/typings.d.ts"
  ...
}

Describe alternatives you’ve considered
Currently it is possible to get the Wick Editor JavaScript runtime by exporting a dummy project from the editor to a compressed archive and then retrieving the runtime JS, but this should be much easier.

Image/Video Explanation Optional
None

Additional context
None

Hi @Klaider,

yeah, I’ve been thinking about a separate “player-module” for wick. For now, In my project, I extract the JSON from a HTML export and use wickengine.js to play them. I feel a separate player module could be much smaller, so, faster to parse :slight_smile:

Having a native, update-able NPM would make this proces easier and more maintainable, I guess.

For now, anyone with an intimate knowledge I would prefer to help wick along with simpel GUI updates, but having a NPM that you could just import would be a very nice to have option!

On a more personal note: how/where a you using wicks in you project(s)?

regards.,

Paul

1 Like

Unfortunately I’m not still implementing a project, but I predict it’d help for organising code and adding NPM dependencies to a project. I think just Wick Editor alone (as curently is) cannot allow implementing fully-interactive games with RIA, so I’m waiting to get some RAM for my laptop so I can see if Unreal Engine is productive.

I think I won’t do anything in Wick Editor unless creating a proper loader/runtime for me to use in NPM projects. But I need to understand the format of the project.json file found inside .wick files.

Hi @Klaider,

Well… I’m not so sure. I would like it if Wick was more modular, certainly. But Node is of course mostly for the server-side of things. Once client-side, it is not of much use for a project such as wick, as it is 100% clientside code.
Maybe I am misunderstanding you, but thats my take on things.

I do wish you a very nice gaming laptop, but be aware that Wick is 2D. Unreal is not on the (graphic-)cards

Regards,

Paul

Beside Wick player being better as modular, there’d be an advantage for cloud-exclusive games (gameplay worlds that are rendered on the backend and streamed to the front-end). It’s not common, but futurely maybe. (That also means anti-cheat, since you can’t inspect the world elements.)

but be aware that Wick is 2D. Unreal is not on the (graphic-)cards.

You could mix 2D .wick projects and 3D models (with something like Three).

To clarify, yes, Node.js is mostly for backends, however many packages run equally in the browser and Node.js (for AJAX, for example, the axios package (which simplifies browser’s XHR and Node.js HTTP module); for localization or i18n, there are several language mapping packages, inclusively com.recoyx.msglocalization).