PyGame Scrolling Shooter Game Beginner Tutorial in Python - PART 11 | Screen Scrolling

preview_player
Показать описание
In this Python tutorial I code a Scrolling Shooter Game using the PyGame module. I'm going to cover scrolling and explain how to scroll the level and all objects as the player moves left and right

Credits for assets used:

Check out my other PyGame tutorials:
Рекомендации по теме
Комментарии
Автор

that game, those tutorials, this channel... pure gold i love it

majin
Автор

As longer I follow the tutorial, as more I apreciate the quality of it...great stuff

weitnow
Автор

These tutorials are elite. I've improved so much because of you. Thank you so much. I see how you managed to solve some problems and the methods you use, it is very intelligent.

zvikomboreromugwara
Автор

Thanks, everything ended up scrolling backwards, took me ages to find the one '-' out of place! Well I helps the learning curve. Thanks for sharing the knowledge.

philluvschips
Автор

It makes me so happy whenever I predict what you're about. This is clearly Way better than school. I mean imagine paying to learn for a course like this. its packed with every programming habits and methods you need. You my sir are a God.

jesterc.
Автор

Man, finally the missing piece. I followed the other videos to make a non-scrolling tile based world, and couldn't figure out how to scroll it. Drove me crazy all weekend.

briana
Автор

Great stuff Russ. Loving your series 🙏🏻

EwertonSilveiraAuckland
Автор

amazing bro... am i full fan now. Please i would love to see the videos i see in other channels here on pygame but weren't well taught. Example, isometric background, 3d gaming etc. Thank you for your courses

wingielee
Автор

that scrolling in the background is so cool!

nuggi
Автор

To prevent the world from over scrolling i actally added a 21.png which is a full transparent png and check if right is greater than screen_width and also gatheredall the sprite groups inside the World __init__

RunningRunner
Автор

cannot thank u enough man you deserve the best!!

ezzeldin
Автор

for the scrolling idea I researched other place so you don't need to hardcode the time you loop X. in fact you can count it depend on how big your BG is.
so it will looks like this. in my code there is only one BG picture btw. Thanks very much for the tutorial
def draw_bg():
screen.fill(BG)
rel_x = bg_scroll % bg.get_rect().width
screen.blit(bg, (rel_x - bg.get_rect().width, 0))
if rel_x < SCREEN_WIDTH:
screen.blit(bg, (rel_x, 0))

saury
Автор

5:50 how to i check if the player reaches this point but vertically ?

denis-eqjy
Автор

Hey Russ! I love the videos, keep them coming! I think that its time for you to have a discord server so that you can chat with your subscribers! Also your channel is growing CRAZY fast! At this rate we will have 100k subscribers by the end of 2021! Remember me when you get EVEN MORE famous!
Coding With Siddhesh

s.dh
Автор

Wow~ That's totally awesome! Thanks a lot!

권남수-ov
Автор

i just love ur tutorials 😍 😌 keep it up man!

BeRaikwal
Автор

Are you culling the tiles that are not being displayed or are you drawing the entire map every frame?

beebstergames
Автор

# Sample Python code for character movement
player_position = [0, 0] # Initial position

def move(direction):
if direction == "left":
player_position[0] -= 1
elif direction == "right":
player_position[0] += 1
elif direction == "up":
player_position[1] += 1
elif direction == "down":
player_position[1] -= 1

# Example usage:
move("right")
print("Current position:", player_position)

abdukaqhvlogs
Автор

Sorry, this is an old question probably for a previous video - how did you access the obstacle_list attribute from the World class in other classes like Soldier and Bullet? Like how does world.obstacle_list work in other classes?

MichaelZ
Автор

when I press the button to shoot once, it keeps shooting me finishing almost every projectile

mahamalage