SEED🍚
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # つくってあそぼ(ローグライクのダンジョン生成)+おまけ ###### tags: `Advent Calendar 2019` みなさんこんばんは、11月29日の発表会までアドカレの存在をしらなかった54代プロ研のSEEDです。 何を書こうか思いつかず考えに考えた挙句、現在制作してるローグライクゲームのダンジョン生成方法についてかるーーく解説することにしました。 ## ローグライクとはなんぞや 皆さんはローグライクゲームをご存じですか?ローグライクという名前ではピンとこない人もいるとは思いますが、「風来のシレン」や「ポケモン不思議のダンジョン」、「トルネコの大冒険」といったゲームのジャンルことを指します。具体的に言うと次のような要素をもつゲームです。 * ランダムな環境生成  ― マップ構造やアイテム配置がランダムで、リプレイ性が高い。 * 恒久的な死  ― 一度死んでしまえば最初からやり直しになる。ランダムな環境生成と合わさることでゲームが面白くなる。 * ターン制  ― 一つのコマンドが一つの動作に対応する。じっくりと考えながらプレイできる。 * グリッドベース  ― ゲーム世界がタイル(マス目)で構成されている。 * 複雑さ  ― 豊富なアイテムやモンスターが用意されており、ゲームの解法が一つではない * リソース管理  ― 限られたリソース(食料やポーション)を管理し、その用途を考える。 * ハックアンドスラッシュ  ― 多くのモンスターを次々に倒していく。 * 探索と発見  ― マップを慎重に調査し、未知のアイテムの使用法を発見する。 ###### ※wikipedia参照 そんなローグライクゲームの魅力といえばやはり何度やっても楽しむことができるといった点だと思います。ダンジョンがランダムで生成され、何十何百とある道具を駆使することで様々な解法があるので何回やっても飽きることなく楽しむことができます!小学校に通っていたころの私もこのような魅力に取りつかれ、「ポケモン不思議のダンジョン空の探検隊」を200時間ほどプレイしておりました... そして、現在このような面白いゲームを自分の手で作ってみたいという想いからUnityを使って作ろうとしているのですが(ほとんど進んでない)、ダンジョン生成処理まではだいたい完成したので軽く紹介できたらなと思っております。 # ダンジョン生成の手順 今回、ダンジョン生成する際に用いたアルゴリズムは画面分割法です。画面分割法は大きなマップから徐々にエリアに分割し、部屋を生成し通路をつなげるといったものです。具体的な手順は次の通りです 1. 大きなマップからランダムで分割していく <img src = https://i.imgur.com/wPrdy6r.gif width =200px> 3. 隣接している部屋同士をつなぐ通路を作成 <img src = https://i.imgur.com/VwMHQK9.png width =200px> 5. 部屋が孤立しないように通路を削除 <img src = https://i.imgur.com/dVjhTxa.gif width =200px> これらのアルゴリズムで実際にunityで作成したものがこちらです(□を並べただけですが) <img src = https://i.imgur.com/Hjl405H.png width =200px> このように単純なアルゴリズムで不思議のダンジョンのようなマップを生成することができます。 ## 最後に 現在、ローグライク製作をのんびりとやっておりますがアイテム生成や敵、トラップなど追加しなきゃいけない要素があったり、そもそも面白いアイデアが浮かばず困っているので一緒に製作してくださる方、アイデアがある方はツイッターに連絡していただけるとありがたいです Twitter垢->@SEED_misw ## おまけ ### キノガッサかわいくないですか(唐突) <img src = "https://i.imgur.com/iGEBpZz.png" width =200px> キノガッサのかわいさを布教するべく絵を描いてみました。(絵下手+スマホ+手書き)進化前はかわいいキノコだったのに進化して何を間違えたのかプロボクサーとなってしまう...だがそのの意外性がいい!普通にかわいい!しかもただただかわいいだけでなく命中100%で眠らせられる「きのこのほうし」、「みねうち」を覚え、全ポケモンの中でもかなり高い攻撃力を誇っているため捕獲要因としても優秀で、戦闘面においても相手にキノコのほうしを浴びせ寝ているうちに隠れ特性「テクニシャン」で火力の上がった「タネマシンガン」や「マッハパンチ」、「がんせきふうじ」をぶっぱなすことができつおいです。「きのこのほうし」の所持、高火力といった点からレート戦では害悪の代名詞としても有名です。ただあまりにもかわいいのでハメ倒されたとしてもつい許しちゃいますよね... そういえば11月中旬にポケモン最新作ソードシールドが発売されましたよね。今作もキノガッサと冒険するか...と思ってたのですが ってあれ?キノガッサリストラされとるやんけ!! ### おい増田ァ! 正直キノガッサがリストラされたことに対して結構ショックでしたが、まあ800を超えるポケモンをすべて実装しようとするとゲームバランス調整とか大変になるだろうし仕方ないのかなとは思いますけどね... 次回作こそはキノガッサ採用してください増田さんおなしゃすセンセンシャル

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully