I'm passing the time programming a little game in javascript, I've done what I'm trying this in several in game engine. And what I'm trying to do is generate the world while the player walks around the map. Using engines like unity and godot, I have always had the facilities to deal with the camera and the scene. Now with pure javascript I'm kind of not knowing where to go.
Come on, what I have so far:
A world generated by 2D noise and my character in it can move with the keys of the keyboard. What I want to do now is that when walking he generate the world and also the camera accompany him. And that with the scroll of the mouse I can take the camera to a bigger zoom so that I can better visualize the generated world.
So there are 3 questions I have:
1 - How to create a camera that will follow the player, already thinking about the best way to make the world be generated when walking the player.
2 - How to generate the world while he walks (This I believe I can do.)
3 - How to zoom in with the mouse scroll?