# Monorepo 與 Nx 實踐應用遊戲開發流程、實際落地的分享
:crown: Speaker: <font color="#00a15c">**Hogan @Titansoft**</font>
{%hackmd 3_LMFJLvQV-rMOZRjKILnQ %}
:raised_hands: Slido: https://app.sli.do/event/wszrmLktegbuZrgwzDES2f
###### ✦✦✦✦✦ Here we go ! ✦✦✦✦✦
# Outline
1. Introduction to Monorepo and Nx
2. Practial Part : Game products developed by multi team
3. Problems and Solution
# Mororepo
1. Repository management strategy
2. Store all the code in single repo
3. Facilitating code sharing and co-work
# Why we use monorepo
做遊戲, 高度同質性.
"看起來"不同, 但同質的.
# monorepo introduction
一個repo裡, 有很多application
# Nx intro
在monorepo 概念下的工具
Support
1. Frand-end : Vue/react/ angular
2. Backend : Express / Nest/Next
3. Cypress
# why NX ?
支援度高.
我們要做中大型的專案.
# NX file structure
# Nx Plugins Registry
# Nx Console
在VS code 可以直接安裝extension
方便設定
# Game flow
瀑布式開發
interaction designer - 切版/動畫.
# Game Teams
Desinger team
Product Developer team
Nx : focus 在前端
1個team 變到 4個team -> 強化libs 的共用性.
# Demo , Game type
Type 1 : 踩地雷
Type 2 : 小鋼珠, Pinko
Type 3 : Crash game
看起來不同, 但後面logic是相似/一樣的.
# Resource sharing
音效 - 這個lib就要含蓋所有情境, 漸進式的增強.
e.g. 使用howler 解決ios 問題, 其他app ios也一塊解決了.
# Why implement UI testing
cypress
合作伙伴載入我們的遊戲, 但他們demo時所用的尺寸不符合我們預期.
使用GA 拿到所有user 的裝置尺寸.
跑cypress 然後截圖, 若有跑版 給desinger看.
人工判斷
> 約30種尺寸.
> 1個尺寸, 1分鐘跑完
# Shared Lib
Problems & Context
改library 影響到所有project
Solve :
1. Nx Circle
2. Working agreement
> 文件/測試
Q&A
1. 假設改壞了話, 用tag roll-back
2. hot-fix
你可選擇 1. 只上App 2. 全上.