Timeline for Common pattern to scale "real units" to pixels?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 26, 2011 at 22:53 | vote | accept | mac | ||
Jul 23, 2011 at 17:00 | comment | added | Patrick Hughes | Since it's 2D and there's no rotation involved @mac is basically saying to wrap functions and you can use your simple scale divide in those wrappers. The reason a full matrix is normally used is that most API have a matrix controlling the viewport, but it appears that pygame does not so you have to do it yourself one layer up. | |
Jul 23, 2011 at 15:26 | comment | added | mac | You answer is very useful (+1). I can subclass my surface class, but I need more time to explore if I can achieve what indicated in your post. I'm very new to game programming and graphics in general, do you have some link to recommend that explain this matrix approach (or even only the math involved using a matrix to scale a surface?). Thank you! | |
Jul 23, 2011 at 10:26 | history | answered | Adam | CC BY-SA 3.0 |