简体   繁体   English

如何使屏幕随pygame中的字符移动?

[英]How to make screen move with the character in pygame?

I am a beginner in pygame and I'd like to develop a game simple game where the screen moves along with the character.我是 pygame 的初学者,我想开发一个简单的游戏,屏幕会随着角色移动。

What is the best method to do so?这样做的最佳方法是什么?

One method would be to move the backround without moving the character so it looks like the character is moving.一种方法是在不移动角色的情况下移动背景,这样看起来角色正在移动。

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

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