11-21-25 free Friday


today i worked on the dodging game i finished the code but i just wanna make sure there’s lil to no errors(better safe than sorry) soo here’s the video i used and some screenshots of the code and some code snippets

 while run:
        star_count += clock.tick(60)
        elapsed_time = time.time() - start_time

        if star_count > star_add_increment:
            for i in range(5):
                star_x = random.randint(0, WIDTH - STAR_WIDTH)
                star = pygame.Rect(star_x, - STAR_HIEGHT, STAR_WIDTH, STAR_HIEGHT)
                stars.append(star)

            star_add_increment = max(200, star_add_increment - 50)    
            star_count = 0

so this piece of the code will have the game run and add the stars(obstacles) so that the player can dodge it and it’ll also have the timer count and have the stars come out by random and more as the game continues and somewhat faster as more stars appear here is a link to the video i used


Leave a Reply

Your email address will not be published. Required fields are marked *