Cách tạo game tìm cặp hình Anime bằng Gemini AI

Trong bài viết bên dưới, GameVui sẽ hướng dẫn bạn tạo game tìm cặp hình Anime bằng Gemini theo kiểu dễ hiểu, nhanh gọn để làm ra sản phẩm hoàn chỉnh. Từ việc chuẩn bị hình ảnh, viết logic lật thẻ cho tới thêm hiệu ứng cho game mượt hơn, tất cả đều sẽ được làm với AI. Nếu bạn từng muốn thử cảm giác “ra lệnh cho AI viết game” thì đây chính là lúc bắt đầu.

Hướng dẫn tạo game tìm cặp hình Anime bằng Gemini

Bước 1: Bạn vào Leonardo AI rồi nhập Prompt sau để nó tạo khoảng 20 ảnh Anime khác nhau

Create a professional set of 20 anime chibi fantasy character icons for a memory matching card game.

The image set must look like assets from a polished mobile anime game.

ART STYLE

Style:

anime chibi
kawaii fantasy
clean mobile game UI art
polished gacha-game style
vibrant pastel colors
soft anime shading
cute but highly readable
modern Japanese mobile game aesthetic

Visual quality:

ultra clean
high contrast
easy to recognize quickly
simple readable silhouettes
no excessive details
optimized for small card display
CHARACTER SET

Generate exactly 20 unique characters:

Neko Girl
Fox Spirit
Samurai Girl
Mage Girl
Ice Queen
Demon Girl
Angel Girl
Ninja Girl
Shrine Maiden
Witch Girl
Bunny Girl
Cyber Idol
Dragon Girl
Vampire Girl
Pirate Girl
Knight Girl
Healer Girl
Slime Mascot
Magical Cat
Fairy Girl

Each character must:

have unique colors
unique hairstyle
unique accessories
unique silhouette
easy visual distinction
IMAGE REQUIREMENTS

Format:

PNG
transparent background

Size:

exactly 256x256 pixels

Composition:

centered character
medium close-up portrait
symmetrical framing
consistent camera angle
consistent lighting
same scale for all characters
GAME OPTIMIZATION

The icons are specifically for a memory matching game.

Requirements:

characters must be instantly recognizable
avoid clutter
avoid tiny accessories
avoid busy backgrounds
maximize readability on mobile screens

Each icon should:

still look clear at small sizes
work well inside rounded cards
look good with glow effects
work on dark backgrounds
LIGHTING & COLORS

Lighting:

soft magical glow
polished anime highlights
subtle rim light

Color palette:

pastel neon
fantasy anime palette
high color separation between characters

Avoid:

muddy colors
monochrome designs
low contrast
BACKGROUND

Background must be:

fully transparent
no shadow outside character
no scenery
no text
no watermark
no logo
RENDER QUALITY

Requirements:

crisp edges
anti-aliased clean lines
professional game asset quality
export-ready
no compression artifacts
CONSISTENCY

All 20 icons must:

belong to the same universe
share the same art style
share the same rendering quality
look like a complete collectible card set
IMPORTANT

Do NOT:

use copyrighted anime characters
copy existing franchises
generate realistic humans
create NSFW content
add weapons larger than the character
create overcomplicated outfits

Focus on:

cute
readable
colorful
game-ready
collectible feeling
highly polished anime UI assets.

Bước 2: Leonardo AI sẽ phân tích Prompt của bạn và tạo một ảnh Anime. Nếu cảm thấy ưng thì bạn hãy ấn Download để tải ảnh về hoặc có thể yêu cầu nó chỉnh sửa tiếp.

Tải ảnh

Bước 3: Tuy nhiên, Leonardo AI sẽ chỉ tạo một ảnh chung của 20 bức ảnh Anime, tiếp theo, bạn cần vào ChatGPT rồi nhập Prompt sau để nó cắt thành 20 bức ảnh riêng

Hãy tách từng nhân vật thành PNG riêng 256×256 transparent.

Bước 4: Bạn vào Gemini AI rồi nhập Prompt sau để nó tạo game tìm cặp hình Anime

Tạo một game web hoàn chỉnh “Tìm Cặp Hình Anime” chất lượng production bằng:

HTML5
CSS3
JavaScript thuần (Vanilla JS)
Không dùng framework
Không React
Không Vue
Không dùng game engine ngoài

Game phải chạy trực tiếp bằng file index.html.

INPUT ASSETS

Sử dụng các ảnh anime chibi có sẵn:

/images/anh-1.png
/images/anh-2.png
/images/anh-3.png
/images/anh-4.png
/images/anh-5.png
/images/anh-6.png
/images/anh-7.png
/images/anh-8.png
/images/anh-9.png
/images/anh-10.png
/images/anh-11.png
/images/anh-12.png
/images/anh-13.png
/images/anh-14.png
/images/anh-15.png
/images/anh-16.png
/images/anh-17.png
/images/anh-18.png

Mỗi ảnh:

anime chibi fantasy
PNG nền trong suốt
kích thước 256x256
dùng làm card game

Yêu cầu:

preload toàn bộ ảnh trước khi bắt đầu game
tránh lag khi lật bài
Ý TƯỞNG GAME

Người chơi phải lật các thẻ bài để tìm ra các cặp hình anime giống nhau trước khi hết thời gian.

Phong cách game:

anime fantasy
giao diện giống game mobile gacha
neon pastel
glow fantasy
hiện đại
hiệu ứng mượt
cảm giác như mini indie game chuyên nghiệp
CẤU TRÚC FILE

Trả về đầy đủ:

index.html
style.css
script.js

Không được:

pseudo code
thiếu function
bỏ trống logic
code demo nửa chừng

Game phải chạy hoàn chỉnh 100%.

GAME STATE MANAGER

Tạo hệ thống trạng thái game rõ ràng:

MENU
LOADING
PLAYING
PAUSED
LEVEL_COMPLETE
GAME_OVER
VICTORY
HỆ THỐNG LEVEL
Level 1
Grid: 2x2
Thời gian: 10 giây
Level 2
Grid: 3x4
Thời gian: 20 giây
Level 3
Grid: 4x4
Thời gian: 35 giây
Level 4
Grid: 4x5
Thời gian: 45 giây
Level 5
Grid: 6x6
Thời gian: 60 giây

Yêu cầu:

sinh card động theo level
số lượng card thay đổi tự động
shuffle khác nhau mỗi lần chơi
GAMEPLAY
Luật chơi
Click card đầu tiên → lật bài
Click card thứ hai:
nếu giống:
giữ nguyên
cộng điểm
hiệu ứng match
nếu khác:
rung nhẹ
úp lại sau 800ms

Không cho spam click trong lúc đang xử lý.

Phải có:

lock input system
anti double click bug
LOGIC GAME

Bắt buộc có:

Fisher-Yates shuffle
card matching system
score system
combo multiplier
move counter
countdown timer
next level
restart game
pause/resume
win/lose conditions
preload image system
responsive resize
HỆ THỐNG ĐIỂM
Match đúng

+100 điểm

Combo

Match liên tiếp:

x2
x3
x5
Bonus
hoàn thành nhanh
ít lượt di chuyển
còn nhiều thời gian
THIẾT KẾ UI/UX

Phong cách:

anime fantasy mobile game
neon pastel glow
glassmorphism
gradient đẹp
shadow anime mềm
chiều sâu hiện đại
GIAO DIỆN BẮT BUỘC
Thanh HUD phía trên

Hiển thị:

Level hiện tại
Điểm
Combo
Timer
Moves
High Score
Nút chức năng
Pause
Restart
Sound On/Off
Dark/Light Mode
Popup
Pause Menu
Level Complete
Game Over
Victory Screen
THIẾT KẾ CARD
Mặt trước
hiển thị ảnh anime
căn giữa
không méo hình
border đẹp
glow nhẹ
Mặt sau

Phong cách anime fantasy:

magic rune
moon/star symbol
gradient neon
shine animation
ANIMATION CARD

Dùng animation GPU-friendly:

flip 3D
hover scale
glow pulse
easing đẹp
smooth transition

Chỉ dùng:

transform
opacity

Không dùng:

top
left
animation gây lag
HIỆU ỨNG
Match đúng
sparkle particle
sakura effect
glow burst
floating score text
Match sai
red flash
shake animation
Khi thắng
confetti anime
rainbow glow
victory popup animation
Khi thua
dark overlay
warning pulse
game over popup
TIMER

Tạo:

countdown realtime
progress bar động

Màu timer:

xanh = an toàn
vàng = cảnh báo
đỏ = nguy hiểm

Khi gần hết giờ:

timer rung
màn hình pulse nhẹ
warning glow
ÂM THANH

Hỗ trợ:

flip sound
correct sound
fail sound
victory sound
lose sound

Có:

mute toggle
lưu setting bằng localStorage
RESPONSIVE

Game phải hoạt động tốt trên:

desktop
tablet
mobile

Yêu cầu:

auto resize grid
card co giãn theo màn hình
touch friendly
animation mượt trên mobile
PERFORMANCE OPTIMIZATION

Yêu cầu:

animation 60fps
preload assets
tránh memory leak
tối ưu DOM update
code modular
hiệu ứng mượt
LƯU DỮ LIỆU

Dùng localStorage lưu:

high score
level cao nhất
sound setting
dark/light mode
CHẤT LƯỢNG CODE

Code phải:

sạch
dễ đọc
có comment
chia module rõ ràng
dễ mở rộng level
dễ thay asset
BONUS FEATURES

Nếu làm được thì thêm:

preload screen
loading bar animation
achievement system
hint system
adaptive difficulty
animated background particles
rarity glow effect
daily reward popup
YÊU CẦU CUỐI CÙNG

Kết quả phải:

hoàn chỉnh
đẹp
mượt
giống mini game anime mobile
giao diện chuyên nghiệp
có cảm giác indie game thật
không lỗi
chạy ngay sau khi copy code

Không được:

bỏ sót CSS
bỏ sót JavaScript
viết code giả
viết code thiếu logic
trả về demo chưa hoàn thiện.
Thứ Hai, 11/05/2026 13:50
31 👨 39
Xem thêm: AI
0 Bình luận
Sắp xếp theo