ct-js / docs.ctjs.rocks Goto Github PK
View Code? Open in Web Editor NEWOfficial docs of ct.js game engine
Home Page: https://docs.ctjs.rocks/
Official docs of ct.js game engine
Home Page: https://docs.ctjs.rocks/
The depth
property is depreciated and the property now been used is zIndex
.
ct.types.isCopy
ct.u.hexToPixi
ct.u.pixiToHex
This is a sub-issue related to issue #43
ct.
is not needed to be written. Properties that dropped the ct.
prefix without major changes: meta|camera|templates|rooms|actions|inputs|content|backgrounds|styles|res|emitters|tilemaps|timer|u|pixiApp|stage|loop|fittoscreen|assert|capture|cutscene|desktop|eqs|filters|flow|fs|gamedistribution|inherit|gamepad|keyboard|mouse|pointer|nakama|noise|nanoid|place|random|sprite|storage|touch|transition|ulid|vgui|vkeys|yarn
ct.sound
is now sounds
, ct.sound.spawn
is now sounds.play
ct.delta
is now u.delta
, ct.deltaUi
is u.deltaUi
ct.room
is rooms.current
ct.pixiApp
is pixiApp
fittoscreen
is now a hidden built-in API. Controlled through these ⬇settings
appears:
highDensity
is a toggleable boolean (retina mode);targetFps
configures target FPS and its cap;viewMode
is old fittoscreen's mode with one of these values (can be changed during runtime): 'asIs' | 'fastScale' | 'fastScaleInteger' | 'expand' | | 'scaleFit' | 'scaleFill'
camera
is not writable now.
ct.roomWidth
and ct.roomHeight
are now rooms.current.viewWidth
and rooms.current.viewHeight
/*!%start%*/
injection was removed.sounds
API.Turns out many people on Discord struggle to make a top-down non-grid movement, especially with collisions, propulsion and moving objects.
При запуске сайта на локальной машине показывается белая страница и ошибка в консоли браузера "Загрузка модуля по адресу «http://localhost:8080/@id/C:/Users/Diablo/Documents/GitHub/docs.ctjs.rocks-russian/docs/.vuepress/.temp/internal/layoutComponents» была заблокирована из-за неразрешенного MIME-типа («»)."
E.g. one needs to change a background's texture or its movement speed. Or they need to manually set its coordinates.
Link at the bottom of documentation pages doesn't work.
inside page Introduction to JavaScript, part I: Variables, Properties, Operations some links are not working
currently found ->
properties of Copies
Rooms
In GitLab by @Comigo on Feb 24, 2019, 21:57
The code to pause the game is as following:
PIXI.ticker.shared.speed = 0;
ct.pixiApp.ticker.speed = 0;
And, to unpause:
PIXI.ticker.shared.speed = 1;
ct.pixiApp.ticker.speed = 1;
But it should be documented as a quick tip/tutorial in the docs, because one will never guess on how to do that, even with Pixi.js docs.
From Discord server:
If you are using
ct.delta
all over your game code, a simple line [...] must effectively disable motion of everything that uses that ct.delta. Default movement system with this.speed and this.direction is included here as well. At this point, the game loop will still work, meaning that UI and stuff will be responsible.
To set ct.delta back to normal, run [...].
So you need to:
- Spawn a pause menu;
- Set both tickers to 0;
- Set them back to 1 when a player presses the "unpause" button
There are numerous topics that would be cool if they were documented in ct.js' docs.
Please assign this issue to me. I am working on it.
Thanks
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:
include
folder in ct.js projects;include
and the web. Possible use cases/examples include:
ct.fs
). Use cases/examples may include:
Possibly, fs
functionality may be abstracted and presented as a ct.js API in ct.desktop
.
In GitLab by @Comigo on Mar 15, 2019, 01:56
null
Automatic theme switching does not work on https://docs.ctjs.rocks. When you type this into browser's console, the dark theme becomes active;
document.body.classList.add('dark');
And the colors of current dark theme are very bad(blueish high contrast tones). If you apply the theme below, it changes automatically according to the mode of the system. also the colors are better:
https://github.com/tolking/vuepress-theme-default-prefers-color-scheme
Use case: for offline use at schools, subways, for people who prefer working with pdfs (i guess), for print, and as a backup when an internet connection is not stable (it is still the case for 21st century).
This can be achieved relatively easy with one of these modules:
I'm busy with other things right now or I'd make a pull request of it instead.
On step "Creating a Robot Character and Ground", it says to 'Now move to the "On Step" tab and add this code:', however it is reusing the default parameter speed
in the tutorial causing issues if the person following it appends the code in the tab rather than replacing it due to the default inclusion of this.move();
.
Two possible solutions:
this.speed
for the max horizontal speed.In GitLab by @Comigo on Mar 2, 2019, 02:29
(quick note) All the names in ct.js were already updated for pixi.js v5, but docs still refer to v4 names
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.