nyan icon indicating copy to clipboard operation
nyan copied to clipboard

Add support for a camera

Open ducaale opened this issue 5 years ago • 2 comments

Some questions to consider:

  • How this will affect mouse coordinates? i.e. should it default to screen or world coordinates?
  • How UI elements will be handled?
  • Can this be made flexible so it can supports parallax effects?

ducaale avatar May 05 '20 16:05 ducaale

I have been thinking about how to handle mouse coordinates for a while. I think the best way to do it is to have two mouse objects which are mouse, s_mouse (screen mouse), and w_mouse (world mouse). plus a third mouse object which is an alias of s_mouse (or w_mouse? I am not really sure). I am not yet convinced this is the best naming but you get the idea.

For UI elements, we could pass a special property on sprite creation to make it use screen coordinates. As for parallel effects, I don't think that is something that Nyan should be concerned about as it is something that can be implemented trivially from the user side.

ducaale avatar Jun 16 '20 21:06 ducaale

https://www.sfml-dev.org/tutorials/2.5/graphics-view.php

ducaale avatar Feb 20 '21 18:02 ducaale