ducaale / nyan

A fork of Python Play - The easiest way to start coding games and graphics projects in Python
MIT License
17 stars 2 forks source link

Add support for a camera #4

Open ducaale opened 4 years ago

ducaale commented 4 years ago

Some questions to consider:

ducaale commented 4 years ago

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 commented 3 years ago

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