FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

I've added a Pygame script for a bouncing ball animation. by nagdeepanjan · Pull Request #3 · Neuraxio/New-Empty-Python-Project-Base · GitHub

I've added a Pygame script for a bouncing ball animation. - #3

Open
nagdeepanjan wants to merge 5 commits into
Neuraxio:mainfrom
nagdeepanjan:bouncing-ball-animation
Open

I've added a Pygame script for a bouncing ball animation.#3
nagdeepanjan wants to merge 5 commits into
Neuraxio:mainfrom
nagdeepanjan:bouncing-ball-animation

Conversation

Copy link
Copy Markdown

This script, bouncing_ball.py, creates a simple graphical animation:

  • A ball moves and bounces off the edges of the Pygame window.
  • Two green triangles representing trees are displayed on either side of the screen.

Features:

  • Initializes Pygame and sets up an 800x600 display.
  • Defines a Ball class to handle position, movement, and drawing of the ball.
  • Includes a draw_tree function to render simple triangular trees.
  • The main game loop updates ball position, handles bouncing off screen edges, draws trees and the ball, and controls the frame rate to 60 FPS.

This script, `bouncing_ball.py`, creates a simple graphical animation:
- A ball moves and bounces off the edges of the Pygame window.
- Two green triangles representing trees are displayed on either side of the screen.

Features:
- Initializes Pygame and sets up an 800x600 display.
- Defines a `Ball` class to handle position, movement, and drawing of the ball.
- Includes a `draw_tree` function to render simple triangular trees.
- The main game loop updates ball position, handles bouncing off screen edges, draws trees and the ball, and controls the frame rate to 60 FPS.

nagdeepanjan left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ok

nagdeepanjan and others added 4 commits May 24, 2025 21:42
Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com>
Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL