smileyface12349 / notorious-narwhals

Summer Code Jam 2021 on Python Discord - Team Notorious Narwhals
MIT License
6 stars 0 forks source link

Converting between pixels and tiles #14

Closed smileyface12349 closed 3 years ago

smileyface12349 commented 3 years ago

Need a function (probably in WindowManager, maybe in Renderer) that gets the conversion rate between pixels and tiles in each direction (character width and character height).

A possible approach would be to divide the window size (in pixels) by the console size (in characters), and round to the nearest integer

This can then be used to convert Vector objects between pixels and tiles (which is already implemented)