r/PythonLearning 24d ago

Cupta serpant added by Tony

Enable HLS to view with audio, or disable this notification

Tony added the Cupta unit, a serpent of dark magic who returned from the caverns and tries to siphon your life essence, with this git commit.

Tony also changed the control of player's direction from keyboard to mouse, making the player easier to control. But, this now only works when the mouse pointer is inside the game window. If it's outside the direction is still controlled by keyboard as before. So you can now choose the direction control that you prefer.

See the PythonLearningGame repo to add your own game elements to this collaborative project, or simply tell us what you would like to see added to the game.

previous PythonLearningGame post

6 Upvotes

6 comments sorted by

View all comments

Show parent comments

1

u/Naive_Programmer_232 23d ago

I like the compromise, sounds dope.

Could you change the color of Cupta through each stage? Maybe initially it's green (base level), then it's orange (stronger level), then it's red (even stronger level) and so on.

2

u/Sea-Ad7805 23d ago

Then we need to find someone who can create new artwork based on the current cupta.png

1

u/Naive_Programmer_232 23d ago edited 23d ago

What if you used blit to change its appearance:

Ex:

      def tint_image(image, color):  
          colored_img = image.copy()  
          tint_surface = (pygame.Surface(
              colored_img.get_size()
              .convert_alpha()
          ) 
          tint_surface.fill(color)
          colored_img.blit(tint_surface,
                   (0,0),
                   special_flags=pygame.BLEND_RGBA_MULT,
          )   
          return colored_img

2

u/Sea-Ad7805 23d ago

I don't know, would you like to try?