main() blog

プログラムやゲーム、旅、愛する家族について綴っていきます。

【おでかけ】タンジョウファーム 秋の収穫祭に行ってきました!

こんにちは。

タケゾーです。

 

 千葉市花見川区にあるタンジョウファームで行われた「秋の収穫祭」というイベントに行ってきました。

 

f:id:takezoh_1127:20171127090659j:image

 

妻が好きな手作り雑貨の作家さんや花屋さんが出店するとのことでこのイベントを知りました。

 

タンジョウファームは農場や酪農で季節な野菜など、自家栽培した食材を使用した料理を提供するレストランもあるようです。

 

www.tanjofarm.net

 

敷地内の一軒家を改装したレストランとなっており、半分は和室がそのまま残っており、今回は休憩場所として解放されていました。

 

 そのレストランの庭がイベントの広場となっていて手作り雑貨や花屋、カフェやパン屋、野菜市場などお店が出ていました。

 

出店の一覧です。

 

f:id:takezoh_1127:20171127090758j:image 

  • 麦香(パン)
  • カナパン(パン)
  • カシ○イシ(焼き菓子)
  • モバイルカフェ福笑屋(自家焙煎コーヒー)
  • いちにのさん(洋服・おめかし用品)+こさえる
  • 和の花 日々花(花とこもの)
  • petit*garden

 

11時過ぎにはもうたくさんの人。

 

f:id:takezoh_1127:20171127092733j:image

 

f:id:takezoh_1127:20171127122005j:image

 

f:id:takezoh_1127:20171127122026j:image

 

f:id:takezoh_1127:20171127122057j:image

 

妻はお目当ての雑貨屋さんと花屋さんを見ているので、パパは子供たちとクラムチャウダーとマフィンを買って和室でお食事。

 

その後は野菜の詰め放題でサツマイモ、玉ねぎなどを大量に袋に詰めていました。

 

f:id:takezoh_1127:20171127091108j:image

 

最後に美味しいコーヒーを頂きました。

 

f:id:takezoh_1127:20171127122126j:image 

 

この日は少し風が強く、屋外のイベントとしてはちょっと大変でした。

今回はレストランで食事はしませんでしたが、また別の機会があったら食べてみたいと思います。

 

 

 

【UE4】UCharacterMovementComponentのAPIリファレンスを翻訳してみる

はじめに

バージョンは4.17.0。

UCharacterMovementComponentはUE4でキャラクタを動かすために使用されるコンポーネント

このコンポーネントを使って最後まで開発しているのだろうか?
それとも独自で作るのだろうか?
ここに関しては方々から色々な声が聞こえてくる。

このコンポーネントだけでできる範囲のものであれば当然これを使っていけば良い。
そうじゃない場合は機能拡張を行うか、新規に自前で作る必要が出てくる。

で、結局どっちが良いのか?
迷うところではある。

とは言っても最初に何かしたら動かす場合にはお世話になるし、
拡張や、使わないしてもまずはできることできないことをちゃんと把握しておく必要がある。

しゃがむとか泳ぐとかあるけど、スプリント(ボタン押しで速く走る)のようなことをしたい場合は独自の対応が必要なる。

  • はじめに
  • UE4のドキュメントを見てみる
  • API Reference
  • Componentのプロパティ
  • 関数
  • 参考
続きを読む

【UE4】GameMode、GameState、PlayerState、PlayerControllerの関連を確認してみる

GameModeとGameStateとPlayerStateの関連について再度確認してみる。

毎回、
「GameModeはサーバーだけにしかなくて、GameStateは各端末毎に生成されるんだっけ?」
「PlayerStateは?PlayerControllerは?」
とその都度確認しているので再度確認してみる。

各クラスの概要

UE4のオフィシャルドキュメント。

簡単にまとめると以下の通り。

GameMode

  • サーバーにしか存在しない

GameState

  • 各マシン毎に存在
  • PlayerArrayという変数でプレイヤ分のPlayerStateを保持
  • Ownerは持たない(GetOwner()はnullptr)

PlayerState

  • 全てのマシン上で、全てのプレイヤーに対してPlayerStateが存在
  • OwnerはPlayerController(GetOwner()でPlayerControllerを返す)

PlayerController

  • 操作しているPawnを所持(GetControlledPawn()で操作しているPawnが取得できる)
  • Ownerは持たない(GetOwner()はnullptr)

Playerが操作しているPawn

  • SpawnされてPossessされるとPlayerControllerに所有される

シングルプレイ、マルチプレイでの構成について確認してみる。

シングルプレイの場合

GameMode GameStateの関連図.png

マルチプレイの場合

Server

GameMode GameStateの関連図(Server).png

Client1

GameMode GameStateの関連図(Client1).png

Client2

GameMode GameStateの関連図(Client2).png

確認

パーシスタントレベルにBPを組んでログで確認。
※BPのスクリーンショットは割愛

シングルプレイ

LogBlueprintUserMessages: [Test_Map_C_1] found GameMode  : MyGameMode
LogBlueprintUserMessages: [Test_Map_C_1]   found GameState : MyGameState
LogBlueprintUserMessages: [Test_Map_C_1]     GameState : not found Owner
LogBlueprintUserMessages: [Test_Map_C_1]     found PlayerState : MyPlayerState
LogBlueprintUserMessages: [Test_Map_C_1]       found Owner : MyPlayerController
LogBlueprintUserMessages: [Test_Map_C_1]         PlayerController : not found Owner
LogBlueprintUserMessages: [Test_Map_C_1]           found GetControlledPawn : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_1]           locally controlled
LogBlueprintUserMessages: [Test_Map_C_1] all actors > PlayerPawn : 1
LogBlueprintUserMessages: [Test_Map_C_1]   Player : MyPlayer
LogBlueprintUserMessages: [Test_Map_C_1] all actors > PlayerController : 1
LogBlueprintUserMessages: [Test_Map_C_1]   player controller : MyPlayerController

マルチプレイ

Server

GameModeもGameStateもClinet含めたPlayerStateもPlayerController、PlayerPawnも全て生成されていることが確認できる。
PlayerPawnは必ずしも順番通りにはならいことに注意。

LogBlueprintUserMessages: [Test_Map_C_2] Server: found GameMode  : MyGameMode
LogBlueprintUserMessages: [Test_Map_C_2] Server:   found GameState : MyGameState
LogBlueprintUserMessages: [Test_Map_C_2] Server:     GameState : not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Server:     found PlayerState  MyPlayerState
LogBlueprintUserMessages: [Test_Map_C_2] Server:       found Owner : MyPlayerController
LogBlueprintUserMessages: [Test_Map_C_2] Server:         found GetControlledPawn : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Server:         locally controlled
LogBlueprintUserMessages: [Test_Map_C_2] Server:     found PlayerState : MyPlayerState1
LogBlueprintUserMessages: [Test_Map_C_2] Server:       found Owner : MyPlayerController1
LogBlueprintUserMessages: [Test_Map_C_2] Server:         found GetControlledPawn : MyPlayrPawn1
LogBlueprintUserMessages: [Test_Map_C_2] Server:         not locally controlled
LogBlueprintUserMessages: [Test_Map_C_2] Server:     found PlayerState : MyPlayerState2
LogBlueprintUserMessages: [Test_Map_C_2] Server:       found Owner : MyPlayerController2
LogBlueprintUserMessages: [Test_Map_C_2] Server:         found GetControlledPawn : MyPlayerPawn2
LogBlueprintUserMessages: [Test_Map_C_2] Server:         not locally controlled
LogBlueprintUserMessages: [Test_Map_C_2] Server: all actors > PlayerPawn : 3
LogBlueprintUserMessages: [Test_Map_C_2] Server:   Player : MyPlayerPawn2
LogBlueprintUserMessages: [Test_Map_C_2] Server:   Player : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Server:   Player : MyPlayerPawn1
LogBlueprintUserMessages: [Test_Map_C_2] Server: all actors > PlayerController : 3
LogBlueprintUserMessages: [Test_Map_C_2] Server:   player controller : MyPlayerController
LogBlueprintUserMessages: [Test_Map_C_2] Server:   player controller : MyPlayerController1
LogBlueprintUserMessages: [Test_Map_C_2] Server:   player controller : MyPlayerController2
Client1

クライアントの場合はGameModeは生成されていない。
GameStateは生成されてPlayerArrayを回すとPlayerState自体はプレイヤー人数分取得できる。
PlayerControllerは自分のみ生成されている。
PlayerPawnはプレイヤー分生成されない。
実際に2人分のみが生成されていることが分かる。
他の端末との距離や表示範囲などで同期が必要ない場合はSpawnされない。
一定範囲や描画されるなどで同期が必要になったタイミングで初めてSpawnされる。
必ず同期取りたい場合はPawnのプロパティにAlwaysRelevantを有効にすることで必ず同期を取るようになるので最初にSpawnされるようになる。

LogBlueprintUserMessages: [Test_Map_C_2] Client 1: not found GameMode
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:   found GameState : MyGameState
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:     GameState : not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:     found PlayerState : MyPlayerState
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:       not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:     found PlayerState : MyPlayerState1
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:       found Owner : MyPlayerController
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:         found GetControlledPawn : PlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:         locally controlled
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:     found MyPlayerState : MyPlayerState2
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:       not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 1: all actors > Player : 2
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:   Player : PlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:   Player : PlayerPawn2
LogBlueprintUserMessages: [Test_Map_C_2] Client 1: all actors > PlayerController : 1
LogBlueprintUserMessages: [Test_Map_C_2] Client 1:   player controller : MyPlayerController

AlwaysRelevantを有効にした場合は全員Spawnされている。

    :
    :
LogBlueprintUserMessages: [Test_Map_C_2] Client 2: all actors > PlayerPawn : 3
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   Player : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   Player : MyPlayerPawn1
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   Player : MyPlayerPawn2
Client2

Clinet2も同様。

LogBlueprintUserMessages: [Test_Map_C_2] Client 2: not found GameMode
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   found GameState : MyGameState
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:     GameState : not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:     found PlayerState : MyPlayerState
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:       not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:     found PlayerState : MyPlayerState1
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:       not found Owner
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:     found PlayerState : MyPlayerState2
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:       found Owner : MyPlayerController
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:         found GetControlledPawn : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:         locally controlled
LogBlueprintUserMessages: [Test_Map_C_2] Client 2: all actors > PlayerPawn : 2
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   Player : MyPlayerPawn
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   Player : MyPlayerPawn1
LogBlueprintUserMessages: [Test_Map_C_2] Client 2: all actors > PlayerController : 1
LogBlueprintUserMessages: [Test_Map_C_2] Client 2:   player controller : MyPlayerController

参考

imoue.hatenablog.com


デザイン思考とは? 革新的なアイデアを生み出す思考法

タケゾーです。

先日、『デザイン思考』について学ぶ機会があったのでその時の資料をまとめました。

 

はじめに 

近い将来、現在の仕事の半分は人工知能(AI)やロボットが担うことになると言われている。

ではAIやロボットが担えない仕事は何か?

それは今までになかったモノやコトを創り出す力、発想力を必要とされる仕事に他ならない。

今までにない革新的なアイデア・プロダクトを造り、社会に対して発想力、実践力の力が必要になってくる。

そこで求められるのが『デザイン思考』という考え方。

 

AppleGoogleといった大企業において、新製品・新サービスを開発するときにデザイン思考を用いて行っているケースがある。

 

 

  • はじめに 
  • デザイン思考とは?
    • デザイン思考って何?
    • デザイン思考のプロセス
      • ①理解と共感
      • ②問題の定義
      • ③アイデア発想
      • ④プロトタイプ&テスト
    • デザイン思考の実例
  • 理解と共感
    • シーンを見つける
    • ユーザーを理解する
    • シーンを観察する
      • 着目したシーンについて観察してみる
    • 観察結果を分析する
    • ユーザーにインタビューする
    • ユーザーの行動と気持ちを整理する
  • 問題の定義
  • イデア発想
    • 発想法からアイデアを考える
    • 四則演算によるアイデア発想
    • イデアを絞る
    • イデアをまとめる
    • プロトタイプを造る
    • ストーリーを造る
    • ユーザーテスト
    • プレゼンテーション
  • イデアを壊す
    • 考えたアイデアを破壊する
    • 何度も繰り返してみる
  • 最後に

 

続きを読む

今日は課外活動でお弁当の日。なぜか「BLT」にハマっている...

今週のお題「お弁当」


タケゾーです。


今日は上のお姉ちゃんの課外活動で工場見学や科学館に行く日なのでみんなで早起きしてお弁当作りです。

なぜか「BLT」にハマっているらしく、お弁当の日は必ず「BLTにして!」と言われます。

 

いつも通り、ケチャップとマヨネーズを混ぜてソースを作り、ベーコンを焼いて、レタス、トマトを切って準備完了。

BLT作りはパパと娘の二人で行います。

家族全員分のBLTを作ったら弁当箱に詰めていきます。

 

娘のお弁当

f:id:takezoh_1127:20171006194707j:image 

 

パパも弁当を詰めて会社に持っていきます。

 

パパのお弁当

f:id:takezoh_1127:20171006194727j:image 

 

 

お昼に同じ弁当食べているとなんだかうれしくなります。

 

BLTの弁当はいつまで食べられるのかなぁ...

 

 

 

www.main-function.com

 

【CEATEC JAPAN 2017】リアルな近未来のプロダクトが刺激的!

タケゾーです。

 

千葉県幕張メッセで開催されている最先端IT、エレクトロニクスの総合展「CEATEC JAPAN 2017」に行ってきました。

 

www.ceatec.com

 

アジアで最大級の最先端IT、エレクトロニクスの総合展示会です。 

東京ゲームショウの様な派手さはないですが、普段はお目にかかれないような最先端の技術などを見ることができ、空想ではなく実際に動いて、見て、触ることができるプロダクトの展示はとてもリアルな近未来を感じさせてくれます。

 

今年のテーマは「つながる社会、共創する未来」ということでAI、IoT、ロボット、VR、ARを活用して社会を、未来を変えていくプロダクトの出展がメインとなっていました。

 

AIを活用した画像解析によりリアルタイムに特定の人物を発見、追跡する技術や、声からこころの不調を早期に発見、物流改善や業務改善などといった内容が目立っていました。

 

そんな中でも「なんじゃ!こりゃ!?」「お!?これは?」と思えるようなプロダクトがあったので紹介したいと思います。

 

続きを読む

【東京ゲームショウ2017】実はインディーズも熱い!『センス・オブ・ワンダーナイト』で刺激的なゲームに出会える!

タケゾーです。

 

国内最大級のゲームショウ東京ゲームショウ2017を見学して来ました!

 

expo.nikkeibp.co.jp

 

9/21(木)から9/24(日)の4日間開催され、最初の2日間はビジネスデーとして主に関係者が見学することができ、土日の2日間は一般デーとして通常のお客さんが見学することができます。 

4日間のイベントで25万人が来場したとのことです。 

 

2、3年位前はスマホ、ソシャゲー勢が大半を占めておりましたが、今年はほとんど出展が無く、また去年VR元年として盛り上がっていたVR関連も展示はありましたが去年の程の盛り上がりではありませんでした。

 

その代わりに今年は期待されるタイトルが続々と出展されているのと、e-sports関連が目立っていました。

 

ゲーム業界もまだまだ熱い!ということですな。

もっともっと盛り上がって行ってもらいたいものです。

 

メジャータイトルは勿論、インディーズ、特にビジネスデー2日目に行われる『センス・オブ・ワンダーナイト』が面白いので紹介していきます。 

 

※なお、コンパニオンのお姉ちゃんやコスプレなどの写真はないので少しでも期待している人はゴメンナサイ...

 

続きを読む