I’m about to start implementing a small point-and-click adventure game in p5.js, and one of its several gimmicks is that some rooms will be IF instead. To do this I plan to just have parchment and the p5.js canvas sitting next to each other, and resize them or change their visibility as the player moves between rooms. I think this is basically straightforward, but if anyone has tried anything similar and knows of any gotchas, I’d love to hear about them :)
What I’m not sure at all how to do, though, is read state from Parchment in order to make the necessary changes. I can imagine this working either via actively monitoring Parchment state from outside, to detect things like inventory changes and location changes, or by inducing Parchment to call some javascript when particular events happen.
I would very much appreciate any guidance or relevant documentation or similar project links anyone has to offer before I jump in and try to hack something together on my own, because it has the feeling of something I could very easily make way too hard on myself. Thanks!