ct-js / docs.ctjs.rocks

Official docs of ct.js game engine
https://docs.ctjs.rocks/
74 stars 46 forks source link

Tips & tricks: working with files (loading and writing) #6

Open CosmoMyzrailGorynych opened 5 years ago

CosmoMyzrailGorynych commented 5 years ago

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:

Possibly, fs functionality may be abstracted and presented as a [ct.js]() API in ct.desktop.

CosmoMyzrailGorynych commented 4 years ago

See also https://github.com/ct-js/ct-js/issues/139 as it solves the same problem

ghost commented 3 years ago

So how can I use the file system? I'm developing a game that will read user-made contents.

CosmoMyzrailGorynych commented 3 years ago

@SketchySketch See docs for ct.fs module.