fix
81
my-blog/content/posts/2025-10-28-aicard.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
---
|
||||||
|
title: "ゲームをiosに分離する"
|
||||||
|
slug: "aicard"
|
||||||
|
date: "2025-10-28"
|
||||||
|
tags: ["ue"]
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|
|
||||||
|
unreal engineで開発しているゲームの話です。ios buildでハマった部分がかなり多かったので紹介。
|
||||||
|
|
||||||
|
ゲーム自体は、カードとアクションを分けることにしました。
|
||||||
|
|
||||||
|
カードというのは道具ボックスのようなものです。これに関するゲームをiosでできるようにする、という方向で作り直しています。
|
||||||
|
|
||||||
|
iosのゲーム機能はシンプルです。
|
||||||
|
|
||||||
|
カードを引く、集める、アカウント連携の3つです。
|
||||||
|
|
||||||
|
最初にカードをタップするとランダムでカードを取得します。1日1回を予定しています。
|
||||||
|
|
||||||
|
課金要素では月額と単発があり、月額は3,000円、単発は150円を想定。
|
||||||
|
|
||||||
|
アカウント連携は、ローカルデータをatprotoのアカウントにセーブする機能のみ。
|
||||||
|
|
||||||
|
以上となります。
|
||||||
|
|
||||||
|
後に機能を拡張していく予定です。
|
||||||
|
|
||||||
|
カード自体は本作のキャラクターを強化するものとしても使用することを想定。
|
||||||
|
|
||||||
|
<iframe width="100%" height="415" src="https://www.youtube.com/embed/SdAiRskyrew?rel=0&showinfo=0&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
## buildが失敗する
|
||||||
|
|
||||||
|
これは無料アカウントでは難しいです。apple devに年会費を払いましょう。
|
||||||
|
|
||||||
|
```sh:./Config/DeafaultEngine.ini
|
||||||
|
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
|
||||||
|
BundleDisplayName=Aicard
|
||||||
|
BundleIdentifier=ai.syui.card
|
||||||
|
IOSTeamID=xxx
|
||||||
|
BundleName=ai.syui.card
|
||||||
|
MetalLanguageVersion=9
|
||||||
|
MinimumiOSVersion=IOS_26
|
||||||
|
bAutomaticSigning=True
|
||||||
|
RemoteNotificationsSupported=False
|
||||||
|
bSupportsPortraitOrientation=True
|
||||||
|
bSupportsLandscapeLeftOrientation=False
|
||||||
|
bSupportsLandscapeRightOrientation=False
|
||||||
|
|
||||||
|
[/Script/MacTargetPlatform.XcodeProjectSettings]
|
||||||
|
CodeSigningTeam=xxx
|
||||||
|
bUseModernXcode=true
|
||||||
|
bUseAutomaticCodeSigning=true
|
||||||
|
BundleIdentifier=ai.syui.card
|
||||||
|
```
|
||||||
|
|
||||||
|
## iconが設定できない
|
||||||
|
|
||||||
|
project-rootに`./Build/IOS/Resources/Assets.xcassets`を用意します。これはxcodeから持ってきます。build実行時に作られます。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 画面をモバイルにあわせる
|
||||||
|
|
||||||
|
これが一番時間がかかりました。buildして実機で確認する必要があるからです。
|
||||||
|
|
||||||
|
真ん中だけ全体化したうえで、それを上下メニューバーに合わせます。
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## widgetのリスト化
|
||||||
|
|
||||||
|
これも相当面倒でした。`json`からリストを取得して、それを表示します。
|
||||||
|
|
||||||
|
クラス設定で`UserObjectListEntry`を追加し、それを使用します。
|
||||||
|
|
||||||
|
<iframe src="https://blueprintue.com/render/wz8aaem4" scrolling="no" allowfullscreen style="width:100%;height:400px"></iframe>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 766 KiB After Width: | Height: | Size: 766 KiB |
|
Before Width: | Height: | Size: 888 KiB After Width: | Height: | Size: 888 KiB |
BIN
my-blog/static/img/ue_ios_aicard_0001.png
Normal file
|
After Width: | Height: | Size: 1008 KiB |
BIN
my-blog/static/img/ue_ios_aicard_0002.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
my-blog/static/img/ue_ios_aicard_0003.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
my-blog/static/img/ue_ios_aicard_0004.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
my-blog/static/img/ue_ios_aicard_0005.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 347 KiB After Width: | Height: | Size: 347 KiB |