Though there is a way to save games with localStorage, sometimes it is needed to load/write external files. Though this topic is widely covered by a js community and not a subject to be covered by ct.js functionality (as every API is pretty high-level already and there is no point for adding new catmods or core API for that), it is not obvious for game developers as they expect this to be a part of a game engine.
What needs to be documented:
- the use of
include folder in ct.js projects;
- the use of fetch API with examples of loading images & data from
include and the web. Possible use cases/examples include:
- working with the file system in desktop apps (
ct.fs). Use cases/examples may include:
- reading a directory's contents (e.g. discovering user-made levels);
- writing and reading JSON files;
- deleting files.
Possibly, fs functionality may be abstracted and presented as a ct.js API in ct.desktop.
Though there is a way to save games with localStorage, sometimes it is needed to load/write external files. Though this topic is widely covered by a js community and not a subject to be covered by ct.js functionality (as every API is pretty high-level already and there is no point for adding new catmods or core API for that), it is not obvious for game developers as they expect this to be a part of a game engine.
What needs to be documented:
includefolder in ct.js projects;includeand the web. Possible use cases/examples include:ct.fs). Use cases/examples may include:Possibly,
fsfunctionality may be abstracted and presented as a ct.js API inct.desktop.