Can pygame use vector art?

送分小仙女□ 提交于 2021-02-08 05:41:26

问题


http://cache.kotaku.com/assets/resources/2008/02/dbzburstcell.jpg

-edit- bassically just detailed vectorized 2d games.

When making a side scroller in pygame or any other comparable 2d framework with python, can you utilize graphics such as in the above link?

Thanks.


回答1:


You can always render your vectors to bitmaps with enough resolution and use the rendered version in the game, instead of rendering everything in runtime -- that seems to be what the game you linked above does.

That said, you could use cairo to render .svgs at runtime. There's even a tutorial available.



来源:https://stackoverflow.com/questions/4001340/can-pygame-use-vector-art

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!