Closed CosmoMyzrailGorynych closed 2 years ago
This is a feature that I would like to work on.... ^_^
@leedigital Cool! What exactly do you want to work on? I have some work on a new room editor, but it is way, waaay far away from finishing.
whatever you want me to do first ... but I think putting one room in another is something I really want to do.... ^_^
Then your starting point is an internal method ct.rooms.forceSwitch
:muscle: 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.rocks
So a fat chunk of improvements in this direction was made in https://github.com/ct-js/ct-js/commit/902c92d1376427094afaecbb7736ceacf3eaae22 with the help of @leedigital. It introduces nesting rooms, ct.camera
, and the concept of UI coordinates opposed to game coordinates. And it all meets together nicely.
There are WIP docs at https://github.com/ct-js/docs.ctjs.rocks/tree/v1.3
Hey there 👋 I marked this issue as stale as it hadn't brought much attention for quite a while. I do understand that stale issues are still issues, yet here stale issues receive the least attention from maintainers so they can focus on more relevant tasks. You can help with this issue by checking whether it affects latest versions of ct.js and writing about it if it does, providing an example project and steps to reproduce. Or maybe you can close it with a PR! Note that some platform-dependent issues can't be resolved by developers due to the absense of such devices :c We will need help from you for such tasks. If this issue won't get attention in three months, it will be closed.
This issue is now closed! Please create a new one with a proper template if this issue still affects ct.js.
Describe 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:
Describe the solution you'd like
ct.place
so it works with world coordinatesct.mouse.xui
,ct.mouse.yui
;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.