<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toburau</author_name>
  <author_url>https://blog.hatena.ne.jp/toburau/</author_url>
  <blog_title>ゲームが作れるようになるまでがんばる日記</blog_title>
  <blog_url>https://toburau.hatenablog.jp/</blog_url>
  <categories>
    <anon>雑記</anon>
  </categories>
  <description>ゲームプログラマになる前に覚えておきたい技術の2Dアクションゲームの部分。 動くオブジェクトの1フレームあたりの移動量を画素単位にしてしまうと、より細かい調整ができなくなってしまう。そこで動くオブジェクトの内部座標として1画素あたり1000とした座標系にして、その問題を回避している。 なるほど、マップ座標、キャラの内部座標、描画座標とそれぞれ別に持つわけか。 自分だったら、浮動小数点数でキャラの移動を行うだろう。でもなぜ浮動小数点数で表現しなかったのだろう。やはりこれは演算誤差の問題かな。加算減算を繰り返すと誤差が積み重なっていくだろうし、衝突判定での比較で問題が起きそうだ。整数で表現していれ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20110512%2F1305216459&quot; title=&quot;内部座標 - ゲームが作れるようになるまでがんばる日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-12 01:07:39</published>
  <title>内部座標</title>
  <type>rich</type>
  <url>https://toburau.hatenablog.jp/entry/20110512/1305216459</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
