Marketplace | Games

Smart-Contract #000-00000000000025

Chart
logo

Circle & Square 00605

This Python code utilizes the Pygame library to create a basic game featuring a yellow circle and red obstacles in a graphical user interface. The primary objective of the game is to control the yellow circle's movement with the arrow keys on the keyboard. The player must navigate the circle around the screen while avoiding the red obstacles, collecting points as they progress.

Characteristics:

  • [Category] <------------------------------------------------------------------> [Games]
  • [Creator] <-----------------------------------------------------> [InNotSystem13]
  • [Project] <---------------------------------------------------> [Circle & Square]
  • [Identifier] <--------------------------------------------------------> [00605]
  • [Contract] <------------> [0xc762a1ccd7632b49BC914947cF8613E10F602687]
  • [Chain] <---------------------------------------------------------> [BSC Chain]
  • [Type] <----------------------------------------------------> [Application]

Binance Smart Chain (BSC)

Price: 1 USDT

Video instruction

“In order to start creating something exclusive, you don’t need any special knowledge or skills, you just need to be able to COPY and PASTE - it’s like with a girl, you just need to undress and paste!”

3 Simple steps to get started 🚀

Install Python: If you don't already have it, download and install Python from the official website. Python supports various operating systems, and you can choose the version that suits your computer.

Install PyCharm: Download and install the PyCharm IDE to make creating your application easier. You can find a free version of PyCharm Community Edition that is good to get started.

Copy Code: Open the PyCharm development environment, create a new project. Copy and paste the code into the window, click the Start button, you have launched your project. Use this code or other codes from the Metaverse to create something global and worthwhile!

Try just copying your first code and creating an application

In just 1 minute

    import pygame
    import sys
    import random

    # Initialize Pygame
    pygame.init()

    # Screen dimensions
    screen_width = 800
    screen_height = 600

    # Colors
    white = (255, 255, 255)
    yellow = (255, 255, 0)
    red = (255, 0, 0)

    # Create the screen
    screen = pygame.display.set_mode((screen_width, screen_height))
    pygame.display.set_caption("Moving Objects Game")

    # Sizes of the circle and obstacle
    circle_size = 70
    obstacle_size = 20

    # Initial coordinates of the circle
    circle_x = screen_width // 2
    circle_y = screen_height // 2

    # Initial speed of the circle
    circle_speed = 5

    # Initial position of the obstacle
    obstacle_x = screen_width
    obstacle_y = random.randint(0, screen_height - obstacle_size)

    # Score
    score = 0

    # Main game loop
    running = True

    while running:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False

        # Handle key presses
        keys = pygame.key.get_pressed()
        if keys[pygame.K_UP]:
            circle_y -= circle_speed
        if keys[pygame.K_DOWN]:
            circle_y += circle_speed
        if keys[pygame.K_LEFT]:
            circle_x -= circle_speed
        if keys[pygame.K_RIGHT]:
            circle_x += circle_speed

        # Move the obstacle
        obstacle_x -= circle_speed

        # Check for collisions
        if (
            circle_x + circle_size > obstacle_x
            and circle_x < obstacle_x + obstacle_size
            and circle_y + circle_size > obstacle_y
            and circle_y < obstacle_y + obstacle_size
        ):
            running = False  # Game ends on collision

        # Check if the circle passed the obstacle
        if obstacle_x < 0:
            obstacle_x = screen_width
            obstacle_y = random.randint(0, screen_height - obstacle_size)
            score += 1

        # Draw the screen
        screen.fill(white)
        pygame.draw.circle(screen, yellow, (circle_x, circle_y), circle_size)
        pygame.draw.rect(screen, red, (obstacle_x, obstacle_y, obstacle_size, obstacle_size))

        # Draw the score
        font = pygame.font.Font(None, 36)
        text = font.render("Score: " + str(score), True, yellow)
        screen.blit(text, (10, 10))

        pygame.display.update()

    # Quit Pygame
    pygame.quit()
    sys.exit()



    # pip install pygame


            
Copy the code, paste it into PyCharm, press the start button
Message to the community from the creator: The Pygame library for handling graphics and user input. The screen's dimensions are set to 800 pixels in width and 600 pixels in height. The colors used in the game are defined as white, yellow, and red. The game window is created, named "Moving Objects Game." The circle and obstacle sizes are specified. The initial coordinates of the yellow circle are set in the middle of the screen. The initial speed of the circle is set at 5 pixels per frame.
I dance to track Eminem Offset Tyga - Ric flair drip
Quote from the creator: “The big path to wealth starts with 1 USD”
Start Price - 1 USDT
Additions: In the Marketplace “Calculators All” and “Games” I add and assign the main currency AK (A.KANGOL)
1 USDT & = & 1 AK (A.KANGOL)
(A.KANGOL) - [internal coin]
The purpose of the contract is step-by-step training using BlockChain in creating your projects using Python - [COPY & PASTE]
Логотип

Games

Товар 1

Flappy vs Alchimic 00601

Creator - InNotSystem13

Contract type - Open

Товар 2

Apple Snake 00602

Creator - InNotSystem13

Contract type - Open

Товар 3

Snake vs Alhimic 00603

Creator - InNotSystem13

Contract type - Open

Товар 4

Square Jumps 00604

Creator - InNotSystem13

Contract type - Open

Товар 5

Circle & Square 00605

Creator - InNotSystem13

Contract type - Open