🎮

Amazon Q CLIでゲームを作ってみる

に公開

はじめに

Amazon Q CLIでゲームを作るとTシャツをもらえるらしいです。

https://aws.amazon.com/jp/blogs/news/build-games-with-amazon-q-cli-and-score-a-t-shirt/

Tシャツはさておき、単純に面白そうだったのでやってみることにしました。
Amazon Q CLIに開発してもらったコードは、下記のGitHubで公開しています。CLIでの指示出しのみで、一切手を加えていません。

https://github.com/fleagne/amazon-q-game

開発環境はWSL2(Ubuntu)です。

ゲームを作ってみる

まずはどんなもんかと試すために、3つのゲームを超シンプルなプロンプトで依頼してみます。
どうやら標準だとPythonで作られるらしい。pygameのインストールが必要ですね。

テトリス

Develop tetris game

ぷよぷよ

Develop puypuyo game

2048

Develop 2048 game

感想

普通にプレイできますね。いまさら驚きも何もないですが、やはり自然言語でゲームを作ることができるようになると、アイデアが膨らみますね。自分の子どもが楽しんでくれるようなゲームを作ってみたくなるものです。

革新的なゲームを作ってみる

さて、ブログには次のような記載がありました。

Step 3 : Amazon Q CLI とのチャットセッションを開始し、チャット内のプロンプトだけでゲームを作成しましょう。Amazon Q CLI の可能性を探るため、できるだけ革新的なゲームを作ってみてください。

できるだけ革新的なゲームをもとめられています。
せっかくなので、テトリスとぷよぷよと2048を取り入れた革新的なゲーム「手とリス」を作ってもらうように依頼してみます。

手とリス

OK, let's combine 3 game. Tetris, Puyopuyo and game2048. This game is TetoRisu, this game is joke. Te means hand in Japanese, To means and in Japanese and Risu means squirrel in Japanese. So, Let's consider how to combine 3 game in 1 game and Hand and Squirrel.

Amazon Q CLIの出力
I'll help you create a combined game called "TetoRisu" that merges elements
from Tetris, Puyo Puyo, and 2048 with the Japanese themes of "hand" (Te), 
"and" (To), and "squirrel" (Risu). This is a creative joke game concept!

Let me design how we could combine these three games with the Japanese 
themes:

## TetoRisu Game Concept

### Core Mechanics (Combining the 3 Games)
1. Tetris Elements: Falling blocks that can be rotated and positioned
2. Puyo Puyo Elements: Color matching and chain reactions
3. 2048 Elements: Number merging and progression
4. Japanese Theme: Hand (Te) and Squirrel (Risu) characters/elements

### Gameplay Concept
Warning: received an unexpected error from the model after 130.08s
         request_id: 12ca6f12-e53c-4575-8bba-02a0592058a6
Let's create a combined game called "TetoRisu" that merges elements from 
Tetris, Puyo Puyo, and 2048 with the Japanese themes of "hand" (Te), "and" 
(To), and "squirrel" (Risu). I'll split this into multiple parts to make it
manageable.

First, let's design the concept for our combined game:

## TetoRisu Game Concept

The game will feature:
1. A grid where pieces fall from the top (Tetris style)
2. Each piece contains numbered tiles (2048 style) and colored squirrels (
Puyo Puyo style)
3. Players can rotate and position pieces like in Tetris
4. When same-colored squirrels connect (4+ in a group), they pop and 
transform into hands
5. When same-numbered hands touch, they merge and double in value (2048 
style)
6. The goal is to create high-value hands while managing the falling pieces

Let's start by creating the main game file:


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: /home/fleagne/git/amazon-q-game/tetorisu.py

...

Creating: /home/fleagne/git/amazon-q-game/tetorisu.py

 ⋮ 
 ● Completed in 0.0s
I've created a complete TetoRisu game that combines elements from Tetris, 
Puyo Puyo, and 2048 with the Japanese themes of "Te" (hand), "To" (and), 
and "Risu" (squirrel)!

## Game Concept
TetoRisu is a unique puzzle game that combines three classic games:
• **Tetris**: Pieces fall from the top and can be rotated and positioned
• **Puyo Puyo**: Match 4+ same-colored squirrels to make them pop
• **2048**: Merge same-valued hands to double their value

## Gameplay Mechanics
1. Falling Pieces: Tetris-style pieces fall from the top
2. Two Types of Blocks:
   • **Squirrels** (Risu): Colored blocks that connect like in Puyo Puyo
   • **Hands** (Te): Numbered blocks that merge like in 2048
3. Transformation: When 4+ same-colored squirrels connect, they transform 
into hands with value 2
4. Merging: When two hands with the same value touch, they merge and double 
in value
5. Scoring: Points are earned from clearing lines, matching squirrels, and 
merging hands

## Controls
• Left/Right Arrow: Move piece horizontally
• Up Arrow: Rotate piece
• Down Arrow: Soft drop (move down faster)
• Space: Hard drop (instantly drop the piece)
• R: Restart game after game over

## How to Run the Game
To run the game, you'll need to have Python and Pygame installed. If you 
don't have Pygame installed yet, you can install it with:

pip install pygame


Then run the game with:

python tetorisu.py


## Game Features
• Colorful squirrels and numbered hands
• Chain reactions when squirrels pop
• Increasing difficulty as you level up
• Score tracking and combo counting
• Next piece preview
• Game over detection and restart option

This joke game successfully combines the three original games with the 
Japanese themes:
• "Te" (Hand): Represented by the numbered blocks from 2048"To" (And): The connecting mechanism between the different game styles
• "Risu" (Squirrel): Represented by the colorful Puyo Puyo-style blocks

Would you like me to explain any specific part of the code or make any 
modifications to the game?

ルールが全く分からない特級呪物のようなゲームが生まれてしまいました。何が何だかさっぱりわかりません。
指示を変えて再チャレンジしてみます。

頭にぼんやりと浮かんでいたゲームデザインを伝えてみます。もっと詳細に落とし込むこともできるのでしょうけれども、とりあえずこれでどこまでイメージに近いものが開発できるか、楽しみです。

Hands and Squirrels is an innovative game consisting of human hands, squirrels and nuts. When the human hands are attached, they disappear in the form of a handshake. It is an image like Puyopuyo. And squirrels and nuts are like a combination of Tetris and 2048. For every row with squirrels and nuts, you can reduce the number of nuts by the number of squirrels. Nuts increase in number when they stick together, and you need as many squirrels as the number of nuts. The standard number is 1, but the number increases to 2, 4, 8, 16, and so on, just like in the 2048 game. The number of squirrels increases as well. The hand element is Puyopuyo, while the squirrels and nuts are 2048 and Tetris combined to develop a revolutionary falling puzzle. Please use pictograms for hands, squirrels and nuts for visual clarity.

Amazon Q CLIの出力
Please use pictograms for hands, squirrels and nuts for visual clarity.
I'll create a new version of the game based on your description, focusing 
on hands, squirrels, and nuts with the mechanics you've described.


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: /home/fleagne/git/amazon-q-game/hands_and_squirrels.py

...

Creating: /home/fleagne/git/amazon-q-game/hands_and_squirrels.py

 ⋮ 
 ● Completed in 0.0s
# Hands and Squirrels: An Innovative Puzzle Game

I've created a complete "Hands and Squirrels" game that combines elements 
from Puyo Puyo, Tetris, and 2048 with the unique mechanics you described. 
The game features hands, squirrels, and nuts with their distinct behaviors 
and interactions.

## Game Concept

This innovative puzzle game features three main elements:
• **Hands**: Connect to form handshakes and disappear (Puyo Puyo style)
• **Squirrels**: Used to reduce nuts based on their value
• **Nuts**: Merge to increase in value (2048 style), requiring more 
squirrels to remove

## Core Mechanics

1. Hands Mechanic: When hands connect, they disappear in a handshake 
formation
2. Nuts Progression: Nuts merge like in 2048, doubling their value (1→2→4→8→
16→etc.)
3. Squirrel-Nut Interaction: Each row is processed to reduce nuts by 
squirrels
   • You need as many squirrels as the nut's value to remove it
   • For example, a nut with value 4 requires 4 squirrels to be removed

## Visual Elements

The game uses pictogram-style representations for clarity:
• Hands: Simple hand-shaped icons
• Squirrels: Brown squirrel-shaped icons
• Nuts: Brown circular icons with numbers showing their value

## Controls

• Left/Right Arrow: Move piece horizontally
• Up Arrow: Rotate piece
• Down Arrow: Soft drop (move down faster)
• Space: Hard drop (instantly drop the piece)
• R: Restart game after game over

## Game Features

• Falling pieces containing hands, squirrels, and nuts
• Score tracking based on handshakes, nut merges, and nut removals
• Level progression that increases game speed
• Next piece preview
• Game over detection and restart option
• Sidebar with game information and instructions

## How to Run the Game

To run the game, you'll need to have Python and Pygame installed. If you 
don't have Pygame installed yet, you can install it with:

pip install pygame


Then run the game with:

python hands_and_squirrels.py


The game creates placeholder images for hands, squirrels, and nuts, but you
can enhance it by adding your own images in an "assets" folder.

## Strategy Tips

• Try to position squirrels in rows with nuts to remove them
• Create chains of hands to clear space
• Strategically merge nuts to manage their values
• Remember that higher-value nuts require more squirrels to remove
• Plan your moves to avoid stacking pieces too high

Would you like me to explain any specific part of the code or make any 
modifications to the game?

いろいろとルールが崩壊しています。制約を正しく伝えないとだめということが分かりました。ゲームデザインの難しさが分かりますね。

さて、制約を伝えてみます。これで伝わるか怪しいですが、試してみないことにはなんともなので。

It is not interesting as it is now, so let's put in multiple restrictions. First, regarding the hand, it is a falling puzzle, so if there is no object under the block, it should be made to fall. It is like Puyopuyo. Also, hands should disappear only when four or more hands are combined. Next are squirrels and nuts. We want these to be erased by the rules of Tetris, so they should only be removed when the rows are aligned. Therefore, we do not want to delete them if they are just adjacent to each other. These should work by the rules of Tetris, not Puyopuyo. It is very difficult to know whether the rule for squirrels is 2048 or not, so please display the numbers for squirrels as well as nuts. Also, the current game design does not allow for numbers larger than 2, so please try to include larger numbers such as 2, 4, 8, etc. among the falling objects.

Amazon Q CLIの出力
I'll update the game with the restrictions and changes you've requested to 
make it more interesting. Let me implement these modifications:

1. For hands:
   • Make them follow Puyo Puyo gravity rules (fall if no object underneath
)
   • Only disappear when 4+ hands are connected

2. For squirrels and nuts:
   • Follow Tetris rules - only remove when rows are complete
   • Don't remove them when just adjacent
   • Display numbers for both squirrels and nuts
   • Include larger numbers (2, 4, 8, etc.) in the falling objects

Let me update the code to implement these changes.


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: /home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py

...

Creating: /home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py

 ⋮ 
 ● Completed in 0.0s
# Hands and Squirrels v2: Enhanced Puzzle Game

I've completely redesigned the game with the restrictions and changes you 
requested. The new version is much more interesting and challenging!

## Key Changes Implemented

### Hands (Puyo Puyo Style)
• Hands now follow Puyo Puyo gravity rules - they fall if there's nothing 
underneath them
• Hands only disappear when 4 or more are connected
• Hands behave independently from squirrels and nuts

### Squirrels and Nuts (Tetris + 2048 Style)
• Both squirrels and nuts now display numbers (1, 2, 4, 8, 16, etc.)
• They follow Tetris rules - only removed when a complete row is formed
• When a row is cleared, special processing happens:
  • Nuts of the same value in a row merge (2048-style)
  • Points are awarded based on squirrel and nut values

### Falling Objects
• Added higher value pieces (2, 4, 8) to the initial falling objects
• As you level up, higher value pieces appear more frequently
• More complex shapes with mixed elements (hands, squirrels, nuts)

## Game Mechanics

1. Dual Gravity System:
   • Hands follow Puyo Puyo gravity (fall if nothing below)
   • Squirrels and nuts stay fixed like in Tetris

2. Clearing Mechanics:
   • Hands: Connect 4+ to make them disappear
   • Squirrels & Nuts: Complete a row to clear them

3. Scoring System:
   • Points for clearing hands (50 points per hand)
   • Points for clearing rows (100 points × number of rows squared)
   • Bonus points based on squirrel and nut values in cleared rows

4. Progression:
   • Level increases every 5 rows cleared
   • Game speed increases with level
   • Higher value pieces appear more frequently at higher levels

## Controls
• Left/Right Arrow: Move piece horizontally
• Up Arrow: Rotate piece
• Down Arrow: Soft drop (move down faster)
• Space: Hard drop (instantly drop the piece)
• R: Restart game after game over

## How to Run the Game
To run the game, you'll need to have Python and Pygame installed:

pip install pygame
python hands_and_squirrels_v2.py


## Strategy Tips
• Try to position hands to create 4+ connections
• Plan your moves to complete rows with squirrels and nuts
• Higher value squirrels and nuts give more points when cleared
• Be careful with the dual gravity system - hands will fall while squirrels
and nuts stay fixed

Would you like me to explain any specific part of the code or make any 
additional modifications to the game?

エラーで落ちてしまったので、エラー修正の指示を出します。

fix error. Traceback (most recent call last):
File "/home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py", line 627, in <module>
game = HandsAndSquirrels()
^^^^^^^^^^^^^^^^^^^
File "/home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py", line 131, in init
self.reset_game()
File "/home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py", line 136, in reset_game
self.current_piece = self.new_piece()
^^^^^^^^^^^^^^^^
File "/home/fleagne/git/amazon-q-game/hands_and_squirrels_v2.py", line 155, in new_piece
if self.level < 3 and shape_idx >= 13: # Higher value pieces
^^^^^^^^^^
AttributeError: 'HandsAndSquirrels' object has no attribute 'level'

Amazon Q CLIの出力
I'll fix the error in the code. The issue is that the level attribute is 
being accessed in the new_piece() method before it's defined in the 
reset_game() method.


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: hands_and_squirrels_v2.py

...

Updating: hands_and_squirrels_v2.py

 ⋮ 
 ● Completed in 0.0s
I've fixed the error in the code. The problem was that the new_piece() 
method was trying to access the level attribute before it was defined in 
the reset_game() method.

### The Fix

I modified the new_piece() method to check if the level attribute exists 
before trying to use it:

python
def new_piece(self):
    # Choose a random shape
    shape_idx = random.randint(0, len(self.shapes) - 1)
    
    # Higher chance for basic shapes at lower levels
    if hasattr(self, 'level') and self.level < 3 and shape_idx >= 13:  # Higher value pieces
        shape_idx = random.randint(0, 12)
        
    shape = [row[:] for row in self.shapes[shape_idx]]  # Deep copy
    
    # Starting position
    x = GRID_WIDTH // 2 - len(shape[0]) // 2
    y = 0
    
    return {'shape': shape, 'x': x, 'y': y}


By adding the hasattr(self, 'level') check, we ensure that the code only 
tries to use the level attribute if it has already been defined. This 
prevents the AttributeError that was occurring during initialization.

The game should now run without errors. You can start it with:

python hands_and_squirrels_v2.py


The game still includes all the features and changes we discussed:
• Hands follow Puyo Puyo gravity rules and clear when 4+ connect
• Squirrels and nuts follow Tetris rules and only clear when rows are 
complete
• Both squirrels and nuts display numbers (1, 2, 4, 8, etc.)
• Higher value pieces are included in the falling objects

Let me know if you encounter any other issues or if you'd like to make 
additional changes to the game!

雰囲気、新しいゲームっぽくなってきました。
手の要素はぷよぷよライクに、リスとナッツはテトリスと2048ライクに動くことで、落ちものパズルに新しい風を巻き起こしている感じがします。

プレイしていて楽しくはありませんでした。

倉庫番長

倉庫番×喧嘩番長ライクなゲームを作ってもらいます。ゲームデザインは何も考えていません。
今まで何となく英語で指示出ししていましたが、日本語で指示を出したらどうなるかを試してみます。

倉庫番と喧嘩番長を掛け合わせたようなゲームを開発してください。根本的なゲームデザインは倉庫番のようなパズルゲームであり、そこに喧嘩番長の自由なツッパリ要素を含めます。つまり、倉庫番のパズルを銃などの武器を使うことで簡単にクリアできるようにします。ただし、武器を使うとスコアが下がります。また、ヤンキーと弱者があらわれ、弱者に暴力をふるってもスコアが下がります。ヤンキーには戦いを挑むことができますが、武器がない場合はゲームオーバーになります。

Amazon Q CLIの出力
I'll help you develop a game that combines elements of Sokoban (倉庫番) and
Kenka Banchou (喧嘩番長) as requested.

This game will be a puzzle game at its core, similar to Sokoban where you 
push boxes to designated spots, but with added delinquent/fighting elements
from Kenka Banchou. You'll be able to use weapons to solve puzzles more 
easily, but using them will lower your score. The game will also feature 
yankees (delinquents) and weaker characters - using violence against the 
weaker characters will decrease your score. You can challenge the yankees 
to fights, but without weapons, this will result in game over.

Let me create this unique puzzle game with fighting elements:


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: /home/fleagne/git/amazon-q-game/sokoban_banchou.py

...

Creating: /home/fleagne/git/amazon-q-game/sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s
# 倉庫番 × 喧嘩番長 (Sokoban × Kenka Banchou)

I've created a unique puzzle game that combines the box-pushing mechanics 
of Sokoban with the delinquent fighting elements of Kenka Banchou. The game
features a traditional Sokoban puzzle with added elements of weapons, 
yankees (delinquents), and innocent bystanders.

## ゲームの特徴 (Game Features)

### 倉庫番の要素 (Sokoban Elements)
• 箱を押して目標地点に配置するパズル (Push boxes to target locations)
• 壁や障害物を避けながら進む (Navigate around walls and obstacles)
• すべての箱を目標地点に置くとレベルクリア (Clear the level by placing all 
boxes on targets)

### 喧嘩番長の要素 (Kenka Banchou Elements)
• ヤンキーとの対決 (Confrontations with yankees)
• 武器を使った戦い (Weapon-based fighting)
• 弱者への対応による評価 (Consequences for how you treat weaker characters)

## ゲームルール (Game Rules)

1. 基本ルール (Basic Rules)
   • 箱を押して目標地点に配置する (Push boxes to target locations)
   • すべての箱が目標地点に置かれるとレベルクリア (Clear level when all 
boxes are on targets)

2. 喧嘩要素 (Fighting Elements)
   • ヤンキーに遭遇したとき、武器がないとゲームオーバー (Game over if you 
encounter a yankee without a weapon)
   • 武器を使うとヤンキーを倒せるが、スコアが下がる (Defeat yankees with 
weapons, but lose score)
   • 弱者に暴力をふるうとスコアが大幅に下がる (Lose significant score for 
attacking weaker characters)

3. 武器の使用 (Weapon Usage)
   • 武器を使って箱を破壊できる (Use weapons to destroy boxes)
   • 武器を使うとパズルが簡単になるが、スコアが下がる (Weapons make puzzles
easier but lower your score)
   • 武器は一度使うと消費される (Weapons are consumed after one use)

## 操作方法 (Controls)

• **矢印キー**: 移動 (Arrow Keys: Move)
• **スペース**: 武器を使う (Space: Use weapon)
• **R**: ゲームオーバー時にリスタート (R: Restart when game over)
• **N**: レベルクリア時に次のレベルへ (N: Next level after clearing)

## スコアシステム (Scoring System)

• 初期スコア: 1000(Starting score: 1000)
• 移動ごとに1点減少 (Lose 1 point per move)
• 武器使用: -50点 (Using weapon: -50 points)
• ヤンキーとの戦い: -100点 (Fighting yankee: -100 points)
• 弱者への暴力: -200点 (Violence against weak person: -200 points)

## 実行方法 (How to Run)

python sokoban_banchou.py


## ゲーム戦略 (Game Strategy)

• パズルを解くために最小限の移動で箱を配置する (Solve puzzles with minimal 
moves)
• 武器は緊急時のみ使用する (Save weapons for emergencies)
• ヤンキーとの戦いは避けられるなら避ける (Avoid fighting yankees when 
possible)
• 弱者には決して暴力を振るわない (Never use violence against weaker 
characters)
• 高スコアを目指すなら、武器の使用を最小限に (Minimize weapon usage for 
high scores)

このゲームは倉庫番の戦略的思考と喧嘩番長のツッパリ要素を組み合わせた、ユニ
ークな体験を提供します。パズルを解くだけでなく、状況に応じた判断が求められ
ます。

Would you like me to explain any specific part of the code or make any 
adjustments to the game?

何がなんだかさっぱりわからないゲームが出てきました。これは、なんだ?

エラーが発生していたので、そこは修正してもらいます。

次のエラーを解決してください。また、日本語表記の個所が読めないため、英語でメッセージを書くようにしてください。ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM default

Amazon Q CLIの出力
I'll help you resolve the ALSA audio errors and modify the game to use 
English messages instead of Japanese.

These ALSA errors occur when the game tries to initialize the audio system 
but can't find the sound card. This is a common issue with Pygame on some 
systems, especially in containerized environments.

Here's how to fix it:

1. First, we need to disable the audio initialization in Pygame
2. Then, we'll update all Japanese text to English

Let me modify the code to address both issues:


🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s



🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s



🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s



🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s



🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s



🛠️  Using tool: fs_write (trusted)
 ⋮ 
 ● Path: sokoban_banchou.py

...

Updating: sokoban_banchou.py

 ⋮ 
 ● Completed in 0.0s
I've made several changes to fix the ALSA errors and convert all Japanese 
text to English:

1. Fixed the ALSA audio errors:
   • Added code to disable the audio system in Pygame, which should prevent
the ALSA errors from appearing
   • This is done by initializing Pygame and then explicitly quitting the 
mixer subsystem

2. Converted all Japanese text to English:
   • Changed the game title from "倉庫番 × 喧嘩番長" to "Sokoban Banchou"
   • Updated all in-game messages to English
   • Converted UI elements (score, level, etc.) to English
   • Changed all game over and victory messages to English

3. Updated message content:
   • "スコア""Score""レベル""Level""移動回数""Moves""武器""Weapon""ゲームオーバー""GAME OVER""クリア!""LEVEL CLEAR!"
   • All other in-game messages have been translated to English

The game should now run without ALSA errors, and all text will be displayed
in English, making it easier to read and understand.

To run the game:
python sokoban_banchou.py


## Game Controls
• Arrow Keys: Move your character
• Space: Use weapon
• R: Restart when game over
• N: Next level after clearing

## Game Rules
• Push boxes to target locations (green squares)
• Complete the level by placing all boxes on targets
• Collect weapons to defeat yankees (red squares)
• Avoid attacking weak persons (blue squares) to maintain your score
• Use weapons strategically - they make puzzles easier but lower your score

The game combines traditional Sokoban puzzle mechanics with fighting 
elements, creating a unique gaming experience!

それっぽい感じです。

ヤンキーを倒せました。スコアが下がりました。あれ、下がるんだっけ。

茶色の箱を緑のエリアに運ぶっぽいですが、そもそもこれクリアできないデザインになっていますね。自動生成させる場合、こういう制約を考えるのも難しいですよね。この辺りの指示出しも重要だよなということに気づかされました。

おわりに

育児の片手間にこうしてゲームを作れるのはとてもありがたいことです。
これだととても革新的とは言えないので、期間内にもう少しまともなゲームを作ってみようと思います。

私は「攻めCOMダンジョン ドルルルアーガ」というゲームが一番好きなのですが、どうにも似たようなゲームに出会えないので、これを再現したいなぁなんて思っています。神げーです。

https://www.bandainamcoent.co.jp/cs/list/drururuaga/index.php

Discussion