简体   繁体   English

pygame可以使用矢量艺术吗?

[英]Can pygame use vector art?

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

-edit- bassically just detailed vectorized 2d games. -edit-大胆地只是详细的矢量化2d游戏。

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? 在pygame或其他任何类似的2d框架中使用python制作侧面滚动器时,可以利用上述链接中的图形吗?

Thanks. 谢谢。

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 .svg s at runtime. 也就是说,您可以在运行时使用cairo渲染.svg There's even a tutorial available. 甚至还有一个教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM