<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>syun77</author_name>
  <author_url>https://blog.hatena.ne.jp/syun77/</author_url>
  <blog_title>2dgames.jp</blog_title>
  <blog_url>https://2dgames.jp/</blog_url>
  <categories>
    <anon>ゲームプログラム</anon>
  </categories>
  <description>この記事では、可読性が高く機能拡張しやすい(保守しやすい)ゲームプログラムを書くための 7つの基本的なテクニックを紹介します。 読みやすいゲームプログラムコードを書くための7つの基本テクニック 今回紹介する方法は以下のものです。 1. ローカル変数を使う 2. 長い条件式を関数にする 3. 長いswitch-case文を関数化する 4. テーブルで処理をシンプルにする 5. 配列へのアクセスは関数を経由する 6. インデントは深くしない 7. スコープの大きさに適した名前をつける 1. ローカル変数を使う 以下はマウスでクリックした場所に対して、プレイヤーを移動させるようなコードです。 // …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2F2dgames.jp%2Fentry%2Fhow-to-write-readable-game-program-code%2F&quot; title=&quot;読みやすいゲームプログラムを書くための 7つの基本テクニック - 2dgames.jp&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/4975506/175525561411343</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-07-05 05:00:00</published>
  <title>読みやすいゲームプログラムを書くための 7つの基本テクニック</title>
  <type>rich</type>
  <url>https://2dgames.jp/entry/how-to-write-readable-game-program-code/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
