You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are three ways to work with excalibur:
create a vite project
import excalibur modules via esm.sh
put a script tag in the top of the html document
The last approach (script tag) requires a different approach to using classes, you have to put ex. in front of classnames. The other approaches do not need this.
In the excalibur quickstart the vite approach is taught.
In the excalibur fundementals the ex. approach is taught.
I have found that this is confusing for new game developers.
Proposal
Using ex. seems not needed anymore since we can now use import { Actor, Engine } from 'https://esm.sh/excalibur';
For that reason I propose to remove .ex prefix from tutorials and documentation and only use the modules based approach.
The text was updated successfully, but these errors were encountered:
@KokoDoko I can see the desire, the modules approach is definitely the way of the ESM future.
Originally we had done the ex prefix to make clear what was coming out of excalibur in the tutorial documentation, but maybe that's a flimsy reason nowadays.
Then we may or may not want to also include this in example code. If we establish this in every method, maybe we can get away with not needing to inject that boilerplate every time.
I personally don't use the ex import, i import each module independently. That being said, we should present a unified front in our documentation, and this is a key element IMO... just will take some work. But I agree with it being more forward looking...
Problem
Currently there are three ways to work with excalibur:
The last approach (script tag) requires a different approach to using classes, you have to put
ex.
in front of classnames. The other approaches do not need this.In the excalibur quickstart the
vite
approach is taught.In the excalibur fundementals the
ex.
approach is taught.I have found that this is confusing for new game developers.
Proposal
Using
ex.
seems not needed anymore since we can now useimport { Actor, Engine } from 'https://esm.sh/excalibur';
For that reason I propose to remove
.ex
prefix from tutorials and documentation and only use themodules
based approach.The text was updated successfully, but these errors were encountered: