Meld8は、トランプを用いた麻雀風のメルドゲームです(ルールも含めてオリジナルに作成)。 本リポジトリでは、Meld8のルールに準拠し、コンピューター(CPU)と対戦できるゲームのソースコードを公開しています。本システムはPythonおよびPygameで開発されており、pygbagを用いてWebAssemblyにコンパイルすることで、ブラウザ上で動作するWebアプリケーションとして配信しています。
https://meld8dev.github.io/meld8/web/
麻雀の戦略性をベースに、トランプの特性を活かした順子ボーナスや赤・黒のスート指定、Jokerの万能性と制限事項を融合させた新しいボードゲームです。
役の一覧、Jokerの制限、点数計算および対人戦・2人プレイ用の補足ルールについては、以下の公式ルールブックを参照してください。
本ゲームは、多言語および日本語の正確なテキスト描画を行うため、Google Fontsの Noto Sans JP (Bold) を使用します。 ソースコードをローカル環境で実行、またはビルドする場合は、事前に以下の手順でフォントファイルを配置してください。
# 必要ライブラリのインストール
pip install pygame
# ゲームの起動
python main.py
# pygbagのインストール
pip install pygbag
# ローカルWebサーバーの起動
pygbag .
起動後、ターミナルに表示されるURL(例: http://localhost:8000 )にブラウザでアクセスしてください。
現在、本Webアプリケーション(pygbag環境)をWebView化し、モバイル端末で動作するAndroidアプリとしての配信を準備中です。なお、同Androidアプリ内には広告(マネタイズ要素)を導入する予定です。
本プロジェクトにおけるゲームロジックのコーディング、ルールの精査、アルゴリズムの検証、およびドキュメントの校正にあたり、開発補助ツールとして生成AIを活用しています。
本プロジェクトは、構成要素に応じて以下の2つのライセンスを適用しています。いずれも著作者の明記を条件に、自由な利用・改変・再配布が可能です。
(※同梱する NotoSansJP-Bold.ttf については、SIL Open Font License 1.1 が適用されます)
Meld8 is a mahjong-style melde game using playing cards (including the rules, it was created originally). This repository contains the source code for the game, built with Python (Pygame) and compiled into a WebAssembly browser app using pygbag.
https://meld8dev.github.io/meld8/web/
Meld8 combines the deep strategy of Mahjong with the unique properties of playing cards, including sequence bonuses, Red/Black suit constraints, and a Joker that acts as a wild card with specific limitations.
For a complete list of Yaku (winning patterns), Joker restrictions, and scoring mechanics, please refer to the official rulebook:
To display text and Japanese characters correctly, this game requires the Noto Sans JP (Bold) font. If you are running or building the game locally, please ensure the font file is present.
# Install Pygame
pip install pygame
# Run the game
python main.py
# Install pygbag
pip install pygbag
# Start the local testing server
pygbag .
Open your browser and navigate to the provided local URL (e.g., http://localhost:8000).
An Android application version, constructed by wrapping the web application (pygbag environment) via WebView, is currently under development for mobile platforms. Please note that this mobile application is planned to integrate advertisements for monetization.
Generative AI tools were utilized as development assistants for writing game logic, auditing rules, verifying algorithms, and proofreading documentation in this project.
This project applies the following two licenses depending on the component. Both allow free use, modification, and redistribution provided that attribution is given to the author.
(Note: The bundled NotoSansJP-Bold.ttf font file is distributed under the SIL Open Font License 1.1).