<?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:2024:game-creation-1</title>
        <description></description>
        <link>https://www.yz-learning.com/</link>
        <lastBuildDate>Sat, 04 Apr 2026 03:13:15 +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:2024:game-creation-1:amoung-shooting-game&amp;rev=1728449606</link>
            <description>シューティングゲームにまつわるいろんな話題

	*  ゼビウス
		*  ナムコ　ゼビウス
		*  すべての始まりのようなシューティング

	*  スターフォース
		*  テーカン（テクモ）　スターフォース 
		*  合体キャラとパワーアップのシステムが新しかった</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 09 Oct 2024 04:53:26 +0000</pubDate>
        </item>
        <item>
            <title>昨日の復習をしていくよ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:gameprograming-1-2&amp;rev=1733885622</link>
            <description>昨日の復習をしていくよ

第１話　C言語の時代


#include &lt;iostream&gt;
#include &lt;cstdio&gt;

using std::cin;

//キャラクターの初期位置（０，０） HP100
//一歩歩くと１HPが減るかわいそうなキャラ
int cx=0, cy=0;
int hp = 100;


//0:左 1:上 2:右 3：下
void Walk(int Dir)
{
	switch (Dir)
	{
	case 0:
		cx = cx - 1;
		break;
	case 1:
		cy = cy - 1;
		break;
	case 2:
		cx = cx + 1;
		break;
	case 3:
		cy = cy + 1;
		break;
	default:
		break;
	}
	hp--;
}

void PrintStatus()
{
	printf(&quot;+-----------------+\n&quot;);
	printf(&quot;| NAME: yusha     |\n&quot;);
	printf(&quot;|   HP:%3d        |\…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 11 Dec 2024 02:53:42 +0000</pubDate>
        </item>
        <item>
            <title>ポインタとメモリの基礎</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:gameprograming-1&amp;rev=1733795387</link>
            <description>ポインタとメモリの基礎

メモリを動的に取得＝好きな時に好きなぐらいメモリを確保できるよ

今までは、


//型　配列変数名[配列数];
//配列数は定数限定
int arr[10];
int arr2[5] = {1, 2, 3, 4, 5};
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 10 Dec 2024 01:49:47 +0000</pubDate>
        </item>
        <item>
            <title>練習問題</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:gameprograming-prc&amp;rev=1739169368</link>
            <description>練習問題


#include &lt;iostream&gt;

class vehicle
{
	float nenpi;//燃費
	float fuel;//燃料
public:
	vehicle() {/*省略*/ };
	~vehicle() {/*省略*/ };
	virtual void Run() {/*省略*/ }; //走る
	virtual void Stop() {/*省略*/ }; //止まる
	virtual void Turn() {/*省略*/ }; //曲がる
};

class DumpTruck
	: public vehicle
{
	float loadWeight;//積載量
public:
	DumpTruck() {/*省略*/ };
	~DumpTruck() {/*省略*/ };
	void Run() {/*省略*/ };
	void Stop() {/*省略*/ };
	void Turn() {/*省略*/ };
	void Dump() {/*省略*/ };//ダンプカーで土を捨てる
};

class Bulldozer
	: publ…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 10 Feb 2025 06:36:08 +0000</pubDate>
        </item>
        <item>
            <title>ヘビゲーム</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:hairetsu-02&amp;rev=1732676067</link>
            <description>ヘビゲーム

ヘビゲーム作るための下準備（配列編）

今日のメニュー


	*  ポインタと変数の関係
		*  変数のアドレスを代入　⇒　＆
		*  アドレスがある場所の中身を覗く　⇒　＊
		*  ポインタを使って変数に別名を付けてアクセス</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 27 Nov 2024 02:54:27 +0000</pubDate>
        </item>
        <item>
            <title>ヘビ🐍ゲーム作る!😡</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:hairetsu-03&amp;rev=1732761905</link>
            <description>ヘビ🐍ゲーム作る!😡

配列を循環♻️させる

今日やったこと！


	*  🐍普通の配列と可変長配列vectorの違い
	*  🐍vectorの宣言と初期化（ある程度の数を確保して、全部同じ値で初期化する）</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 28 Nov 2024 02:45:05 +0000</pubDate>
        </item>
        <item>
            <title>基本のゲームループ＋class</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:hairetsu-04&amp;rev=1733114877</link>
            <description>基本のゲームループ＋class


#include &quot;DxLib.h&quot;
#include &quot;Input.h&quot;


namespace
{
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	int crrTime;
	int prevTime;
}

class Game
{
	enum GAMESTATE//ゲームシーケンス（タイトル、プレイ画面、ゲームオーバー）
	{
		TITLE, PLAY, GAMEOVER, MAXSTATE
	};//各状態で、スペースキーを押したら次の状態に移動する
public:
	Game();//コンストラクタ　初期化用関数
	~Game();//デストラクタ   削除用関数
	GAMESTATE stat;
	void Init();
	void Update();
	//各状態のアップデート関数
	void UpdateTitle();
	void UpdatePlay();
	void UpdateGameOver();
	void Draw();
	//各状態の描画関数
…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 02 Dec 2024 04:47:57 +0000</pubDate>
        </item>
        <item>
            <title>文字列のテーブルを読んで画像で表示するよ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:moji-table&amp;rev=1729737777</link>
            <description>文字列のテーブルを読んで画像で表示するよ

第１回気合でやってみる！


#include &quot;DxLib.h&quot;
#include &lt;string.h&gt; //C言語の文字列関数を使うために必要

namespace
{
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	char str[] = &quot;I Scream IceCream!&quot;;//目標はこの文字列を文字表の画像から切り抜いて表示すること（スプライトフォント）
	char samp[] = &quot;CAB&quot;;//練習用短い文字列
	const int CHAR_W = 20;//画像の１文字の幅
	const int CHAR_H = 20;//画像の１文字の高さ
}


void DxInit()
{
	ChangeWindowMode(true);
	SetWindowSizeChangeEnableFlag(false, false);
	SetMainWindowText(&quot;文字列を画像で表示するぞ&quot;);
	SetGraphMode(WIN_WIDTH, WIN…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Oct 2024 02:42:57 +0000</pubDate>
        </item>
        <item>
            <title>ついにLUTを使う！</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:moji-table2&amp;rev=1730255381</link>
            <description>ついにLUTを使う！

LUT＝Look Up Table(参照表です)



#include &quot;DxLib.h&quot;
#include &lt;string.h&gt;

namespace
{
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	char str[] = &quot;I Scream IceCream!&quot;;
	char samp[] = &quot;CAB&quot;;
	const int CHAR_W = 20;
	const int CHAR_H = 20;
	const int MARGIN = 8;
	const int MAX_MOJI = 8*7;//8列7行の表
	struct Point
	{
		int x;
		int y;
	};

	Point LUT[MAX_MOJI];
}


void DxInit()
{
	ChangeWindowMode(true);
	SetWindowSizeChangeEnableFlag(false, false);
	SetMainWindowText(&quot;文字列を画像で表示するぞ&quot;…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 30 Oct 2024 02:29:41 +0000</pubDate>
        </item>
        <item>
            <title>C++とC言語で文字と数値をへんかんするよ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:moji-to-suji-to-moji&amp;rev=1729051234</link>
            <description>C++とC言語で文字と数値をへんかんするよ

ソースコード貼る！



#include &lt;cstdio&gt; //C言語のstdio.hのC++にした版をよみこむ
#include &lt;iostream&gt;
#include &lt;string&gt;

#pragma warning(disable : 4996) 

int main()
{
	int score = 5260;
	char strScore[10];//文字の配列

	sprintf(strScore, &quot;%08d&quot;, score);

	for(int i=0;i&lt;8;i++)
		printf(&quot;%d\n&quot;, strScore[i]-&#039;0&#039;);
	//(0*128, 0)
	//(1*128, 0)
	//(2*128, 0)
	//  ・・・
	//(9*128, 0)

	//int score = 5260;
	std::string scoreString = std::to_string(score);
	scoreString.insert(0, 8 - scoreString.length(), &#039;0&#039;);

…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 16 Oct 2024 04:00:34 +0000</pubDate>
        </item>
        <item>
            <title>画像で数値を数字で表示</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:number-display&amp;rev=1729484337</link>
            <description>画像で数値を数字で表示


//省略

namespace {
	const std::wstring TITLE = L&quot;Sample Game&quot;;
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	const int SCORE = 5260;
	const int SCOREX = 200;
	const int SCOREY = 10;
	const int STRW = 80;//1文字の実際の幅
	const int NUMW = 96; //切り出す文字サイズｘ
	const int NUMH = 125;//切り出す文字サイズｙ
}

struct Point
{
	int x, y;
};
struct Rect
{
	Point p;
	int w, h;
};


void InitDxLib()
{
	ChangeWindowMode(true);
	SetWindowSizeChangeEnableFlag(false, false);
	SetMainWindowText(TITLE.c_s…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 21 Oct 2024 04:18:57 +0000</pubDate>
        </item>
        <item>
            <title>ジャンプをするキャラと、ステージを構成してゆくよ</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:oreno-jump-1&amp;rev=1730341869</link>
            <description>ジャンプをするキャラと、ステージを構成してゆくよ

	*  背景画像を用意
	*  画像を背景に貼る
	*  キャラ（Box）を準備
	*  キャラを描画
	*  とりあえず一定スピードで動かしてみる（等速直線運動）</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 31 Oct 2024 02:31:09 +0000</pubDate>
        </item>
        <item>
            <title>俺のジャンプ選手権　準備編　Part２</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:oreno-jump-2&amp;rev=1730861648</link>
            <description>俺のジャンプ選手権　準備編　Part２

キーボード状態の取得

キーボードの状態をとる関数を作るよ（コピペ、またはファイルコピー）

細かいことは、ここが詳しいです



namespace Input {
	//キーボード取得関連
	void KeyStateUpdate();
	bool IsKeyUP(int keyCode);
	bool IsKeyDown(int keyCode);
	int IsKeepKeyDown(int keyCode);
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 06 Nov 2024 02:54:08 +0000</pubDate>
        </item>
        <item>
            <title>加速度運動でぬるっとした動き出しを表現する</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:oreno-jump-3&amp;rev=1731464890</link>
            <description>加速度運動でぬるっとした動き出しを表現する

やってることは簡単で、フレーム間の時間を計算して、時間分のスピードを上げてあげる処理です。


$ v = v_0 + at $

をそのまま表現します。

$at$はフレーム間時間$t$$a$</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 13 Nov 2024 02:28:10 +0000</pubDate>
        </item>
        <item>
            <title>加速しながら移動して、減速しながら止まる⇒んで飛ぶ！</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:oreno-jump-4&amp;rev=1731550971</link>
            <description>加速しながら移動して、減速しながら止まる⇒んで飛ぶ！

とりあえず、減速して止まって、SPACEキーを押すと上昇するところまで。



#include &quot;DxLib.h&quot;
#include &quot;Input.h&quot;

//位置を表す構造体
struct Vec2D
{
	float x;
	float y;
};

enum CHR_STATE
{
	IDLE, //アイドリング
	WALK, //歩き
	MAX_CHR_STATE //最大値
};


namespace
{
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	int hGroundImage = -1;
	float groundH = 600;
	int BoxW = 64;
	int BoxH = 128;
	Vec2D BoxPos = { 100, groundH - BoxH };
	float speed = 0;
	float accel = 300;
	float friction = 600;
	const float MAX_SPEE…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 14 Nov 2024 02:22:51 +0000</pubDate>
        </item>
        <item>
            <title>上がって下がるダサいジャンプを作ってみる</title>
            <link>https://www.yz-learning.com/doku.php?id=game-engineer:classes:2024:game-creation-1:oreno-jump-5&amp;rev=1731655719</link>
            <description>上がって下がるダサいジャンプを作ってみる

一定速度で上昇して、ある高さまで行ったら落ちてくる処理

（ジャンプって呼べるのかなぁ）



#include &quot;DxLib.h&quot;
#include &quot;Input.h&quot;

//位置を表す構造体
struct Vec2D
{
	float x;
	float y;
};

enum CHR_STATE
{
	IDLE, //アイドリング
	WALK, //歩き
	MAX_CHR_STATE //最大値
};


namespace
{
	const int WIN_WIDTH = 1024;
	const int WIN_HEIGHT = 768;
	int hGroundImage = -1;
	float groundH = 600;
	int BoxW = 64;
	int BoxH = 128;
	Vec2D BoxPos = { 100, groundH - BoxH };
	float speed = 0;
	float accel = 300;
	float friction = 600;
	const float MAX_SP…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 15 Nov 2024 07:28:39 +0000</pubDate>
        </item>
    </channel>
</rss>
