+ 5

Example code with multiple scenes js, please?

I want to make a web code where action can move from one scene to another (eg Alice going between real space and wonderland. At the same time, being able to zoom out and see both rooms or to save status in the hidden scene. My question is what would be the good practice organisation in html and js to achieve this. Ideally, could someone point me to a code where something similar is (properly) handled?

12th Aug 2020, 12:38 PM
bell
bell - avatar
2 Antworten
+ 3
This is an excellent example to start with, because you do not see the whole scene at once and there are different levels so I should study this before asking on. i see what you mean about dimensions and I would need to worry about this later (i am still happy in 2D) but my question was also referring to the proper code organisation. If you had many more levels and heavy to render objects and wanted to store status for rooms you visited, how would that be organised? Multiple files? would one need a framework? (I have an idea how complex cpp code is organised around a main entry, with headers, namespaces and so on but have no idea for the js how to split things). Thanks for taking the time to answer. btw, I had started by reading some of your codes but had not made my way to this one (quite a lot to read!)
12th Aug 2020, 9:32 PM
bell
bell - avatar
+ 2
Mirielle you have given me a lot of useful roads to explore and I should start practising with a (2D) camera. Thanks a lot!
12th Aug 2020, 10:35 PM
bell
bell - avatar