Sprites trong pygame

Mọi người cho mình hỏi là Sprites là cái gì và dịch nghĩa thế nào @@
Ví dụ như trong đoạn dưới đây thì dịch thế nào @@
“The above code creates two lists. The variable all_sprites_list will contain every sprite in the game. This list will be used to draw all the sprites. The variable block_list holds each object that the player can collide with. In this example it will include every object in the game but the player. We don’t want the player in this list because when we check for the player colliding with objects in the block_list, Pygame will go ahead and always return the player as colliding if it is part of that list.”

1 Like

In computer graphics, a sprite is a two-dimensional bitmap that is integrated into a larger scene. Originally sprites referred to independent objects that are composited together.

Sprite là một hỗn hợp các thành phần không phụ thuộc lẫn nhau được trộn vào bên trong 1 đối tượng, trong đó phải có một bitmap 2D để có thể render trên screen. Sprites là linh hồn của game.

1 Like

Ngoài ra còn có :v Single Sprite (1 cái cây , 1 cái nút , bla bla…) và Multiple sprites ( thường chuỗi hành động như hình dưới)

Trong đó bạn phải xác định hướng player để Render cho đúng hướng
Bạn đang viếtGame thì phải tính đến va chạm và phản xạ giữa các NPC

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?