<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.yz-learning.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Yz-Learning Base Wiki - game-engineer:classes:2023:game-programing-1:first-term:6</title>
        <description></description>
        <link>https://www.yz-learning.com/</link>
        <lastBuildDate>Sat, 04 Apr 2026 04:38:27 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.yz-learning.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>Yz-Learning Base Wiki</title>
            <link>https://www.yz-learning.com/</link>
        </image>
        <item>
            <title>棒グラフ（ほぼ完成？）</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-01-13&amp;rev=1685926927</link>
            <description># include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10

void Main()
{
	// 背景の色を設定する | Set the background color
	Scene::SetBackground(ColorF{ 0.6, 0.8, 0.7 });

	// 絵文字からテクスチャを作成する | Create a texture from an emoji
	const Texture emoji{ U&quot;🦖&quot;_emoji };
	// 太文字のフォントを作成する | Create a bold font with MSDF method
	const Font font{ FontMethod::MSDF, 48, Typeface::Bold };
	// テキストに含まれる絵文字のためのフォントを作成し、font に追加する | Create a font for emojis in text and add it to font as a fallback
	const Font emojiFont{ 48, Typeface::Colo…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 05 Jun 2023 01:02:07 +0000</pubDate>
        </item>
        <item>
            <title>前判定ループと後判定ループ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-05-1345&amp;rev=1686029385</link>
            <description>①
\\192.168.43.253\ゲームエンジニア科\GE1A\ゲームプログラミング\Siv3D0610関連
にアクセス

②
SDKの中の
OpenSiv3D_SDK_0.6.10
フォルダを
D:¥自分のフォルダ\の下の\GPフォルダ等
にコピー

③
\\192.168.43.253\ゲームエンジニア科\GE1A\ゲームプログラミング\Siv3D0610関連\テンプレート
の中身を、
ドキュメント\Visual Studio 2022\Templates\ProjectTemplates
にコピー

④
「システム環境変数の設定」を開き
環境変数
　SIV3D_0_6_10
場所
　D:¥自分のフォルダ\の下の\GPフォルダ等\OpenSiv3D_SDK_0.6.10
に設定…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 06 Jun 2023 05:29:45 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-06-4&amp;rev=1686031792</link>
            <description>今日やったすごろくゲームの全ソースコード



#include &lt;iostream&gt;

using namespace std;

const int GOAL_DIST = 20;//distance from GOAL
//指定したコマ数目のマスに人&quot;O&quot;を表示する

void DispSugorkuBoad(int place)
{
	cout &lt;&lt; &quot;S&quot;;
	for (int i = 1; i &lt;= GOAL_DIST; i++)
	{
		if (i == place)
			cout &lt;&lt; &quot;O&quot;;
		else
			cout &lt;&lt; &quot;_&quot;;
	}
	cout &lt;&lt; &quot;G&quot;;
}

int saikoro() //(void)は省略して()
{
	
	int me = rand() % 6 + 1;//rand()は0～RAND_MAXの乱数が出るよ
	//乱数生成

	return(me);
}
//Siv3Dにすごろくゲームを移植しよう！
int main()
{
	//random seed 乱数の種（乱数表の決定）
	srand((unsigned int)t…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 06 Jun 2023 06:09:52 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-08-3&amp;rev=1686198150</link>
            <description># include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10

void Main()
{
	// 背景の色を設定する | Set the background color
	Scene::SetBackground(ColorF{ 0.6, 0.8, 0.7 });

	// 絵文字からテクスチャを作成する | Create a texture from an emoji
	//const Texture emoji{ U&quot;🎲&quot;_emoji };

	Font font{ 40 };

	Texture dice[6] = { Texture{U&quot;d1.png&quot;}
	                   ,Texture{U&quot;d2.png&quot;}
	                   ,Texture{U&quot;d3.png&quot;}
	                   ,Texture{U&quot;d4.png&quot;}
	                   ,Texture{U&quot;d5.png&quot;}
	                   ,Texture{U&quot;d6.png&quot;} }…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 08 Jun 2023 04:22:30 +0000</pubDate>
        </item>
        <item>
            <title>状態遷移の元の処理をピックアップ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-12-1&amp;rev=1686556523</link>
            <description>状態遷移の元の処理をピックアップ


frameCount
0~5
 何もしない
5~8
 歩く
9-12
  飛ぶ
13-16
  何もしない
17-20
  しゃがむ
20-
　ひたすら歩く

game_state = TITLEですたーと
①TITLE
  画面がクリックされるまで
　〇タイトルロゴを表示
　クリックされたら、
　〇game_state = PLAY
②PLAY
  すごろくの処理を書く
　自コマはゴールにいるか？
　　YES:
　　　〇game_state=GAMEOVER
　　NO:
      〇ゴールにたどり着くまで以下を繰り返し
　　　　　サイコロを振る
　　　　　コマをサイコロ分動かす　
③GAMEOVER
　画面がクリックされるまで
　　〇おめでとうのメッセージを表示
　　クリックされたら
　　〇game_state=TITLE…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 12 Jun 2023 07:55:23 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-12-4&amp;rev=1686549107</link>
            <description>#include &lt;iostream&gt;
//列挙型（数え上げ　enumurate)
enum human_state
{
	IDLE,  //何もしてない
	WALK,  //歩いている
	JUMP,  //㌧㌦
	CROUCH, //しゃがみ
};

void PrintMyState(human_state mystate)
{
	switch(mystate)
	{
		case human_state::IDLE:
			std::cout &lt;&lt; &quot;なーんもしてない&quot; &lt;&lt; std::endl;
			break;
		case human_state::WALK:
			std::cout &lt;&lt; &quot;歩いています&quot; &lt;&lt; std::endl;
			break;
		case human_state::JUMP:
			std::cout &lt;&lt; &quot;空中です&quot; &lt;&lt; std::endl;
			break;
		case human_state::CROUCH:
			std::cout &lt;&lt; &quot;体育座り中&quot; &lt;&lt; std::endl;
			break;
		default:
…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 12 Jun 2023 05:51:47 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-13-4&amp;rev=1686636662</link>
            <description># include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10

//Mainの上で宣言すると、そのソースコード上の（宣言から下の）どこからでもアクセス可能！
enum GAMESTATE
{
	TITLE,
	PLAY,
	GAMEOVER,
};

void ShowTitleScnene(GAMESTATE&amp; state) {
	//タイトル画面
	FontAsset(U&quot;TFONT&quot;)(U&quot;サイコロんZ&quot;).drawAt(Scene::Center(), Palette::Yellow);
	FontAsset(U&quot;TFONT&quot;)(U&quot;Click Left Mouse Button&quot;)
		.drawAt({ Scene::Center().x, Scene::Center().y + FontAsset(U&quot;TFONT&quot;).height() }, Palette::Black);
}

void ShowPlayScnene(GAMESTATE&amp; state) {
	//プレイ画面
	FontAsset(U&quot;TFONT&quot;)(U&quot;プレイ中💛&quot;).drawA…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2023 06:11:02 +0000</pubDate>
        </item>
        <item>
            <title>Siv3Dで座標を表示したい欲</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-15-1&amp;rev=1686790672</link>
            <description>Siv3Dで座標を表示したい欲

まず座標を用意。

```Vec2```でも```Point```でも,intが２つでも、floatが２つでも、x座標とy座標を表す数を２つ用意。

多分それはスクリーンの座標系（スクリーン座標）なので通常の数学の座標に直ししてあげます。$x$$x$$y$$y$$y$</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 15 Jun 2023 00:57:52 +0000</pubDate>
        </item>
        <item>
            <title>ベクトルの表示をちょっと簡単にしてみた</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-19-1&amp;rev=1687134619</link>
            <description>ベクトルの表示をちょっと簡単にしてみた


# include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10
# include &lt;vector&gt;
#include &lt;string&gt;

Vec2 ConvertScrP2MathP(Vec2 _spoint)
{
	Vec2 resultPoint;
	resultPoint.x = _spoint.x;
	resultPoint.y = Scene::Height() - _spoint.y;
	return resultPoint;
}


void Main()
{
	// 背景の色を設定する | Set the background color
	Scene::SetBackground(ColorF{ 0.6, 0.8, 0.7 });

	Vec2 clickPoint[6] = { {0,0},{0,0},{0,0},{0,0}, {0,0},{0,0} };
	//int state = 0;//何個目をクリックしたか
	int pcount = 0; //今何個目の点？　stateだとわかりづらいか…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Jun 2023 00:30:19 +0000</pubDate>
        </item>
        <item>
            <title>サイコロ動くところまで</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-21-5&amp;rev=1687333259</link>
            <description># include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10

//どこの関数にも属さないところに宣言された変数
//グローバル変数（大域変数）
int count = 0;

//Mainの上で宣言すると、そのソースコード上の（宣言から下の）どこからでもアクセス可能！
enum GAMESTATE
{
	TITLE,
	PLAY,
	GAMEOVER,
};

void ShowTitleScnene(GAMESTATE&amp; state) {
	//タイトル画面
	FontAsset(U&quot;TFONT&quot;)(U&quot;サイコロんZ&quot;).drawAt(Scene::Center(), Palette::Yellow);
	FontAsset(U&quot;GFONT&quot;)(U&quot;Click Left Mouse Button&quot;)
		.drawAt({ Scene::Center().x, Scene::Center().y + FontAsset(U&quot;GFONT&quot;).height() }, Palette::Black);
}

void ShowPlayScnene(GAMESTAT…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 21 Jun 2023 07:40:59 +0000</pubDate>
        </item>
        <item>
            <title>変数の有効範囲</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-22-1&amp;rev=1687398509</link>
            <description>変数の有効範囲

変数の有効範囲のことをスコープといいます。


	*  ファイルスコープ
		*  ファイルの中だけで有効なスコープ

	*  ブロックスコープ
		*  ｛｝の中で有効なスコープ

	*  関数スコープ</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 22 Jun 2023 01:48:29 +0000</pubDate>
        </item>
        <item>
            <title>Siv3Dで2Dマップ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-22-3&amp;rev=1687406831</link>
            <description>#include &lt;iostream&gt;
using namespace std;
const int ARR_SIZE = 8;

int main() {
	//二次元配列
	float arr[4][2] ={{1.2, 2.4}, {3.6, 4.8}, {5.2, 3.1}, {2.6, 1.1}};
	int zaseki[9][4] = {{0,2,3,4},{1,2,3,4},{2,2,3,4},{3,2,3,4},{4,2,3,4},
                            {5,2,3,4},{6,2,3,4},{7,2,3,4},{8,2,3,4} };
	// for(int i=0; i&lt;ARR_SIZE; i++)
	// {
	// 	cout &lt;&lt; &quot;arr[&quot; &lt;&lt; i &lt;&lt; &quot;] = &quot; &lt;&lt; arr[i] &lt;&lt; endl;
	// } //ループ終了後、死亡確定
	for(int j=0;j&lt;9;j++)
	{
		for(int i=0;i&lt;4;i++)
		{
			cout &lt;&lt; zaseki[j][i] &lt;&lt; &quot; &quot;;	
		…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 22 Jun 2023 04:07:11 +0000</pubDate>
        </item>
        <item>
            <title>swap関数と関数スコープ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-26-14&amp;rev=1687759260</link>
            <description>swap関数と関数スコープ


#include &lt;iostream&gt;
#include &lt;random&gt;

using namespace std;

//ソーティング
//選択ソートを実装することを考える
//アルゴリズムを考えて→アルゴリズムの完成
//アルゴリズム→プログラム＝ソースコードに直す作業　
//      ：実装（implement　いんぷりめんと）　インプリメントする
//昇順　データの中で一番小さいものを探してくる
//未ソート配列の左端と最小値のデータを交換
//   3 1 4 2
//0  1|3 4 2
//1  1 2|4 3
//2  1 2 3|4
//3  1 2 3 4|

int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };

void swap(int &amp;a, int &amp;b) //参照渡し 参照を渡している
{
	int tmp;
	tmp = a;
	a = b;
	b = tmp;
}
int main()
{
	//かき混ぜの魔法
	shuffle(arr, arr+10, default_random_en…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 26 Jun 2023 06:01:00 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-27-4&amp;rev=1687844045</link>
            <description># include &lt;Siv3D.hpp&gt; // OpenSiv3D v0.6.10

//どこの関数にも属さないところに宣言された変数
//グローバル変数（大域変数）
const int LEFT_MARGIN{ 100 };//左１００ピクセルから書き始める
const Vec2 CHR_SIZE{ 32, 32 };
const int TOP_MARGIN{ 300 };//上１００ピクセルから書き始める
const int TITLE_FONT_SIZE{ 60 };
const int GAME_FONT_SIZE{ 30 };

const int GOAL_DIST = 20;//全部で２０マス
bool isPushButton = false;
int  diceNum = 0;//サイコロの目は何？
int  komaPos = 1;//駒の場所　ゴールの条件は komaPos == GOAL_DIST


//Mainの上で宣言すると、そのソースコード上の（宣言から下の）どこからでもアクセス可能！
enum GAMESTATE
{
	TITLE,
	PLAY,
…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 27 Jun 2023 05:34:05 +0000</pubDate>
        </item>
        <item>
            <title>文字列型(string)と文字配列(char [])</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2023:game-programing-1:first-term:6:06-28-5&amp;rev=1687938016</link>
            <description>文字列型(string)と文字配列(char [])

stringはC++のクラスという仕組みを使った便利な文字列を扱うクラスです。

厳密には型ではないので、注意

伝統的なC/C++の世界では、文字配列にアスキーコードをしまい込んで、配列の最後に終端文字``` &#039;\0&#039; ```をつけることで、文字列型の代わりに使います。</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 28 Jun 2023 07:40:16 +0000</pubDate>
        </item>
    </channel>
</rss>
