<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">TalesBlog</title>
  <subtitle type="html">製作しているゲームの近況や私事など</subtitle>
  <link rel="self" type="application/atom+xml" href="http://talewin.kagome-kagome.com/atom"/>
  <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/"/>
  <updated>2011-06-19T23:50:09+09:00</updated>
  <author><name>TALE</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>talewin.kagome-kagome.com://entry/13</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/luainterface%E3%81%A8xna%E3%81%AE%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%B5%E7%94%A8%E3%81%97%E3%81%9F%E3%81%84%EF%BC%81" />
    <published>2012-07-09T00:22:22+09:00</published> 
    <updated>2012-07-09T00:22:22+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>LuaInterfaceとXNAのクラスを併用したい！</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[最近ゲームのUIを作るためにLuaを導入しました。<br />
Luaに関しては、C#上で使うためにLuaInterfaceを使わせていただきました。<br />
<br />
LuaInterfaceの導入に関してはぴお氏のサイトを参考にしています。<br />
こちら　→　http://piorimu.blog121.fc2.com/blog-entry-95.html<br />
導入はdllを参照設定するだけなので楽ちんです。<br />
<br />
さて、問題はこの先。<br />
ゲームはXNAで作っているのでLuaではXNAのクラスを参照していく必要があります。<br />
「LuaでXNA側で用意されていのクラスをどうやって参照すればいいのか」。これに少々手間取りました。<br />
<br />
http://marimokobo.blog53.fc2.com/blog-entry-42.html<br />
<br />
こちらのサイトさんで解説されているように名前空間をインポートすればいいらしいのですが、「A .NET exception occured in user-code 」と出るばかり。<br />
どうやらMicrosoft.Xna.Framework名前空間が参照できてないらしいです。<br />
<br />
http://lua-users.org/lists/lua-l/2005-05/msg00039.html<br />
こちらの質問を参考に、luaファイルの上部に次の2文を足すことで解決しました。<br />
<blockquote><br />
luanet.load_assembly("Microsoft.Xna.Framework")<br />
Vector2 = luanet.import_type("Microsoft.Xna.Framework.Vector2")<br />
</blockquote><br />
プロジェクト側で読み込んでいるdllも参照しなければならないみたいですね。ともあれこれでVector2型を参照できるようになりました。]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/12</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/%E3%80%90xna%E3%80%913d%E3%81%A82d%E3%82%92%E4%BD%B5%E7%94%A8%E3%81%99%E3%82%8B%E6%99%82%E3%81%AB" />
    <published>2012-04-06T02:08:50+09:00</published> 
    <updated>2012-04-06T02:08:50+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>【XNA】3Dと2Dを併用する時に</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[現在作っているフレームワークに3Dと2Dを併用する仕様を組み込みました。<br />
ローグにおいて、ダンジョンは3D、ミニマップは2Dで描画する処理を作るためです。<br />
仕様は単純にSprite Batchを作ってAlpha Blendで描画するもの。<br />
<br />
Before<br />
<a href="//talewin.kagome-kagome.com/File/3defca6d.png" target="_blank"><img src="//talewin.kagome-kagome.com/Img/1333645131/" border="0" alt="" /></a><br />
<br />
After<br />
<a href="//talewin.kagome-kagome.com/File/e210ec5e.png" target="_blank"><img src="//talewin.kagome-kagome.com/Img/1333645132/" border="0" alt="" /></a><br />
<br />
Σ(ﾟдﾟ;) ＜なんという事でしょう。匠の仕業により綺麗だったダンジョンが完全崩壊してしまいました。<br />
<br />
<br /><a href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/%E3%80%90xna%E3%80%913d%E3%81%A82d%E3%82%92%E4%BD%B5%E7%94%A8%E3%81%99%E3%82%8B%E6%99%82%E3%81%AB" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/11</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/%E5%90%8C%E3%81%98%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E8%A4%87%E6%95%B0%E3%81%AE%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7%E4%BD%BF%E3%81%84%E3%81%BE%E3%82%8F%E3%81%97%E3%81%9F%E3%81%84%EF%BC%81" />
    <published>2012-03-29T12:23:57+09:00</published> 
    <updated>2012-03-29T12:23:57+09:00</updated> 
    <category term="ゲーム" label="ゲーム" />
    <title>同じモデルを複数のクラスで使いまわしたい！</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[久しぶりってレベルじゃないですね。<br />
ここの所制作しているゲームの3D化とそれに関するバグ祭に追われています。<br />
<br />
3Dのテスト用にローグ的なゲームを試作しているのですが、床タイルを大量に並べたいと思った時にこんなバグが出現。<br />
まずタイルを1枚足元において<br />
<a href="//talewin.kagome-kagome.com/File/before.png" target="_blank"><img src="//talewin.kagome-kagome.com/Img/1332990923/" border="0" alt="" /></a><br />
<br />
もう一枚横に並べると…<br />
<a href="//talewin.kagome-kagome.com/File/bag.png" target="_blank"><img src="//talewin.kagome-kagome.com/Img/1332990924/" border="0" alt="" /></a><br />
<br />
( ﾟдﾟ)＜前の1枚が消えた…だと…<br />
<br />
この原因はこちらのサイトの方が解説しておられました。<br />
<br />
Softimage付属ランタイムをXNAに組み込みスキンアニメする<br />
http://tkina.web.fc2.com/kaihatu/siryou/Softimage-HowToUseXSIXNARuntime/Softimage-HowToUseXSIXNARuntime.htm#◎同一モデルの複数表示<br />
<br />
ここで解決策の1つとして参照されていたソースコードのページはこちら<br />
http://blogs.msdn.com/b/shawnhar/archive/2007/03/09/contentmanager-readasset.aspx<br />
<br />
原因は<span style="color:#FF0000">読み込んだと思っていたオブジェクトが参照受け渡しになっている</span>ことだったわけです。<br />
<br />
ちなみに下のページのソースコードは、1番下が元々のContentManagerに近いオブジェクトのロード、一番上が毎回新しいオブジェクトを読み込むロードの実装となっているようです。<br />
<br />
というわけで新しくContentManagerを作った結果…<br />
<a href="//talewin.kagome-kagome.com/File/after.png" target="_blank"><img src="//talewin.kagome-kagome.com/Img/1332990925/" border="0" alt="" /></a><br />
<br />
無事モデルを複製することができました。<br />
もちろんこの方法だとメモリ馬鹿食いなのでご利用の際は注意しましょう。<br />
<br />
]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/10</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/mtg/%E6%9C%80%E8%BF%91%E3%81%AE%E3%82%B9%E3%82%BF%E3%83%B3%E3%81%AE%E3%83%87%E3%83%83%E3%82%AD" />
    <published>2011-08-26T21:12:14+09:00</published> 
    <updated>2011-08-26T21:12:14+09:00</updated> 
    <category term="MTG" label="MTG" />
    <title>最近のスタンのデッキ</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[MTG関連の記事を全く書いてなかった気がしたので最近使っているスタンダードのデッキを晒しあげ。<br />
<br />
緑黒t白の出産の殻デッキです。<br />
以下リスト<br />
<br /><a href="http://talewin.kagome-kagome.com/mtg/%E6%9C%80%E8%BF%91%E3%81%AE%E3%82%B9%E3%82%BF%E3%83%B3%E3%81%AE%E3%83%87%E3%83%83%E3%82%AD" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/9</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xmlserializer%E3%82%92%E4%BD%BF%E3%81%84%E3%81%9F%E3%81%84%EF%BC%81" />
    <published>2011-07-23T17:20:27+09:00</published> 
    <updated>2011-07-23T17:20:27+09:00</updated> 
    <category term="ゲーム" label="ゲーム" />
    <title>XMLSerializerを使いたい！</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<span style="font-size:120%">敵データやフィールドの管理なんかでデータをxmlに保持しておこうとしていました．<br />
C#にはXmlSerializerという便利なものがありまして，クラスや配列なんかを一括で書きこんでくれるんですが…正しく利用しないとバグの嵐．<br />
しかも「反映中にエラーが発生しました」というえらく抽象的なもので原因が全くわかりません．<br />
<br />
そんなわけでこれの解決法を書き留めておきます．<br />
</span><br />
<br /><a href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xmlserializer%E3%82%92%E4%BD%BF%E3%81%84%E3%81%9F%E3%81%84%EF%BC%81" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/8</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xact%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E2%80%A6%EF%BC%9F" />
    <published>2011-07-15T08:00:06+09:00</published> 
    <updated>2011-07-15T08:00:06+09:00</updated> 
    <category term="ゲーム" label="ゲーム" />
    <title>XACTが動かない…？</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[XNAゲームプログラミングにおいて音楽面の開発用に提供されているツール、XACTなんですが、ある日これが突然起動しなくなりました。<br />
アイコンをクリックすると即落ちてしまうという状態。<br />
後々またこの症状が出てもいいよう、対処法を書いておきます。<br /><a href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xact%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E2%80%A6%EF%BC%9F" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/7</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xna%E3%81%A7%E3%83%86%E3%82%AF%E3%82%B9%E3%83%81%E3%83%A3%E3%81%B8%E3%81%AE%E6%8F%8F%E7%94%BB%E3%81%8C%E3%81%97%E3%81%9F%E3%81%84%EF%BC%81" />
    <published>2011-07-12T00:14:37+09:00</published> 
    <updated>2011-07-12T00:14:37+09:00</updated> 
    <category term="ゲーム" label="ゲーム" />
    <title>XNAでテクスチャへの描画がしたい！</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[２Dゲームで画面を揺らそうと思った時、一時的にテクスチャへ描画し、それを動かして描画するのが一般的ですよね。<br />
XNAでもそのような処理は実装されているのですが、なかなか仕様が分かりづらかったので書き留めておきます。<br />
<br /><a href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xna%E3%81%A7%E3%83%86%E3%82%AF%E3%82%B9%E3%83%81%E3%83%A3%E3%81%B8%E3%81%AE%E6%8F%8F%E7%94%BB%E3%81%8C%E3%81%97%E3%81%9F%E3%81%84%EF%BC%81" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/6</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xna%E3%81%A7%E9%9F%B3%E3%82%92%E6%89%B1%E3%81%86%EF%BC%81%E2%91%A0" />
    <published>2011-07-03T23:25:03+09:00</published> 
    <updated>2011-07-03T23:25:03+09:00</updated> 
    <category term="ゲーム" label="ゲーム" />
    <title>XNAで音を扱う！①</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[いつもながらC#＆XNAでゲームを作ってたんですが…。<br />
XNAの音周りがあまりにも分かりづらい仕様だったので書き留めておきます。<br />
内容は<br />
①BGMをそのまま鳴らす。<br />
②複数の音を再生できるようにする。<br />
③XACTを介して音を鳴らす。<br />
こんなとこですかね。<br />
今回は①のみ書いてあります。<br /><a href="http://talewin.kagome-kagome.com/%E3%82%B2%E3%83%BC%E3%83%A0/xna%E3%81%A7%E9%9F%B3%E3%82%92%E6%89%B1%E3%81%86%EF%BC%81%E2%91%A0" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/5</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/c-%E3%81%A7avi%E3%82%92%E4%BD%BF%E3%81%84%E3%81%9F%E3%81%84%EF%BC%81-mediafoundation-" />
    <published>2011-06-28T23:58:23+09:00</published> 
    <updated>2011-06-28T23:58:23+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>C#でaviを使いたい！~MediaFoundation~</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[最近ちょっとした用事で動画処理なんかをしようと思っているのですが、<br />
そのうちアプリケーション化することと言語の使いやすさ・経験的にもC#で開発しようと思っています。<br />
<br />
そんなわけでC#でaviを読み込んだり再生する方法を探していたのですが、どうにもしっくり来る方法が見つからない…。DirectShowはVISTA以降開発側から見限られているのでできれば触りたくないですし、WindowsMediaPlayerは再生には良さそうなんですがそれ以上の処理になるとどうなるかよく分からない。<br />
<br />
そこでせっかくですからこの機会にDIrectShowの後継として誕生したMediaFoundationを触ってみようということにしました。…これが悲劇の始まりだったんですけどね。<br />
<br /><a href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/c-%E3%81%A7avi%E3%82%92%E4%BD%BF%E3%81%84%E3%81%9F%E3%81%84%EF%BC%81-mediafoundation-" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
  <entry>
    <id>talewin.kagome-kagome.com://entry/4</id>
    <link rel="alternate" type="text/html" href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/nive%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9" />
    <published>2011-06-26T00:20:04+09:00</published> 
    <updated>2011-06-26T00:20:04+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>niveの使い方</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[東方キャラでMTG第４話にて初めてnive1.8を使い出したわけなのですが、動画の出来の割にいろいろと苦戦した&hellip;ということで後々も使いそうな点を書き留めておこうかと思います。<br />
<br />
とりあえず今回は画像の回転について。<br />
画像を縦軸に沿って回転させたかったんですが、いまいち要領を得ない説明が多くてかなり苦戦を強いられたので私なりのやり方を書いておきます。<br />
<br /><br /><a href="http://talewin.kagome-kagome.com/%E5%82%99%E5%BF%98%E9%8C%B2/nive%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>TALE</name>
        </author>
  </entry>
</feed>