RepositoryC#DKĐan Mạch
UN

Unity-Technologies/game-programming-patterns-demo

A repo of small demos that assemble some of the well-known design patterns in Unity development to support the ebook "Level up your code with game programming patterns"

1.7ksao
268fork
0issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: billing-3075

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: owner-techmarketing

#1 Repository của tháng

2
TINIX TRENDING·Quốc gia: DK

#2 Repository của tháng

🎮 Demo design patterns trong Unity — Bắt đầu từ ebook "Level up your code"

Bộ demo nhỏ từ Unity Technologies, minh họa áp dụng các design pattern phổ biến trực tiếp trong Unity.

Đây là kho lưu trữ chứa các ví dụ Unity về các design pattern trong thực tế, hỗ trợ cho ebook "Level up your code with game programming patterns" do Unity xuất bản. Ebook 100 trang này không chỉ giải thích từng pattern mà còn bao gồm các nguyên tắc SOLID, KISS và DRY — tất cả được thiết kế cho nhà phát triển có kinh nghiệm.

Các pattern được minh họa:

  • Observer
  • State
  • Object Pooling
  • MVC / MVP
  • Factory
  • Command

Mỗi pattern đều đi kèm ví dụ thực tế trong Unity, giúp bạn dễ dàng hình dung cách chúng vận hành và cách áp dụng vào dự án của mình.

✨ Điểm nổi bật

  • Observer Pattern: Tạo mã nguồn mô-đun và dễ bảo trì thông qua hệ thống thông báo.
  • State Pattern: Xây dựng hành vi linh hoạt, dễ mở rộng cho đối tượng trong game.
  • Object Pooling: Tối ưu hiệu năng bằng cách tái sử dụng đối tượng thay vì tạo mới liên tục.
  • MVC & MVP: Kiến trúc phần mềm giúp tách rời logic, giao diện và dữ liệu một cách rõ ràng.
  • Factory Pattern: Tạo đối tượng tại thời gian chạy một cách linh hoạt và có kiểm soát.
  • Command Pattern: Xây dựng hệ thống game dễ mở rộng và hỗ trợ thao tác hoãn, ghi lại, hoặc hoàn tác.

💡 Vì sao đáng chú ý

Không phải là giải pháp hoàn hảo cho mọi trường hợp, mỗi pattern ở đây đều là một công cụ — bạn cần chọn dùng sao cho phù hợp với nhu cầu thực tế. Dự án được đóng góp bởi cả chuyên gia nội bộ và bên ngoài Unity, đặc biệt là Wilmer Lin từ Unity Game Academy.

Nếu bạn đang phát triển game bằng Unity và muốn cải thiện kiến trúc phần mềm, đây là nguồn tham khảo thực chiến rất hữu ích.


#Unity3D #GameDevelopment #DesignPatterns #CSharp #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC#
KnifeLemon/Filee

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

33.3k
Dec 2, 2026
RepositoryMarkdown
codecrafters-io/build-your-own-x

Master programming by recreating your favorite technologies from scratch.

567.0k
Nov 19, 2026
Repository
sindresorhus/awesome

😎 Awesome lists about all kinds of interesting topics [NOTE: Pull requests are temporarily disabled until I have a chance to catch up with the existing ones]

546.4k
Sep 2, 2026
RepositoryPython
public-apis/public-apis

A collective list of free APIs

502.6k
Nov 30, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryPython
EbookFoundation/free-programming-books

:books: Freely available programming books

403.1k
Nov 30, 2026
RepositoryTypeScript
openclaw/openclaw

The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

395.6k
Dec 2, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026