Skip to content

Tag: sprite

Python Snake Game snake does not follow

I am creating Snake game in pygame using Sprite logic how do i chain the movement of the snake? another question on this has been answered here but i cant apply it to my code: see here the minimal example above works. try it first and you will see my issue :) the snake grows on collision with the red

Why won’t my Pygame sprite jump code work?

I am trying to make my Pygame sprite jump so I followed a tutorial and this is what it gave me. But it doesn’t work for some reason. What’s wrong with it Answer You need to set somewher isjump = True. Additionally the if isjump == False: needs an else case:

How to spawn sprites from multiple sides?

I´m creating simple game where I play as aeroplane and i´m dodging rockets (rockets appear from right side), I did something like barrier which block enemies and kill them, but it´s too OP, so I want to nerf it, so I´m going to spawn enemies from both, right side, and top side. But I really don´t know how to …