Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 952900c

Browse files
Merge pull request avinashkranjan#2334 from andoriyaprashant/branch3
Ink Art Puzzle Adventure Script added
2 parents c7143fc + 6df5e3e commit 952900c

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

‎Ink_art_puzzle_adv/README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ink Art Puzzle Adventure
2+
3+
Welcome to the Ink Art Puzzle Adventure! In this game, you will embark on an exciting journey through a world filled with intriguing ink art illustrations. Your mission is to interact with the drawings and use your puzzle-solving skills to progress through the story.
4+
5+
## How to Play
6+
7+
1. Install the required dependencies listed in the `requirements.txt` file.
8+
2. Run the `ink_art_puzzle_adventure.py` script in your Python environment.
9+
3. Move the player using the arrow keys to explore the world.
10+
4. Interact with the ink art illustrations to solve puzzles and uncover hidden secrets.
11+
5. Enjoy the adventure and experience the unique charm of ink art!
12+
13+
## Requirements
14+
15+
Make sure you have Python and the following dependencies installed:
16+
17+
- Pygame (version >= 2.0.0)
18+
- (Any other dependencies or assets needed for your specific implementation)
19+
20+
You can install the required dependencies using pip:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import pygame
2+
import sys
3+
4+
# Initialize Pygame
5+
pygame.init()
6+
7+
# Screen dimensions
8+
WIDTH, HEIGHT = 800, 600
9+
screen = pygame.display.set_mode((WIDTH, HEIGHT))
10+
pygame.display.set_caption("Ink Art Puzzle Adventure")
11+
12+
# Colors
13+
WHITE = (255, 255, 255)
14+
BLACK = (0, 0, 0)
15+
16+
# Player properties
17+
player_x, player_y = WIDTH // 2, HEIGHT // 2
18+
player_speed = 5
19+
20+
# Main game loop
21+
def game_loop():
22+
running = True
23+
while running:
24+
for event in pygame.event.get():
25+
if event.type == pygame.QUIT:
26+
running = False
27+
28+
# Player movement
29+
keys = pygame.key.get_pressed()
30+
if keys[pygame.K_LEFT]:
31+
player_x -= player_speed
32+
if keys[pygame.K_RIGHT]:
33+
player_x += player_speed
34+
if keys[pygame.K_UP]:
35+
player_y -= player_speed
36+
if keys[pygame.K_DOWN]:
37+
player_y += player_speed
38+
39+
# Draw the player and background
40+
screen.fill(WHITE)
41+
pygame.draw.rect(screen, BLACK, (player_x, player_y, 50, 50)) # Player rectangle
42+
43+
# Draw ink art illustrations (replace this with your own images)
44+
# Example: ink_art_image = pygame.image.load("ink_art_image.png")
45+
# screen.blit(ink_art_image, (x, y))
46+
47+
pygame.display.update()
48+
49+
# Start the game loop
50+
game_loop()
51+
52+
# Quit Pygame
53+
pygame.quit()
54+
sys.exit()

‎Ink_art_puzzle_adv/requirements.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pygame>=2.0.0

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /