Nested awareness
See original GitHub issueDescribe the current state of the problem Currently, ct.js assumes a more traditional way of writing games: that you run one room at a time that consists of a flat list of entities (tiles, copies, backgrounds). This produces a set of limitations:
- really big worlds with tons of entities will lag, as everything is computed at once;
- (solved) no separate layers that would allow transforming one set and not another. Say you have an RTS where you can zoom in and out (and even rotate) but UI should stay the same;
- nested copies don’t work with world positions, which break collisions with the outer world;
- (partially solved) there is no easy way to use prefab rooms (for modular level building and procedural generation), because of the lack of UI tools in ct.js and collisions.
- prefab rooms are also a shortcut to UI editor #53
Describe the solution you’d like
- Merge #127 that would allow a proper cleanup of nested structures
- Rewrite room editor with pixi.js #39 as it is a foundation for most further UI tools
- Change
ct.place
so it works with world coordinates - Add an ability to put one room into another;
- It would be cool if game devs could control when these rooms are loaded (e.g. based on camera position, or by triggers #67 ) and unloaded (aka a streaming system).
- Isn’t it a game developer’s task, though?
- It would be cool if game devs could control when these rooms are loaded (e.g. based on camera position, or by triggers #67 ) and unloaded (aka a streaming system).
- Add API to work with UI coordinates:
-
ct.mouse.xui
,ct.mouse.yui
; - ⬆️ the same for ct.touch
-
- Add API to easily position layers
- It can be made with parameters for prefabs that would tell whether a layer should use screen UI or world ones, should it follow the camera or not.
At the same time, ct.js must stay enjoyable and available for the good ol’ traditional game dev approach.
UI coordinates: most known in other engines as screen coordinates, though they do differ as ct.viewWidth
is not always the size of the canvas in screen pixels. These will be in a range from 0 to ct.viewWidth (ct.viewHeight) and be used in UI layers.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Nested awareness in a dual. | Download Scientific Diagram
This paper demonstrates the ability of the harmonic potential field (HPF) planning approach to generate a provably-correct, constrained, well-behaved trajectory ...
Read more >Nested aggregate and aggregate awareness: how to make it ...
Use case: Coming from raw event data, we have created an aggregated table nested table in BigQuery where the grain of the aggregate...
Read more >Nested Groups - United States - English
You are here: Identity Awareness Environment > Nested Groups ... When a group is nested inside a different group, users in the nested...
Read more >The Role of Nested Systems in EFL Students' Willingness to ...
More particularly, the results are beneficial for EFL teachers in which they can increase knowledge and awareness of teachers of the nature and...
Read more >Nested knowledge space model and awareness processing in the ...
In the collaborative learning environment, the rational learning navigation and flexible awareness processing must be provided. In this paper, the nested ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Then your starting point is an internal method
ct.rooms.forceSwitch
💪 https://github.com/ct-js/ct-js/blob/develop/app/data/ct.release/rooms.js#L103 Don’t forget about a companion pull at https://github.com/ct-js/docs.ctjs.rocksThis issue is now closed! Please create a new one with a proper template if this issue still affects ct.js.